Commit 0add9c66 by chongfu.liang

频次券一笔单子多张券时只传一张券

parent 8bb2c132
......@@ -120,8 +120,10 @@ public class CalculationSharingDiscountService {
coupon.setCode(checkSpqInfo.getCouponCode());
coupon.setActivityCode(checkSpqInfo.getActiveCode());
log.info("coupons={},coupon={}", JSON.toJSONString(coupons), JSON.toJSONString(coupon));
CalculationSharingDiscountRequestDto.CalculationDiscountCoupon calculationDiscountCoupon = coupons.stream().filter(p -> coupon.getActivityCode().equals(p.getActivityCode()) && coupon.getCode().equals(p.getCode())).findFirst().orElse(null);
if (calculationDiscountCoupon == null){
coupons.add(coupon);
}
// 添加商品券代表的商品放入促销
String goodsId = StringUtils.isNotBlank(checkSpqInfo.getSkuId()) ? checkSpqInfo.getSkuId() : checkSpqInfo.getSpuId();
if (GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
......
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