...
|
...
|
@@ -52,16 +52,17 @@ class WithdrawalController extends AdminBaseController{ |
|
|
$where['a.create_time'] = [['>=',$start_time],['<=',$end_time]];
|
|
|
}
|
|
|
if(!empty($param['keyword'])){
|
|
|
$where['b.phone'] = ['like','%'.trim($param['keyword']).'%'];
|
|
|
$where['b.phone|u.user_nickname'] = ['like','%'.trim($param['keyword']).'%'];
|
|
|
}
|
|
|
$data = Db::name('money_expend') -> alias('a') -> field('a.*,b.phone') -> join('my_user b','a.uid=b.uid','LEFT') -> where($where) -> order("a.create_time desc") -> paginate(12);
|
|
|
$data = Db::name('money_expend')
|
|
|
->alias('a')
|
|
|
->field('a.*,b.phone,u.user_nickname as name')
|
|
|
->join('my_user b','a.uid=b.uid','LEFT')
|
|
|
->join('user u','a.uid=u.id','LEFT')
|
|
|
->where($where)
|
|
|
->order("a.create_time desc")
|
|
|
->paginate(12);
|
|
|
$data_arr = $data -> toArray();
|
|
|
if(!empty($data_arr)){
|
|
|
foreach($data_arr['data'] as $key => $val){
|
|
|
$name = Db::name('user') -> where('id',$val['uid']) -> find();
|
|
|
$data_arr['data'][$key]['name'] = $name['user_nickname'];
|
|
|
}
|
|
|
}
|
|
|
$this->assign('start_time',!empty($param['start_time']) ? $param['start_time'] : '');
|
|
|
$this->assign('end_time',!empty($param['end_time']) ? $param['end_time'] : '');
|
|
|
$this->assign('keyword',!empty($param['keyword']) ? trim($param['keyword']) : '');
|
...
|
...
|
|