fix
Hentua
2023-04-23 c690f01658a81a8b843fbacd9405e83d83c9aee3
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -700,16 +700,11 @@
            if(ObjectUtil.isEmpty(mallGoods)){
                throw new FebsException("商品已更新,请重新下单");
            }
            /**
             * 贡献点判断
            /*
            获取单个商品的折扣积分数量
                = 现价 * 数量 * 折扣现金比例
             */
            if (mallGoods.getIsNormal() == 2) {
                hasTc = true;
            }
                /*
                获取单个商品的折扣积分数量
                    = 现价 * 数量 * 折扣现金比例
                 */
            BigDecimal scorePercent = new BigDecimal(mallGoods.getScorePercent()).multiply(new BigDecimal(0.01));
            BigDecimal amount = sku.getPresentPrice().multiply(BigDecimal.valueOf(item.getCnt())).multiply(scorePercent);
            total = total.add(amount);
@@ -722,20 +717,7 @@
        if(prizeScore.compareTo(score) < 0){
            throw new FebsException("积分不足");
        }
        if(hasTc){
            //系统设置的个人贡献点最大值
            DataDictionaryCustom starGetDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                    DataDictionaryEnum.STAR_GET.getType(),
                    DataDictionaryEnum.STAR_GET.getCode());
            if(ObjectUtil.isNotEmpty(starGetDic)){
                String starGetStr = StrUtil.isEmpty(starGetDic.getValue()) ? "0" : starGetDic.getValue();
                BigDecimal starGet = new BigDecimal(starGetStr);
                BigDecimal star = new BigDecimal(mallMemberWallet.getStar());
                if(starGet.compareTo(BigDecimal.ZERO) != 0 && starGet.compareTo(star) <= 0){
                    throw new FebsException("无法购买套餐");
                }
            }
        }
        /**
         * 使用积分折扣现金
         */