diff --git a/app/common/dao/system/merchant/MerchantIntentionDao.php b/app/common/dao/system/merchant/MerchantIntentionDao.php index 759fa0a3..be3e74c3 100644 --- a/app/common/dao/system/merchant/MerchantIntentionDao.php +++ b/app/common/dao/system/merchant/MerchantIntentionDao.php @@ -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) { diff --git a/app/common/repositories/system/merchant/MerchantIntentionRepository.php b/app/common/repositories/system/merchant/MerchantIntentionRepository.php index fcfa7a38..969d538a 100644 --- a/app/common/repositories/system/merchant/MerchantIntentionRepository.php +++ b/app/common/repositories/system/merchant/MerchantIntentionRepository.php @@ -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'); }