|
@@ -419,6 +419,7 @@ class Party extends Common
|
|
$this->success("获取成功!",$resdata);
|
|
$this->success("获取成功!",$resdata);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //把所有房间的信息,都放到redis里去
|
|
private function reset_all_party(){
|
|
private function reset_all_party(){
|
|
//rediskey:派对热度
|
|
//rediskey:派对热度
|
|
$redisPartyRankList = $this->redis->zRevRange("partyRank",0,-1,true);
|
|
$redisPartyRankList = $this->redis->zRevRange("partyRank",0,-1,true);
|
|
@@ -439,7 +440,7 @@ class Party extends Common
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 获取派对用户排序
|
|
|
|
|
|
+ * 获取派对用户排序,(日榜,周榜,月榜) X (魅力榜,财富榜)
|
|
*/
|
|
*/
|
|
public function getPartyUserRank() {
|
|
public function getPartyUserRank() {
|
|
$room_type = input('room_type',1); // 房间类型
|
|
$room_type = input('room_type',1); // 房间类型
|
|
@@ -458,7 +459,7 @@ class Party extends Common
|
|
// 获取条数
|
|
// 获取条数
|
|
$num = 50;
|
|
$num = 50;
|
|
|
|
|
|
- // 获取50条财富排行日记录
|
|
|
|
|
|
+ // 获取50条魅力排行日记录
|
|
$getday = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_get_".$party_id.":".$day."d",0,$num-1,true);
|
|
$getday = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_get_".$party_id.":".$day."d",0,$num-1,true);
|
|
$res['getRankListDay'] = $userModel->rankList($getday);
|
|
$res['getRankListDay'] = $userModel->rankList($getday);
|
|
|
|
|
|
@@ -467,21 +468,20 @@ class Party extends Common
|
|
$res['toRankListDay'] = $userModel->rankList($today);
|
|
$res['toRankListDay'] = $userModel->rankList($today);
|
|
|
|
|
|
|
|
|
|
- // 获取50条财富排行周记录
|
|
|
|
|
|
+ // 获取50条魅力排行周记录
|
|
$getweek = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_get_".$party_id.":".$weekday."w",0,$num-1,true);
|
|
$getweek = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_get_".$party_id.":".$weekday."w",0,$num-1,true);
|
|
$res['getRankListWeek'] = $userModel->rankList($getweek);
|
|
$res['getRankListWeek'] = $userModel->rankList($getweek);
|
|
|
|
|
|
- // 获取50条贡献排行周记录
|
|
|
|
|
|
+ // 获取50条财富排行周记录
|
|
$toweek = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_to_".$party_id.":".$weekday."w",0,$num-1,true);
|
|
$toweek = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_to_".$party_id.":".$weekday."w",0,$num-1,true);
|
|
$res['toRankListWeek'] = $userModel->rankList($toweek);
|
|
$res['toRankListWeek'] = $userModel->rankList($toweek);
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
- // 获取50条财富排行月记录
|
|
|
|
|
|
+ // 获取50条魅力排行月记录
|
|
$toweek = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_get_".$party_id.":".$monthday."m",0,$num-1,true);
|
|
$toweek = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_get_".$party_id.":".$monthday."m",0,$num-1,true);
|
|
$res['getRankListMonth'] = $userModel->rankList($toweek);
|
|
$res['getRankListMonth'] = $userModel->rankList($toweek);
|
|
|
|
|
|
- // 获取50条贡献排行周记录
|
|
|
|
|
|
+ // 获取50条财富排行月记录
|
|
$toweek = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_to_".$party_id.":".$monthday."m",0,$num-1,true);
|
|
$toweek = $this->redis->zRevRange($this->roomTypeArr[$room_type]."_jewel_to_".$party_id.":".$monthday."m",0,$num-1,true);
|
|
$res['toRankListMonth'] = $userModel->rankList($toweek);
|
|
$res['toRankListMonth'] = $userModel->rankList($toweek);
|
|
|
|
|
|
@@ -1683,17 +1683,17 @@ class Party extends Common
|
|
if ($res1 && $res2 && $res5) {
|
|
if ($res1 && $res2 && $res5) {
|
|
$i++;
|
|
$i++;
|
|
if($party_id > 0) {
|
|
if($party_id > 0) {
|
|
- // 添加redis记录做财富排行榜日榜用
|
|
|
|
|
|
+ // 添加redis记录做魅力排行榜日榜用
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_get_" . $party_id . ":" . $day . "d", $hotValue, $user_id);
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_get_" . $party_id . ":" . $day . "d", $hotValue, $user_id);
|
|
- // 添加redis记录做财富排行榜周榜用
|
|
|
|
|
|
+ // 添加redis记录做魅力排行榜周榜用
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_get_" . $party_id . ":" . $weekday . "w", $hotValue, $user_id);
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_get_" . $party_id . ":" . $weekday . "w", $hotValue, $user_id);
|
|
- // 添加redis记录做财富排行榜月榜用
|
|
|
|
|
|
+ // 添加redis记录做魅力排行榜月榜用
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_get_" . $party_id . ":" . $monthday . "m", $hotValue, $user_id);
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_get_" . $party_id . ":" . $monthday . "m", $hotValue, $user_id);
|
|
- // 添加redis记录做贡献排行榜日榜用
|
|
|
|
|
|
+ // 添加redis记录做财富排行榜日榜用
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_to_" . $party_id . ":" . $day . "d", $giftValue, $userauthid);
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_to_" . $party_id . ":" . $day . "d", $giftValue, $userauthid);
|
|
- // 添加redis记录做贡献排行榜周榜用
|
|
|
|
|
|
+ // 添加redis记录做财富排行榜周榜用
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_to_" . $party_id . ":" . $weekday . "w", $giftValue, $userauthid);
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_to_" . $party_id . ":" . $weekday . "w", $giftValue, $userauthid);
|
|
- // 添加redis记录做贡献排行榜月榜用
|
|
|
|
|
|
+ // 添加redis记录做财富排行榜月榜用
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_to_" . $party_id . ":" . $monthday . "m", $giftValue, $userauthid);
|
|
$this->redis->zIncrBy($this->roomTypeArr[$room_type] . "_jewel_to_" . $party_id . ":" . $monthday . "m", $giftValue, $userauthid);
|
|
|
|
|
|
// tcp 更新用户魅力值
|
|
// tcp 更新用户魅力值
|