|
|
@@ -49,12 +49,12 @@ class UserBillRepository extends BaseRepository
|
|
49
|
49
|
public function userList($where, $uid, $page, $limit)
|
|
50
|
50
|
{
|
|
51
|
51
|
$where['uid'] = $uid;
|
|
52
|
|
- $query = $this->dao->search($where)->order('create_time DESC');
|
|
53
|
|
- $count = $query->count();
|
|
54
|
|
- $list = $query
|
|
|
52
|
+ $query = $this->dao->search($where)->order('create_time DESC')
|
|
55
|
53
|
->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
|
|
56
|
54
|
$query->whereLike('status', $where['status']);
|
|
57
|
|
- })->setOption('field', [])->field('bill_id,pm,title,number,balance,mark,create_time,status,order_sn,mer_id')->page($page, $limit)->select();
|
|
|
55
|
+ });
|
|
|
56
|
+ $count = $query->count();
|
|
|
57
|
+ $list = $query->setOption('field', [])->field('bill_id,pm,title,number,balance,mark,create_time,status,order_sn,mer_id')->page($page, $limit)->select();
|
|
58
|
58
|
return compact('count', 'list');
|
|
59
|
59
|
}
|
|
60
|
60
|
|