Browse Source

后台收礼排行榜

lizhen_gitee 1 year ago
parent
commit
dd5b9a42c2

+ 2 - 2
application/admin/controller/UserGiftRank.php

@@ -42,9 +42,9 @@ class UserGiftRank extends Backend
             list($where, $sort, $order, $offset, $limit) = $this->buildparams();
 
             $list = model('GiftUserParty')->alias("gift_user_party")
-                ->field("gift_user_party.id,sum(gift_user_party.value) as total_price,gift_user_party.user_id,user.avatar as `user.avatar`,user.nickname as `user.nickname`,gift_user_party.createtime")
+                ->field("gift_user_party.id,sum(gift_user_party.value) as total_price,gift_user_party.user_to_id,user.avatar as `user.avatar`,user.nickname as `user.nickname`,gift_user_party.createtime")
                 ->where($where)
-                ->join("hx_user user","user.id = gift_user_party.user_id")
+                ->join("hx_user user","user.id = gift_user_party.user_to_id")
                 ->group("gift_user_party.user_to_id")
                 ->order('total_price',$order)
                 ->paginate($limit);

+ 1 - 1
application/admin/lang/zh-cn/user_gift_rank.php

@@ -2,7 +2,7 @@
 return [
     'Id'            => 'ID',
     'No'            => '编号',
-    'User_id'       => '用户ID',
+    'User_to_id'    => '获赠用户ID',
     'User.avatar'   => '头像',
     'User.nickname' => '昵称',
     'Total_price'   => '魅力值'

+ 1 - 1
public/assets/js/backend/user_gift_rank.js

@@ -27,7 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {checkbox: true},
                         {field: 'id', title: __('Id'), operate: false, visible:false},
                         {field: 'no', title: __('No')},
-                        {field: 'user_id', title: __('User_id')},
+                        {field: 'user_to_id', title: __('User_to_id')},
                         {field: 'user.avatar', title: __('User.avatar'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
                         {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
                         {field: 'total_price', title: __('Total_price'), operate: false, sortable: true},