diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index 4d50dab4..5fe5fc7d 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -83,7 +83,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository } if ($cart['product_type'] > 0) $order_type = $cart['product_type']; - if ($cart['product_type']<98 &&$cart['product_type'] > 0 && (($cart['product_type'] != 10 && count($merchantCart['list']) != 1) || count($merchantCartList) != 1)) { + if ($cart['product_type']<97 &&$cart['product_type'] > 0 && (($cart['product_type'] != 10 && count($merchantCart['list']) != 1) || count($merchantCartList) != 1)) { throw new ValidateException('活动商品必须单独购买'); } if ($cart['product']['type'] && (count($merchantCart['list']) != 1 || count($merchantCartList) != 1)) { diff --git a/app/controller/api/server/StoreProduct.php b/app/controller/api/server/StoreProduct.php index 21d17a96..45c55c6b 100644 --- a/app/controller/api/server/StoreProduct.php +++ b/app/controller/api/server/StoreProduct.php @@ -57,7 +57,13 @@ class StoreProduct extends BaseController { [$page, $limit] = $this->getPage(); $where = $this->request->params(['cate_id', 'keyword', ['type',20], 'mer_cate_id', 'is_gift_bag', 'status', 'us_status', 'product_id', 'mer_labels',['order','sort']]); - $where = array_merge($where, $this->repository->switchType($where['type'], $merId, 0)); + $merchant = app()->make(MerchantRepository::class)->get($merId); + if ($merchant['type_id']==12){ + $product_type=98;//供应链 + }else{ + $product_type=0;//普通商品 + } + $where = array_merge($where, $this->repository->switchType($where['type'], $merId, $product_type)); return app('json')->success($this->repository->getList($merId, $where, $page, $limit)); }