From cf14089562d00229b2fa3a47233f04c649be9680 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 11 May 2023 10:15:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/order/StoreOrderCreateRepository.php | 2 +- app/controller/api/server/StoreProduct.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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)); }