Commit f41f2bdd by ping.wu

商品不存在提示

parent b14a29df
......@@ -75,6 +75,7 @@ public enum ResponseResult {
SHOPPING_CART_COUPON_NOT_EXIST("44010", "商品券不存在"),
SHOPPING_CART_SENDGOODS_NOT_EXIST("44011", "加价购商品不存在"),
SHOPPING_CART_STOCK_NOT_HAVE("44012", "商品库存不足"),
SHOPPING_CART_PRODUCT_NOT_EXIST("44013", "商品不存在"),
/**
* 订单状态码
......
......@@ -276,8 +276,9 @@ public class AppOrderServiceImpl implements AppOrderService {
getProductInfoDto.setChannel(menuType);
ProductService productService = SDKCommonBaseContextWare.getBean(ProductService.class);
com.freemud.application.sdk.api.base.BaseResponse<ProductInfosDTO> productInfosDTOBaseResponse = productService.listProductInfoByIdList(getProductInfoDto, LogThreadLocal.getTrackingNo());
if (!Objects.equals(ResponseResultEnum.SUCCESS.getCode(), productInfosDTOBaseResponse.getCode()) || productInfosDTOBaseResponse.getData() == null) {
throw new ServiceException(ResponseResult.SYSTEM_BUSINESS_ERROR);
if (!Objects.equals(ResponseResultEnum.SUCCESS.getCode(), productInfosDTOBaseResponse.getCode())
|| productInfosDTOBaseResponse.getData() == null || productInfosDTOBaseResponse.getData().getProducts().size() == 0) {
throw new ServiceException(ResponseResult.SHOPPING_CART_PRODUCT_NOT_EXIST);
}
List<ProductBeanDTO> productBeanDTOS = productInfosDTOBaseResponse.getData().getProducts();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment