修改平台端商品列表查询

This commit is contained in:
luofei 2023-06-08 17:42:10 +08:00
parent 5a3176f1aa
commit 5b96056942
2 changed files with 3 additions and 4 deletions

View File

@ -789,11 +789,11 @@ class ProductRepository extends BaseRepository
break;
}
if ($productType == 0) {
$where['product_type'] = $productType;
$where[] = empty($merId) ? ['product_type', 'in', [0, 98]] : ['product_type', 'in', [0]];
if (!$merId) $where['is_gift_bag'] = 0;
}
if ($productType == 1||$productType==98) {
$where['product_type'] = $productType;
if ($productType == 1) {
$where[] = ['product_type', 'in', [$productType]];
}
if ($productType == 10) {
$where['is_gift_bag'] = 1;

View File

@ -55,7 +55,6 @@ class StoreProduct extends BaseController
$where['is_gift_bag'] = 0;
$_where = $this->repository->switchType($where['type'], null,0);
unset($_where['product_type']);
$_where[] = ['product_type', 'in', [0, 98]];
unset($_where['star']);
$where = array_merge($where, $_where);
return app('json')->success($this->repository->getAdminList($merId, $where, $page, $limit));