Commit a226cb8f by chongfu.liang

fix

parent 066e12e1
......@@ -314,7 +314,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
StringBuilder messageBuilder = new StringBuilder();
ActivityBO activityBO = setMessageBO.getActivityBO();
List<ActivityList> activityList = null;
if (discountResult == null || CollectionUtils.isEmpty(discountResult.getGoods())) {
if (activityBO != null && (discountResult == null || CollectionUtils.isEmpty(discountResult.getGoods()))) {
List<BenefitBeanBO> benefitBeanBOList = activityBO.getBenefits();
BenefitBeanBO benefitBeanBO = benefitBeanBOList.get(0);
......@@ -332,7 +332,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
*/
if (CollectionUtils.isNotEmpty(activityPrompts)) {
activityList = setMessageSatisfyCart(messageBuilder, activityPrompts, activityBO);
} else {
} else if (discountResult != null) {
activityList = setMessageNoSatisfyCart(messageBuilder, discountResult.getDiscounts());
}
......@@ -357,7 +357,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
ShoppingCartCustomerScoreVo customerScore = shoppingCartGoodsBO.getCustomerScoreVo();
// 积分抵扣
if (customerScore != null){
if (customerScore != null && customerScore.getScoreState() != null){
String msg = "";
// 积分抵扣状态 1积分可用 2积分不足 3 积分抵扣开关禁用 4、订单金额不满足开启积分抵现要求
......@@ -504,8 +504,9 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
}
// 积分抵扣
if(scoreReduceBO != null){
totalAmount -= scoreReduceBO.getDiscountAmount();
totalDiscountAmount -= scoreReduceBO.getDiscountAmount();
int discountAmount = scoreReduceBO.getDiscountAmount() != null ? scoreReduceBO.getDiscountAmount() : 0;
totalAmount -= discountAmount;
totalDiscountAmount -= discountAmount;
ShoppingCartCustomerScoreVo scoreVo = new ShoppingCartCustomerScoreVo();
scoreVo.setCurrentScore(scoreReduceBO.getCurrentScore());
scoreVo.setScoreState(scoreReduceBO.getScoreState());
......@@ -558,7 +559,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
*
*/
public BuyMemberCardBO addNeedCardAmount(ListCartGoodsBO baseRequestDTO) {
BuyMemberCardBO buyMemberCardBO = new BuyMemberCardBO();
BuyMemberCardBO buyMemberCardBO = null;
ShoppingCartInfoRequestVo.BuyMemberCard buyMemberCard = baseRequestDTO.getBuyMemberCard();
if (baseRequestDTO.getBuyMemberCard() == null || StringUtils.isEmpty(buyMemberCard.getPaidId()) || StringUtils.isEmpty(buyMemberCard.getRuleId())) {
return buyMemberCardBO;
......
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