|
@@ -546,6 +546,8 @@ class Party extends Api
|
|
|
*/
|
|
|
public function getPartyList() {
|
|
|
$order = input('orderby','new');
|
|
|
+ $page = input('page',1);
|
|
|
+ $listrow = input('listrow',10);
|
|
|
|
|
|
$this->reset_all_party();
|
|
|
|
|
@@ -590,6 +592,9 @@ class Party extends Api
|
|
|
'online_num' => isset($userDataRes['online_num']) ? $userDataRes['online_num'] : 0,
|
|
|
];
|
|
|
|
|
|
+
|
|
|
+ $sortnum = $page * $listrow + $k + 1;
|
|
|
+
|
|
|
$resdata[] = [
|
|
|
"id" => $v["id"],
|
|
|
"user_id" => $v["user_id"],
|
|
@@ -604,6 +609,7 @@ class Party extends Api
|
|
|
"party_type_color" => $mod == 0?5:$mod,
|
|
|
"easemob_room_id" => $v['easemob_room_id'],
|
|
|
"party_user" => $partyUserList,
|
|
|
+ "sortnum" => $sortnum,
|
|
|
];
|
|
|
}
|
|
|
|
|
@@ -2108,6 +2114,9 @@ class Party extends Api
|
|
|
$returnData['baobi_total'] = $res_baobi['baobi_total'];
|
|
|
$returnData['baobi_beilv'] = $res_baobi['baobi_beilv'];
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ $this->updatePartyHot($partyInfo, $giftCountValue_rate,$partyInfo['room_type']);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2143,6 +2152,34 @@ class Party extends Api
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * 更新派对信息(热度等)
|
|
|
+ */
|
|
|
+ private function updatePartyHot($partyInfo,$hotValue,$room_type) {
|
|
|
+ if(!$partyInfo) return $hotValue;
|
|
|
+
|
|
|
+ $party_hot = $partyInfo->party_hot > 0 ? $partyInfo->party_hot:0;
|
|
|
+ $party_hot_value = $party_hot + $hotValue;
|
|
|
+ $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();
|
|
|
+
|
|
|
+ $this->redis->zAdd($this->roomTypeArr[$room_type]."Rank", $partyInfo['party_hot'], $partyInfo["id"]);
|
|
|
+
|
|
|
+
|
|
|
+ $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;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public function baobi($user_id,$gift_id,$pay_total,$giftInfo_value){
|
|
|
|