|
@@ -493,7 +493,7 @@ class Party extends Common
|
|
|
* @param $redis
|
|
|
* @return int
|
|
|
*/
|
|
|
- private function getUserJoinPartyDays($user_id, $party_id,$redis): int
|
|
|
+ private function getUserJoinPartyDays($user_id, $party_id,$redis)
|
|
|
{
|
|
|
$days = 1;
|
|
|
$joinPartyDays = $redis->hGet("joinParty_days",$user_id."-".$party_id);
|
|
@@ -526,7 +526,8 @@ class Party extends Common
|
|
|
*/
|
|
|
public function joinParty() {
|
|
|
$party_id = $this->request->request('party_id',0,"intval"); // 直播间ID 逻辑ID
|
|
|
- $room_type = $this->request->request("room_type",1);//
|
|
|
+// $room_type = $this->request->request("room_type",1);//
|
|
|
+ $room_type = 1;
|
|
|
$party_pass = $this->request->request("party_pass");//
|
|
|
if (!$party_id || !in_array($room_type,[1,2])) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
@@ -535,7 +536,7 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);$redis->auth(123456);
|
|
|
- $redis->zAdd("party_user_".$party_id,$this->auth->u_id,$user_id);
|
|
|
+ $redis->zAdd("party_user_".$party_id,$this->auth->username,$user_id);
|
|
|
|
|
|
// 判断当前用户是否存在在直播间通过切换过来的
|
|
|
$livingUserPartyId = $redis->hGet("livingUser", $user_id);
|
|
@@ -591,7 +592,7 @@ class Party extends Common
|
|
|
// if($partyInfo["status"] != 1) $this->error("该房间为预创建房间,请联系管理员正式开通!");
|
|
|
|
|
|
if(isset($partyInfo["party_pass"]) && $partyInfo["party_pass"] && $partyInfo["user_id"] != $user_id) {
|
|
|
- if(($party_pass != $partyInfo["party_pass"] || strlen($party_pass) != 4) && $this->auth->id != 4) {
|
|
|
+ if(($party_pass != $partyInfo["party_pass"] || strlen($party_pass) != 4)) {
|
|
|
$this->error("派对密码不正确!");
|
|
|
}
|
|
|
}
|
|
@@ -891,7 +892,7 @@ class Party extends Common
|
|
|
$where["a.id"] = $party_id;
|
|
|
$partyInfo = $partyModel->alias("a")
|
|
|
->field("a.id,a.user_id,a.party_id,a.party_name,a.party_hot,a.party_logo,rt.id as party_type,rt.name as type_name,a.party_notice,a.party_notice_detail")
|
|
|
- ->join("hx_party_type rt","rt.id = a.party_type", "left")
|
|
|
+ ->join("party_type rt","rt.id = a.party_type", "left")
|
|
|
->where($where)
|
|
|
->find();
|
|
|
|