From 945fdac2c22c46ef905e85aac0361ffb376b7f90 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 26 Jul 2024 10:17:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=97=A8=E5=BA=97ID?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=88=B0=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/lists/user/UserLists.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/admin/lists/user/UserLists.php b/app/admin/lists/user/UserLists.php index 36713da0..20fea0ba 100644 --- a/app/admin/lists/user/UserLists.php +++ b/app/admin/lists/user/UserLists.php @@ -13,6 +13,7 @@ use app\common\model\user\UserAddress; use app\common\model\vip_flow\VipFlow; use support\Db; use app\common\lists\ListsSearchInterface; +use app\common\model\system_store\SystemStore; class UserLists extends BaseAdminDataLists implements ListsExcelInterface,ListsSearchInterface { @@ -44,7 +45,7 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface,ListsS public function lists(): array { $field = "id,nickname,real_name,sex,avatar,account,mobile,channel,create_time,purchase_funds,user_ship, - label_id,integral,now_money,total_recharge_amount,vip_time"; + label_id,integral,now_money,total_recharge_amount,vip_time,store_id"; $lists = User::where($this->searchWhere) ->with(['user_ship','user_label']) ->limit($this->limitOffset, $this->limitLength) @@ -68,6 +69,10 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface,ListsS if($item['label_name']== null){ $item['label_name'] = '无'; } + $item['store_name']=''; + if($item['store_id']>0){ + $item['store_name'] = SystemStore::where('id',$item['store_id'])->value('name'); + } $item['return_money'] = VipFlow:: where(['user_id'=>$item['id'],'status'=>0]) ->sum('number')??0; @@ -138,8 +143,13 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface,ListsS 'nickname' => '用户昵称', 'account' => '账号', 'mobile' => '手机号码', - 'channel' => '注册来源', - 'create_time' => '注册时间', + 'now_money' => '用户余额', + 'integral' => '礼品券', + 'vip_name' => '会员类型', + 'store_name' => '门店', + 'total_recharge_amount' => '累计消费', + 'purchase_funds' => '采购款', + 'format_address'=>'地址' ]; } } \ No newline at end of file