diff --git a/app/common/dao/system/merchant/MerchantIntentionDao.php b/app/common/dao/system/merchant/MerchantIntentionDao.php index e74f2de1..759fa0a3 100644 --- a/app/common/dao/system/merchant/MerchantIntentionDao.php +++ b/app/common/dao/system/merchant/MerchantIntentionDao.php @@ -32,7 +32,11 @@ 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) { - $query->where('type', (int)$where['type']); + if(is_array($where['type'])){ + $query->whereOr('type',$where['type'][0])->whereOr('type',$where['type'][1]); + }else{ + $query->where('type', (int)$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/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 6bb2ea39..abae7318 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -389,8 +389,7 @@ class MerchantIntention extends BaseController public function lst() { [$page, $limit] = $this->getPage(); - // $type = $this->request->get('type', 1); - $data = $this->repository->getList(['uid' => $this->userInfo->uid], $page, $limit); + $data = $this->repository->getList(['uid' => $this->userInfo->uid,'type'=>[1,2]], $page, $limit); return app('json')->success($data); }