浏览代码

用户魅力排行

zhangxiaobin 1 年之前
父节点
当前提交
5c035b4bac
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      application/api/controller/Index.php

+ 2 - 2
application/api/controller/Index.php

@@ -240,9 +240,9 @@ class Index extends Api
         $where = [];
         $where["a.createtime"] = ["gt",$timeArr[$time]];
         $list = model('GiftUserParty')->alias("a")
-            ->field("sum(a.value) as total_price,a.user_id,u.avatar,u.nickname")
+            ->field("sum(a.value) as total_price,a.user_to_id,u.avatar,u.nickname")
             ->where($where)
-            ->join("hx_user u","u.id = a.user_id")
+            ->join("hx_user u","u.id = a.user_to_id")
             ->group("a.user_to_id")
             ->order("total_price","desc")
             ->limit(100)