소스 검색

送礼物,删除注释代码

lizhen_gitee 1 년 전
부모
커밋
561e590b17
1개의 변경된 파일0개의 추가작업 그리고 49개의 파일을 삭제
  1. 0 49
      application/api/controller/Party.php

+ 0 - 49
application/api/controller/Party.php

@@ -2282,57 +2282,8 @@ class Party extends Api
         $this->success('success',$list);
     }
 
-//    /**
-//     * 播放动效
-//     */
-//    public function play($party_id,$type,$value,$number) {
-//        // 发送tcp
-//        $tcpArr = [];
-//        $tcpArr['type'] = "play";
-//        $tcpArr['data'] = [
-//            'party_id' => $party_id,
-//            'type' => $type,
-//            'value' => $value,
-//            'number' => $number,
-//        ];
-//        $tcpJson = json_encode($tcpArr);
-//        $client = stream_socket_client(config("tcp"));
-//        $buffer2 = base64_encode($tcpJson)."****";
-//        fwrite($client, $buffer2);
-//    }
 
 
-
-    /**
-     * 更新派对信息(热度等)
-     */
-    private function updatePartyHot($partyInfo,$giftValue,$room_type) {
-//        $partyInfo = \app\common\model\Party::where(['id'=>$party_id])->find();
-        if(!$partyInfo) return $giftValue;
-
-        $party_hot = $partyInfo->party_hot > 0 ? $partyInfo->party_hot:0;
-        $party_hot_value = $party_hot + $giftValue;
-        $party_hot_value = $party_hot_value > 0 ? $party_hot_value : 0;
-        if($party_hot_value != $party_hot) {
-            // 保存数据
-            $partyInfo->party_hot = $party_hot_value;
-            $partyInfo->save();
-            // 更新redis  加入缓存排序
-
-            $this->redis->zAdd($this->roomTypeArr[$room_type]."Rank", $partyInfo['party_hot'], $partyInfo["id"]);
-
-            // 更新redis  加入缓存
-            $redPartyInfo = $this->redis->get($this->roomTypeArr[$room_type]."_".$partyInfo["id"]);
-            if($redPartyInfo) {
-                $redPartyInfo = json_decode($redPartyInfo,true);
-                $redPartyInfo["party_hot"] = $party_hot_value;
-                $this->redis->set($this->roomTypeArr[$room_type]."_".$partyInfo["id"],json_encode($redPartyInfo));
-            }
-
-        }
-        return $party_hot_value;
-    }
-
     /**
      * 用户赠送礼物后房间内用户排行,财富榜前三名
      */