This commit is contained in:
mkm 2024-01-15 13:42:51 +08:00
parent 5fe3d5c824
commit 5708cd8098
2 changed files with 1 additions and 6 deletions

View File

@ -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) {

View File

@ -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');
}