修复错误

This commit is contained in:
mkm 2023-05-11 10:15:51 +08:00
parent 603e166843
commit cf14089562
2 changed files with 8 additions and 2 deletions

View File

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

View File

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