Commit 87b49409 by 孙昱

sunyu::update::updateGoodsQty

parent 502a4c23
......@@ -431,25 +431,7 @@ public class ShoppingCartMCoffeeServiceImpl {
BaseResponse baseResponse = null;
for (GoodsQtyInfo goodsQtyInfo : requestVo.getQtyInfoList()) {
UpdateShoppingCartGoodsQtyRequestVo singleUpdateRequest = batchQtyRequestConvert2SingleQtyRequest(goodsQtyInfo,requestVo);
try {
baseResponse = this.updateGoodsQty(singleUpdateRequest);
}catch (ServiceException e){
if (singleUpdateRequest.getQty() == 0 && e.getResult().getCode().equals(ResponseResult.SHOPPING_CART_UPDATE_ERROR.getCode())){
ShoppingCartClearRequestVo clearRequestVo = new ShoppingCartClearRequestVo();
clearRequestVo.setAppId(singleUpdateRequest.getAppId());
clearRequestVo.setUserId(null);
clearRequestVo.setOperationType(3);
clearRequestVo.setTableNumber(null);
clearRequestVo.setCreateCollageUserId(singleUpdateRequest.getCreateCollageUserId());
clearRequestVo.setReceiveId(singleUpdateRequest.getReceiveId());
clearRequestVo.setSessionId(singleUpdateRequest.getSessionId());
clearRequestVo.setPartnerId(singleUpdateRequest.getPartnerId());
clearRequestVo.setShopId(singleUpdateRequest.getShopId());
clearRequestVo.setOrderType(singleUpdateRequest.getOrderType());
clearRequestVo.setChannelType(singleUpdateRequest.getChannelType());
baseResponse = this.clear(clearRequestVo);
}
}
baseResponse = this.updateGoodsQty(singleUpdateRequest);
if (!Objects.equals(ResponseResult.SUCCESS.getCode(),baseResponse.getCode())){
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