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