Browse Source

商家端商城、平台端商城订单提交商品上架状态校验业务调整

multiwx
dy-hu 7 months ago
parent
commit
fc2696386a
  1. 9
      cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java

9
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 (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);
}
}
}
}
}

Loading…
Cancel
Save