Commit 889677e1 by xiaoer.li@freemud.com

fix:积分抵扣规则,新增是否与促销和优惠券同享

parent 6008f9d6
......@@ -14,11 +14,13 @@ import cn.freemud.service.thirdparty.CustomScoreClient;
import cn.freemud.utils.LogUtil;
import com.freemud.application.sdk.api.constant.FMStatusCode;
import com.freemud.application.sdk.api.log.ErrorLog;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;
/**
......@@ -70,7 +72,8 @@ public class CustomerScoreService implements IPromotionService {
if (userScoreUseDetail.getResult().getOverlayOffers() == 0) {
customerScoreVo.setScoreReduceState(userScoreUseDetail.getResult().getScoreState());
} else {
if (StringUtils.isNotBlank(shoppingCartInfoRequestVo.getCouponCode()) || (calculationDiscountResult != null && calculationDiscountResult.getTotalDiscountAmount().intValue() > 0)) {
if (StringUtils.isNotBlank(shoppingCartInfoRequestVo.getCouponCode()) || (calculationDiscountResult != null && calculationDiscountResult.getTotalDiscountAmount().intValue() > 0)
|| (calculationDiscountResult != null && !CollectionUtils.isEmpty(calculationDiscountResult.getDiscounts()))) {
//积分抵扣开关禁用
customerScoreVo.setScoreReduceState(5);
userScoreUseDetail.getResult().setScoreState(5);
......
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