更新
This commit is contained in:
parent
5fe3d5c824
commit
5708cd8098
@ -32,11 +32,7 @@ class MerchantIntentionDao extends BaseDao
|
||||
})->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
|
||||
$query->where('status', (int)$where['status']);
|
||||
})->when(isset($where['type']) && $where['type'] !== '', function ($query) use ($where) {
|
||||
if(is_array($where['type'])){
|
||||
$query->whereOr('type',$where['type'][0])->whereOr('type',$where['type'][1]);
|
||||
}else{
|
||||
$query->where('type', (int)$where['type']);
|
||||
}
|
||||
$query->whereIn('type',$where['type']);
|
||||
})->when(isset($where['mer_intention_id']) && $where['mer_intention_id'] !== '', function ($query) use ($where) {
|
||||
$query->where('mer_intention_id', $where['mer_intention_id']);
|
||||
})->when(isset($where['category_id']) && $where['category_id'] !== '', function ($query) use ($where) {
|
||||
|
@ -38,7 +38,6 @@ class MerchantIntentionRepository extends BaseRepository
|
||||
$query = $this->dao->search($where);
|
||||
$count = $query->count();
|
||||
$list = $query->page($page, $limit)->order('create_time DESC , status ASC')->with(['merchantCategory', 'merchantType'])->select();
|
||||
|
||||
return compact('count', 'list');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user