From fc2696386a5d8b643f81e5128be400c8c75be7f5 Mon Sep 17 00:00:00 2001 From: dy-hu Date: Wed, 3 Jul 2024 17:31:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E7=AB=AF=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E3=80=81=E5=B9=B3=E5=8F=B0=E7=AB=AF=E5=95=86=E5=9F=8E=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=8F=90=E4=BA=A4=E5=95=86=E5=93=81=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=A0=A1=E9=AA=8C=E4=B8=9A=E5=8A=A1=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/service/order/impl/CereShopOrderServiceImpl.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java index 3e9de69..e3e3333 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java @@ -402,10 +402,17 @@ public class CereShopOrderServiceImpl implements CereShopOrderService { for (OrderProductParam shop : param.getShops()) { for (ProductSku productSku : shop.getSkus()) { CereShopProduct product = cereProductSkuService.findShopProdBySkuId(productSku.getSkuId()); - if (ObjectUtils.isNotEmpty(product) && product.getShelveState() != 1){ - throw new CoBusinessException(CoReturnFormat.HAVE_INVALID_PRODUCT); + if (user.getProject().equals("0")){ + //平台端商城 + if (ObjectUtils.isNotEmpty(product) && product.getPlatShelveState() != 1){ + throw new CoBusinessException(CoReturnFormat.HAVE_INVALID_PRODUCT); + } + }else { + //商家端商城 + if (ObjectUtils.isNotEmpty(product) && product.getShelveState() != 1){ + throw new CoBusinessException(CoReturnFormat.HAVE_INVALID_PRODUCT); + } } - } } }