This commit is contained in:
mkm 2024-01-13 18:18:06 +08:00
parent c08249ce5a
commit 44138fadb3
2 changed files with 6 additions and 3 deletions

View File

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

View File

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