Pu Zhibing
15 小时以前 c05a14bba4b86d83918d7cdc01635785bf5694c2
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java
@@ -62,7 +62,7 @@
    @Override
    public List<TAccountingStrategyDetailVO> queryAccountingStrategyDetailByStrategyId(Integer strategyId) {
        List<TAccountingStrategyDetailVO> tAccountingStrategyDetailVOS = this.baseMapper.queryAccountingStrategyDetailByStrategyId(strategyId);
        Long userId = tokenService.getLoginUser().getUserid();
        Long userId = tokenService.getLoginUserApplet().getUserId();
        TAppUser appUser = appUserClient.getUserById(userId).getData();
        for (TAccountingStrategyDetailVO tAccountingStrategyDetailVO : tAccountingStrategyDetailVOS) {
            GetAppUserVipDetail getAppUserVipDetail = new GetAppUserVipDetail();
@@ -73,10 +73,17 @@
            if(Objects.nonNull(data1)){
                String vipJson = data1.getVipJson();
                TVip vip = JSON.parseObject(vipJson, TVip.class);
                tAccountingStrategyDetailVO.setDiscount(vip.getDiscount().divide(new BigDecimal(10)));
                if(Objects.nonNull(vip) && vip.getType() == 2){
                    tAccountingStrategyDetailVO.setDiscount(vip.getDiscount().divide(new BigDecimal(10)));
                }
            }
        }
        return tAccountingStrategyDetailVOS;
    }
    @Override
    public List<TAccountingStrategyDetailVO> queryMangementAccountingStrategyDetailByStrategyId(Integer strategyId) {
        return this.baseMapper.queryAccountingStrategyDetailByStrategyId(strategyId);
    }
    @Override
@@ -169,13 +176,13 @@
        }
        // 查询最高折扣的会员
        TVip monthlyCardDiscount = vipClient.getVipInfoByType(3).getData();
        strategyPriceVO.setServiceFeeDiscount(monthlyCardDiscount.getMonthlyCardDiscount());
        strategyPriceVO.setServiceFeeDiscount(null == monthlyCardDiscount ? new BigDecimal(10) : monthlyCardDiscount.getMonthlyCardDiscount());
        // 查询最高优惠的会员
        TVip maximumDeduction = vipClient.getVipInfoByType(1).getData();
        strategyPriceVO.setMaxDiscountAmount(maximumDeduction.getMaximumDeduction());
        strategyPriceVO.setMaxDiscountAmount(null == maximumDeduction ? new BigDecimal(10) : maximumDeduction.getMaximumDeduction());
        // 查询最低起步价会员
        TVip monthlyCard = vipClient.getVipInfoByType(2).getData();
        strategyPriceVO.setVipStartPrice(monthlyCard.getMonthlyCard());
        strategyPriceVO.setVipStartPrice(null == monthlyCard ? new BigDecimal(10) : monthlyCard.getMonthlyCard());
        // 模板折扣
        strategyPriceVO.setDiscount(accountingStrategy.getDiscount());
        return strategyPriceVO;