xiaoyong931011
2023-03-17 2cb25f9207a432a01b72b32b3b5ab8fc7e00da5a
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -351,7 +351,8 @@
                changeWallet(orderInfo.getId());
                //发送补贴消息
                agentProducer.sendPerkMoneyMsg(orderInfo.getId());
//                agentProducer.sendOrderReturn(orderInfo.getId());
                //发送代理自动升级消息
                agentProducer.sendAutoLevelUpMsg(member.getId());
                break;
            case "4":
                if (orderInfo.getOrderType() != 2) {
@@ -853,6 +854,8 @@
                BigDecimal amount = sku.getPresentPrice().multiply(BigDecimal.valueOf(item.getCnt()));
                total = total.add(amount);
        }
        BigDecimal score = ObjectUtil.isEmpty(addOrderDto.getScore()) ? BigDecimal.ZERO : addOrderDto.getScore();
        if(hasTc){
            //系统设置的个人贡献点最大值
            DataDictionaryCustom starGetDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
@@ -867,6 +870,10 @@
                if(starGet.compareTo(star) <= 0){
                    throw new FebsException("无法购买套餐");
                }
                BigDecimal prizeScore = mallMemberWallet.getPrizeScore();
                if(prizeScore.compareTo(score) < 0){
                    throw new FebsException("积分不足");
                }
            }
        }
        /**
@@ -880,7 +887,7 @@
                DataDictionaryEnum.SCORE_CHANGE.getType(),
                DataDictionaryEnum.SCORE_CHANGE.getCode()
        );
        BigDecimal score = ObjectUtil.isEmpty(addOrderDto.getScore()) ? BigDecimal.ZERO : addOrderDto.getScore();
        if(ObjectUtil.isNotEmpty(scorePercentDic)){
            //商品的现金折扣比例
            BigDecimal scorePercent = new BigDecimal(scorePercentDic.getValue()).multiply(BigDecimal.valueOf(0.01));