Commit f961a793 by 周晓航

Merge branch 'KA-测试购物车list不重复调用' into pre

parents 52aaa7d5 c1238b6a
...@@ -2448,7 +2448,15 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -2448,7 +2448,15 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
toastMsg = shoppingCartInfoRequestVo != null && ObjectUtils.equals(SubmitPageEnum.YES.getCode(), shoppingCartInfoRequestVo.getFlag()) ? SHOPPING_CART_EMPTY_GOODS_LIST : SHOPPING_CART_INVALIAD_GOODS; toastMsg = shoppingCartInfoRequestVo != null && ObjectUtils.equals(SubmitPageEnum.YES.getCode(), shoppingCartInfoRequestVo.getFlag()) ? SHOPPING_CART_EMPTY_GOODS_LIST : SHOPPING_CART_INVALIAD_GOODS;
setToastMsgIfNotExist(shoppingCartGoodsResponseVo, toastMsg); setToastMsgIfNotExist(shoppingCartGoodsResponseVo, toastMsg);
//结算页,只有商品全部非法(即products为空)时,才提示changed为true toastMsg 不为空 //结算页,只有商品全部非法(即products为空)时,才提示changed为true toastMsg 不为空
if (shoppingCartInfoRequestVo != null && ObjectUtils.equals(SubmitPageEnum.YES.getCode(), shoppingCartInfoRequestVo.getFlag())) { boolean changed = shoppingCartInfoRequestVo != null
&&shoppingCartInfoRequestVo.getEnableSharing() != null
&& shoppingCartInfoRequestVo.getEnableSharing().compareTo(0) == 0
&& Objects.nonNull(shoppingCartGoodsResponseVo.getChanged())
&& shoppingCartGoodsResponseVo.getChanged().compareTo(true) == 0;
if (changed) {
shoppingCartGoodsResponseVo.setChanged(true);
shoppingCartGoodsResponseVo.setToastMsg("购物车数据异常,需要重新请求购物车list接口");
} else {
shoppingCartGoodsResponseVo.setChanged(CollectionUtils.isEmpty(cartGoodsList)); shoppingCartGoodsResponseVo.setChanged(CollectionUtils.isEmpty(cartGoodsList));
shoppingCartGoodsResponseVo.setToastMsg(CollectionUtils.isEmpty(cartGoodsList) ? toastMsg : ""); shoppingCartGoodsResponseVo.setToastMsg(CollectionUtils.isEmpty(cartGoodsList) ? toastMsg : "");
} }
......
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