Commit f80290f2 by 周晓航

加够数量 购物车限制

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 1ab2de56
...@@ -84,7 +84,6 @@ import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant; ...@@ -84,7 +84,6 @@ import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant;
import com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum; import com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum;
import com.freemud.sdk.api.assortment.shoppingcart.service.ShoppingCartBaseService; import com.freemud.sdk.api.assortment.shoppingcart.service.ShoppingCartBaseService;
import com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl; import com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl;
import com.freemud.sdk.api.assortment.shoppingcart.util.ShoppingSdkLogUtil;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import ma.glasnost.orika.MapperFacade; import ma.glasnost.orika.MapperFacade;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
...@@ -475,6 +474,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -475,6 +474,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return ResponseUtil.error(ResponseResult.SHOPPING_CART_SHOP_ID_NOT_EMPTY); return ResponseUtil.error(ResponseResult.SHOPPING_CART_SHOP_ID_NOT_EMPTY);
// throw new ServiceException(ResponseResult.SHOPPING_CART_SHOP_ID_NOT_EMPTY); // throw new ServiceException(ResponseResult.SHOPPING_CART_SHOP_ID_NOT_EMPTY);
} }
// fisherman 购物车加车数量限制
if (updateShoppingCartGoodsQtyRequestVo.getQty().compareTo(500) > 0 || updateShoppingCartGoodsQtyRequestVo.getQty().compareTo(0) <= 0 ) {
return ResponseUtil.error(ResponseResult.SHOPPING_CART_LIMIT_ADD);
}
ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo = new ShoppingCartGoodsResponseVo(); ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo = new ShoppingCartGoodsResponseVo();
CustomerInfoVo assortmentCustomerInfoVo = getCustomerInfoVo(updateShoppingCartGoodsQtyRequestVo.getSessionId()); CustomerInfoVo assortmentCustomerInfoVo = getCustomerInfoVo(updateShoppingCartGoodsQtyRequestVo.getSessionId());
UserLoginInfoDto userLoginInfoDto = convert2UserLoginInfoDto(assortmentCustomerInfoVo); UserLoginInfoDto userLoginInfoDto = convert2UserLoginInfoDto(assortmentCustomerInfoVo);
......
...@@ -21,7 +21,6 @@ import cn.freemud.service.active.ActiveService; ...@@ -21,7 +21,6 @@ import cn.freemud.service.active.ActiveService;
import cn.freemud.service.impl.AssortmentSdkService; import cn.freemud.service.impl.AssortmentSdkService;
import cn.freemud.service.thirdparty.ActivityClient; import cn.freemud.service.thirdparty.ActivityClient;
import cn.freemud.utils.PropertyConvertUtil; import cn.freemud.utils.PropertyConvertUtil;
import cn.freemud.entities.dto.activity.DiscountSharingDto;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant; import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant;
import com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum; import com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum;
...@@ -266,8 +265,8 @@ public class CalculationSharingDiscountService { ...@@ -266,8 +265,8 @@ public class CalculationSharingDiscountService {
throw new BizServiceException(ResponseResult.COCO_COUPON_VALIDATOR_FAIL, sharingDiscountResponseDto.getMsg()); throw new BizServiceException(ResponseResult.COCO_COUPON_VALIDATOR_FAIL, sharingDiscountResponseDto.getMsg());
} }
// 80000 促销校验业务错误,直接抛给前端 // 80000 促销校验业务错误,直接抛给前端
if (sharingDiscountResponseDto != null && StringUtils.equals(sharingDiscountResponseDto.getStatusCode(), "80000")) { if (StringUtils.equals(sharingDiscountResponseDto.getStatusCode(), "80000")) {
throw new ServiceException(ResponseResult.SYSTEM_BUSINESS_ERROR,sharingDiscountResponseDto.getMsg()); throw new ServiceException(ResponseResult.SYSTEM_BUSINESS_ERROR, sharingDiscountResponseDto.getMsg());
} }
// 支付宝华莱士紧急修改代码,当促销返回103错误码时,需要报券不适用于该门店,且清空购物车 // 支付宝华莱士紧急修改代码,当促销返回103错误码时,需要报券不适用于该门店,且清空购物车
......
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