商品创建订单,提示语问题处理

This commit is contained in:
Chopper 2021-06-22 15:21:02 +08:00
parent 19154aa2b8
commit 3e237a8488
2 changed files with 5 additions and 1 deletions

View File

@ -242,7 +242,7 @@ public class CartController {
//读取选中的列表
return ResultUtil.data(this.cartService.createTrade(tradeParams));
} catch (ServiceException se) {
log.error(se.getMsg(), se);
log.info(se.getMsg(), se);
return ResultUtil.error(se.getResultCode().code(), se.getResultCode().message());
} catch (Exception e) {
log.error(ResultCode.ORDER_ERROR.message(), e);

View File

@ -510,6 +510,10 @@ public class CartServiceImpl implements CartService {
tradeDTO.setClientType(tradeParams.getClient());
tradeDTO.setStoreRemark(tradeParams.getRemark());
tradeDTO.setParentOrderSn(tradeParams.getParentOrderSn());
//订单无收货地址校验
if(tradeDTO.getMemberAddress()==null){
throw new ServiceException(ResultCode.MEMBER_ADDRESS_NOT_EXIST);
}
//将购物车信息写入缓存后续逻辑调用校验
this.resetTradeDTO(tradeDTO);
//构建交易