瀏覽代碼

排行榜加用户ID

zhangxiaobin 1 年之前
父節點
當前提交
1531e7fc18
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      application/api/controller/Index.php

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

@@ -240,7 +240,7 @@ class Index extends Api
         $where = [];
         $where["a.createtime"] = ["gt",$timeArr[$time]];
         $list = model('GiftUserParty')->alias("a")
-            ->field("sum(a.value) as total_price,u.avatar,u.nickname")
+            ->field("sum(a.value) as total_price,a.user_id,u.avatar,u.nickname")
             ->where($where)
             ->join("hx_user u","u.id = a.user_id")
             ->group("a.user_to_id")
@@ -290,7 +290,7 @@ class Index extends Api
         $where["a.type"] = ["in",[0,2,3,5,6,11,13]];//查看wallet.php文件
         $where["a.createtime"] = ["gt",$timeArr[$time]];
         $list = model('UserJewelLog')->alias("a")
-            ->field("sum(a.value) as total_price,u.avatar,u.nickname")
+            ->field("sum(a.value) as total_price,a.user_id,u.avatar,u.nickname")
             ->where($where)
             ->join("hx_user u","u.id = a.user_id")
             ->group("a.user_id")