Browse Source

在线用户列表,增加用户财富等级,魅力等级

lizhen_gitee 1 year ago
parent
commit
e36da29e4d
1 changed files with 6 additions and 1 deletions
  1. 6 1
      application/api/controller/Party.php

+ 6 - 1
application/api/controller/Party.php

@@ -591,7 +591,12 @@ class Party extends Common
         if($res) $user_ids = array_values($res);
         // 获取用户列表信息
         if($user_ids){
-            $userList = \app\common\model\User::field("id,avatar,nickname,level,gender")->where(["id"=>["in",$user_ids],'is_stealth'=>0])->limit($pageStart,$pageNum)->select();
+            $userList = Db::name('user')->field("id,avatar,nickname,level,gender,charm_level,wealth_level,charm.image as charm_image,charm.color as charm_color,wealth.image as wealth_image,wealth.color as wealth_color")
+                ->join('user_config_charm charm','user.charm_level = charm.level','LEFT')
+                ->join('user_config_wealth wealth','user.wealth_level = wealth.level','LEFT')
+                ->where(["id"=>["in",$user_ids],'is_stealth'=>0])
+                ->limit($pageStart,$pageNum)->select();
+            $userList = list_domain_image($userList,['avatar','charm_image','wealth_image']);
         }
 
         $this->success("获取成功!",$userList);