Commit 44c0ea9f by 徐康

问题修复

parent e9fce758
......@@ -252,11 +252,22 @@ public class ShoppingCartMCoffeeServiceImpl {
return ResponseUtil.error(ResponseResult.SHOPPING_CART_ADD_INVAILD);
}
BaseResponse baseResponse = null;
ShoppingCartGoodsResponseVo result = new ShoppingCartGoodsResponseVo();
List<String> toastMsgList = new ArrayList<>();
for (BatchGoodsInfoVo goodsInfo : requestVo.getGoodsInfos()) {
baseResponse = addGoods(convertBatchAdd2SingleAdd(goodsInfo,requestVo));
if (!Objects.equals(ResponseCodeConstant.RESPONSE_SUCCESS_STR,baseResponse.getCode())){
return baseResponse;
}
ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo = (ShoppingCartGoodsResponseVo) baseResponse.getResult();
if(null != shoppingCartGoodsResponseVo && null != shoppingCartGoodsResponseVo.getChanged() && shoppingCartGoodsResponseVo.getChanged()) {
result.setChanged(true);
toastMsgList.add(shoppingCartGoodsResponseVo.getToastMsg());
}
}
if(CollectionUtils.isNotEmpty(toastMsgList)){
result.setToastMsg(StringUtils.join(toastMsgList, ";"));
return ResponseUtil.success(result);
}
return baseResponse;
}
......
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