Commit a921eeab by 周晓航

重新校验一遍 参数

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 3d1804ed
......@@ -561,13 +561,20 @@ public class CouponAdapter {
couponPromotionVO.setCouponCodes(setCoupons);
}
// 兼容老版本
if(!Objects.isNull(couponCode1)){
if(StringUtils.isNotBlank(couponCode1)){
couponPromotionVO.setCouponCode(couponCode1);
}
couponPromotionVO.setOrderType(shoppingCartInfoRequestVo.getOrderType());
couponPromotionVO.setFlg(shoppingCartInfoRequestVo.getFlag());
couponPromotionVO.setUnChooseCouponCode(shoppingCartInfoRequestVo.getUnChooseCouponCode());
// 重新校验一遍 couponcodes
if (CollectionUtils.isNotEmpty(couponPromotionVO.getCouponCodes())) {
Set<String> collect = couponPromotionVO.getCouponCodes().stream().filter(s -> !"".equals(s)).collect(Collectors.toSet());
if (CollectionUtils.isNotEmpty(collect)) {
couponPromotionVO.setCouponCodes(null);
}
}
return couponPromotionVO;
}
......
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