|
@@ -48,22 +48,22 @@ class RoomService
|
|
|
// 直接从数据库获取所有数据
|
|
|
$where = [];
|
|
|
$where["a.status"] = 1;
|
|
|
- $where["a.is_online"] = 1;
|
|
|
+// $where["a.is_online"] = 1;
|
|
|
$where["a.room_type"] = $room_type;
|
|
|
$sqlPartyList = $this->model->alias("a")->field("a.*,b.name as type_name")
|
|
|
->join("hx_party_type b","a.party_type = b.id","left")->where($where)->select();
|
|
|
- $userList = $userModel->field("id,nickname,avatar")->where(["status"=>1])->select();
|
|
|
+ /*$userList = $userModel->field("id,nickname,avatar")->where(["status"=>1])->select();
|
|
|
$userInfoArr = [];
|
|
|
- if($userList) foreach($userList as $k => $v) $userInfoArr[$v["id"]] = $v;
|
|
|
+ if($userList) foreach($userList as $k => $v) $userInfoArr[$v["id"]] = $v;*/
|
|
|
if($sqlPartyList) {
|
|
|
foreach($sqlPartyList as $k => $v) {
|
|
|
// 加入缓存排序
|
|
|
//rediskey:派对热度
|
|
|
$this->redis->zAdd($this->roomTypeArr[$room_type]."Rank", $v['party_hot'], $v["id"]);
|
|
|
// 设置冠名
|
|
|
- $sqlPartyList[$k]["naming"] = isset($userInfoArr[$v["naming"]])?$userInfoArr[$v["naming"]]:[];
|
|
|
+ //$sqlPartyList[$k]["naming"] = isset($userInfoArr[$v["naming"]])?$userInfoArr[$v["naming"]]:[];
|
|
|
// 设置房主头像
|
|
|
- $sqlPartyList[$k]["avatar"] = isset($userInfoArr[$v["user_id"]])?$userInfoArr[$v["user_id"]]["avatar"]:[];
|
|
|
+ //$sqlPartyList[$k]["avatar"] = isset($userInfoArr[$v["user_id"]])?$userInfoArr[$v["user_id"]]["avatar"]:[];
|
|
|
// 加入缓存
|
|
|
//rediskey:派对详情
|
|
|
$this->redis->set($this->roomTypeArr[$room_type]."_".$v["id"],json_encode($v));
|