Browse Source

魅力=得到礼物,财富=赠送礼物

lizhen_gitee 1 năm trước cách đây
mục cha
commit
9d7b19ff1f

+ 13 - 13
application/api/controller/Party.php

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

+ 1 - 1
application/common/library/Auth.php

@@ -619,7 +619,7 @@ class Auth
         $userinfo['user_power'] = $userPower;
 
 
-        //贡献等级
+        //魅力等级
         $charm_info = Db::name('user_config_charm')->where('level',$this->charm_level)->find();
         $userinfo['charm_image'] = localpath_to_netpath($charm_info['image']);
         $userinfo['charm_color'] = $charm_info['color'];

+ 1 - 1
application/common/model/User.php

@@ -195,7 +195,7 @@ class User extends Model
                 $userrankList[] = [
                     "rank" => $rank,
                     "user_id" => $userIdKeyList[$k]["id"],
-                    "avatar" => $userIdKeyList[$k]["avatar"],
+                    "avatar" => localpath_to_netpath($userIdKeyList[$k]["avatar"]),
                     "nickname" => $userIdKeyList[$k]["nickname"],
                     "gender" => $userIdKeyList[$k]["gender"], // 性别
                     "level" => $userIdKeyList[$k]["level"], // 积分等级