xiaoyong931011
2023-03-17 2cb25f9207a432a01b72b32b3b5ab8fc7e00da5a
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -854,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(
@@ -868,6 +870,10 @@
                if(starGet.compareTo(star) <= 0){
                    throw new FebsException("无法购买套餐");
                }
                BigDecimal prizeScore = mallMemberWallet.getPrizeScore();
                if(prizeScore.compareTo(score) < 0){
                    throw new FebsException("积分不足");
                }
            }
        }
        /**
@@ -881,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));