更新数据字段
This commit is contained in:
parent
bf98d4837a
commit
d04149ba48
@ -4,6 +4,7 @@
|
|||||||
namespace app\store\lists\user;
|
namespace app\store\lists\user;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\store_finance_flow\StoreFinanceFlow;
|
||||||
use app\store\lists\BaseAdminDataLists;
|
use app\store\lists\BaseAdminDataLists;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
use app\common\model\user\UserShip;
|
use app\common\model\user\UserShip;
|
||||||
@ -37,7 +38,7 @@ class UserLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
|
|
||||||
$field = "id,nickname,real_name,sex,avatar,account,mobile,now_money,user_ship,create_time";
|
$field = "id,nickname,real_name,sex,avatar,account,mobile,now_money,user_ship,create_time,purchase_funds";
|
||||||
$lists = User::where($this->searchWhere)
|
$lists = User::where($this->searchWhere)
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->field($field)
|
->field($field)
|
||||||
@ -46,6 +47,10 @@ class UserLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
$data['sex_text'] = $data->sex_text;
|
$data['sex_text'] = $data->sex_text;
|
||||||
$data['mobile'] = substr_replace($data['mobile'], '****', 3, 4);
|
$data['mobile'] = substr_replace($data['mobile'], '****', 3, 4);
|
||||||
$data['user_ship_name'] =$data['user_ship']==0?'一般用户':UserShip::where('id',$data['user_ship'])->value('title');
|
$data['user_ship_name'] =$data['user_ship']==0?'一般用户':UserShip::where('id',$data['user_ship'])->value('title');
|
||||||
|
$data['return_money'] = StoreFinanceFlow::
|
||||||
|
where(['user_id'=>$data['id'],'status'=>0,'financial_pm'=>0])
|
||||||
|
->sum('number');
|
||||||
|
|
||||||
})->toArray();
|
})->toArray();
|
||||||
return $lists;
|
return $lists;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user