无关风月
2024-10-23 3dbb04b1f0d75ee66745ea404bbcef102dda0781
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile
10个文件已修改
217 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/VipInfoDto.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppCouponController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/TAppUserServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderDto.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/VipInfoDto.java
@@ -42,4 +42,5 @@
    @ApiModelProperty(value = "会员名称")
    private String name;
    private Integer type;
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppCouponController.java
@@ -109,7 +109,7 @@
        TChargingPile chargingPile = chargingPileClient.getChargingPileById(chargingGun.getChargingPileId()).getData();
        SiteInfoVO data = chargingPileClient.getSiteInfoByNumber1(chargingPile.getCode().toString()).getData();
        data.setChargingGunId(id);
        data.setSiteId(chargingGun.getId());
        data.setSiteId(chargingGun.getSiteId());
        data.setChargeMode(chargingGun.getChargeMode());
        List<TAppUserCar> cars = appUserCarService.list(new QueryWrapper<TAppUserCar>()
                .eq("app_user_id",tokenService.getLoginUserApplet().getUserId())
@@ -225,7 +225,9 @@
     */
    @PostMapping("/grantCoupon")
    public R  grantCoupon(@RequestBody GrantCouponDto dto){
        if (dto.getWaysToObtain()==null){
        dto.setWaysToObtain(3);
        }
        List<TAppCoupon> res = new ArrayList<>();
        TCoupon coupon = otherClient.getCouponById(dto.getCouponId()).getData();
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
@@ -332,6 +332,13 @@
            appUser.setLastDays( Duration.between(LocalDateTime.now(), appUser.getVipEndTime()).toDays());
            appUser.setUid(appUser.getId().toString());
            TAppUserCar one1 = appUserCarService.lambdaQuery().eq(TAppUserCar::getAppUserId, appUser.getId()).orderByDesc(BasePojo::getCreateTime).last("limit 1").one();
            if (one1!=null){
                CarNumDto carNumDto = CarUtil.carNum(one1.getLicensePlate());
                appUser.setPlace(carNumDto.getProvince()+carNumDto.getCity());
            }
        }
        return R.ok(page);
    }
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/TAppUserServiceImpl.java
@@ -54,6 +54,7 @@
            if(Objects.isNull(appUser)){
                appUser = new TAppUser();
                appUser.setPhone(appletUserDecodeData.getPhoneNumber());
                appUser.setInviteUserId(inviteUserId);
            }
        }
        if(Objects.nonNull(appUser.getStatus())){
@@ -68,14 +69,15 @@
                    break;
            }
        }
        appUser.setInviteUserId(inviteUserId);
        appUser.setAvatar(appletUserDecodeData.getAvatarUrl());
        appUser.setCity(appletUserDecodeData.getCity());
        appUser.setName(appletUserDecodeData.getNickName());
        appUser.setProvince(appletUserDecodeData.getProvince());
        appUser.setWxOpenid(appletUserDecodeData.getOpenId());
        this.saveOrUpdate(appUser);
        if(Objects.nonNull(inviteUserId)){
        inviteUserService.saveInviteUser(appUser.getId(), inviteUserId);
        }
        return this.getUserInfo(appUser);
    }
@@ -95,6 +97,7 @@
            if(Objects.isNull(appUser)){
                appUser = new TAppUser();
                appUser.setPhone(phone);
                appUser.setInviteUserId(inviteUserId);
            }
        }
        if(Objects.nonNull(appUser.getStatus())){
@@ -109,10 +112,11 @@
                    break;
            }
        }
        appUser.setInviteUserId(inviteUserId);
        appUser.setAliOpenid(response.getOpenId());
        this.saveOrUpdate(appUser);
        if(Objects.nonNull(inviteUserId)){
        inviteUserService.saveInviteUser(appUser.getId(), inviteUserId);
        }
        return this.getUserInfo(appUser);
    }
//    @Override
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -635,10 +635,36 @@
        }
        LocalDate sixBefore = PreviousSixMonths.get();
        //通过siteIds进行sql查询统计
        List<SixChargingDto> sixChargingDtos = generateLastSixMonths();
        List<SixChargingDto> chargingDtos = chargingOrderService.charge(sixBefore, siteIds);
        for (SixChargingDto sixChargingDto : sixChargingDtos) {
            for (SixChargingDto chargingDto : chargingDtos) {
                if (sixChargingDto.getMonth().equals(chargingDto.getMonth())){
                    BeanUtils.copyProperties(chargingDto,sixChargingDto);
                }
            }
        return R.ok(chargingDtos);
        }
        return R.ok(sixChargingDtos);
    }
    public static List<SixChargingDto> generateLastSixMonths() {
        LocalDate today = LocalDate.now();
        List<SixChargingDto> months = new ArrayList<>();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM");
        for (int i = 5; i >= 0; i--) {
            LocalDate date = today.minusMonths(i);
            String month = date.format(formatter);
            SixChargingDto sixChargingDto = new SixChargingDto();
            sixChargingDto.setMonth(month);
            months.add(sixChargingDto);
        }
        return months;
    }
    @ResponseBody
@@ -672,7 +698,33 @@
        //count近6个月的数据
        LocalDate sixBefore = PreviousSixMonths.get();
        List<SixShopDto> sixShopDtos =  shoppingOrderService.sixBefore(sixBefore,status);
        return R.ok(sixShopDtos);
        List<SixShopDto> sixChargingDtos = generateLastSixMonths1();
        for (SixShopDto sixChargingDto : sixChargingDtos) {
            for (SixShopDto chargingDto : sixShopDtos) {
                if (sixChargingDto.getMonth().equals(chargingDto.getMonth())){
                    BeanUtils.copyProperties(chargingDto,sixChargingDto);
                }
            }
        }
        return R.ok(sixChargingDtos);
    }
    public static List<SixShopDto> generateLastSixMonths1() {
        LocalDate today = LocalDate.now();
        List<SixShopDto> months = new ArrayList<>();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM");
        for (int i = 5; i >= 0; i--) {
            LocalDate date = today.minusMonths(i);
            String month = date.format(formatter);
            SixShopDto sixChargingDto = new SixShopDto();
            sixChargingDto.setMonth(month);
            months.add(sixChargingDto);
        }
        return months;
    }
    @ResponseBody
@@ -811,7 +863,6 @@
            LocalDate mondayThisWeek = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
            start = statisticsQueryDto.getStartTime();
            end = statisticsQueryDto.getEndTime();
            System.out.println("本周一是: " + mondayThisWeek);
        }
        else if (statisticsQueryDto.getDayType()==3){
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderDto.java
@@ -26,6 +26,7 @@
    private Integer status;
    @ApiModelProperty("订单金额")
    private Double orderAmount;
    private Double rechargeAmount;
    @ApiModelProperty("支付金额")
    private Double paymentAmount;
    @ApiModelProperty("下单时间")
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java
@@ -319,8 +319,9 @@
            chargingBillVO.setBillWeek(billTime.minusMonths(1).format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM")));
            chargingBillListVO.setUid(chargingBillListVO.getId().toString());
            // 根据账单的出账时间 查询上个月的充电订单
            LocalDateTime localDate = chargingBillListVO.getBillTime().minusMonths(1);
//            LocalDateTime localDate = chargingBillListVO.getBillTime().minusMonths(1);
            // todo 临时修改为查询昨天的充电订单
            LocalDateTime localDate = chargingBillListVO.getBillTime().minusDays(1);
            // 账单周期
            chargingBillListVO.setBillWeek(localDate.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM")));
            // 获取 LocalDate 对象
@@ -360,7 +361,7 @@
                if (tChargingOrder.getElectrovalence()!=null){
                    electrovalenceTotal = electrovalenceTotal.add(tChargingOrder.getElectrovalence());
                }
                if (tChargingOrder.getRefundAmount()!=null && tChargingOrder.getRefundStatus() == 2){
                if (tChargingOrder.getRefundAmount()!=null && tChargingOrder.getRefundStatus()!=null&&  tChargingOrder.getRefundStatus()==2){
                    refundAmount = refundAmount.add(tChargingOrder.getRefundAmount());
                }
                // 累加累计服务费
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -889,29 +889,22 @@
        //处理用户标签数据
        List<TUserTag> data = userTagClient.getAllUserTag().getData();
        //累计充电次数
        long count1 = this.count(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getAppUserId, chargingOrder.getAppUserId())
                .eq(TChargingOrder::getRechargePaymentStatus, 2).isNotNull(TChargingOrder::getPaymentAmount).eq(TChargingOrder::getDelFlag, 0));
        List<TUserTag> userTagList1 = data.stream().filter(s -> s.getStandardCondition() == 1).collect(Collectors.toList());
        int old_times = 0;
        Integer userTagId = null;
        for (TUserTag tUserTag : userTagList1) {
            Integer times = JSON.parseObject(tUserTag.getConditions()).getInteger("times");
            //加上本次充电
            //获取最大值标签
            if((count1 + 1) >= times && old_times < times){
                userTagId = tUserTag.getId();
                old_times = times;
            }
        }
        if(null != userTagId){
            TAppUserTag appUserTag = new TAppUserTag();
            appUserTag.setAppUserId(chargingOrder.getAppUserId());
            appUserTag.setUserTagId(userTagId);
            appUserTag.setUserTagId(tUserTag.getId());
            TAppUserTag data1 = appUserTagClient.getUserTag(appUserTag).getData();
            if(null == data1){
            String start = tUserTag.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
            String end = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
            long count1 = this.count(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getAppUserId, chargingOrder.getAppUserId())
                    .eq(TChargingOrder::getRechargePaymentStatus, 2).between(TChargingOrder::getStartTime, start, end).eq(TChargingOrder::getDelFlag, 0));
            if(null == data1 && count1 >= times){
                data1 = new TAppUserTag();
                data1.setAppUserId(chargingOrder.getAppUserId());
                data1.setUserTagId(userTagId);
                data1.setUserTagId(tUserTag.getId());
                data1.setCreateTime(LocalDateTime.now());
                appUserTagClient.addUserTag(data1);
            }
@@ -930,10 +923,9 @@
            endTime.plusDays(day);
            String start = tUserTag.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
            String end = endTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
            count1 = this.count(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getAppUserId, chargingOrder.getAppUserId())
                    .eq(TChargingOrder::getRechargePaymentStatus, 2).isNotNull(TChargingOrder::getPaymentAmount)
                    .between(TChargingOrder::getStartTime, start, end).eq(TChargingOrder::getDelFlag, 0));
            if(null == data1 && (count1 + 1) >= times){
            long count1 = this.count(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getAppUserId, chargingOrder.getAppUserId())
                    .eq(TChargingOrder::getRechargePaymentStatus, 2).between(TChargingOrder::getStartTime, start, end).eq(TChargingOrder::getDelFlag, 0));
            if(null == data1 && count1 >= times){
                data1 = new TAppUserTag();
                data1.setAppUserId(chargingOrder.getAppUserId());
                data1.setUserTagId(tUserTag.getId());
@@ -1166,6 +1158,16 @@
    public R<PageInfo<PayOrderDto>> payOrderQuery(PayOrderQueryDto payOrderQueryDto) {
        PageInfo<PayOrderDto> pageInfo = new PageInfo<>(payOrderQueryDto.getPageCurr(),payOrderQueryDto.getPageSize());
        List<PayOrderDto> list = this.baseMapper.payOrderQuery(pageInfo,payOrderQueryDto);
        for (PayOrderDto payOrderDto : list) {
            if (payOrderDto.getType()==2||payOrderDto.getType()==3){
                payOrderDto.setFinalAmount(payOrderDto.getOrderAmount());
            }
            if (payOrderDto.getType()==1&&payOrderDto.getStatus()==3){
                payOrderDto.setFinalAmount(payOrderDto.getRechargeAmount());
                payOrderDto.setOrderAmount(payOrderDto.getRechargeAmount());
                payOrderDto.setPaymentAmount(payOrderDto.getRechargeAmount());
            }
        }
        pageInfo.setRecords(list);
        return R.ok(pageInfo);
    }
@@ -1977,7 +1979,7 @@
    }
    @Override
    public List<Map<String, Object>> usersByQuery1(ChargingStatisticsQueryDto statisticsQueryDto) {
        return this.baseMapper.usersByQuery(statisticsQueryDto);
        return this.baseMapper.usersByQuery1(statisticsQueryDto);
    }
    @Override
@@ -2041,7 +2043,7 @@
                chargingOrderRefund.setRefundTitle("后台退款");
                chargingOrderRefund.setRefundContent("后台退款");
                chargingOrderRefund.setRefundReason("后台退款");
                chargingOrderRefund.setRefundRemark("后台退款");
                chargingOrderRefund.setRefundRemark(payOrderQueryDto.getRemark());
                chargingOrderRefund.setRefundTotalAmount(tChargingOrder.getRefundAmount().add(payOrderQueryDto.getRefundAmount()));
                chargingOrderRefund.setPayAmount(tChargingOrder.getPaymentAmount());
@@ -2102,7 +2104,7 @@
                chargingOrderRefund.setRefundTitle("后台退款");
                chargingOrderRefund.setRefundContent("后台退款");
                chargingOrderRefund.setRefundReason("后台退款");
                chargingOrderRefund.setRefundRemark("后台退款");
                chargingOrderRefund.setRefundRemark(payOrderQueryDto.getRemark());
                chargingOrderRefund.setRefundTotalAmount(tChargingOrder.getRefundAmount().add(payOrderQueryDto.getRefundAmount()));
                chargingOrderRefund.setPayAmount(tChargingOrder.getPaymentAmount());
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -121,6 +121,7 @@
        title,
        `status`,
        order_amount,
        recharge_amount,
        payment_amount ,
        create_time,
        end_time,
@@ -381,7 +382,7 @@
            type,
            SUM( charging_capacity ) as charging_capacity ,
            SUM( period_service_price ) as period_electric_price,
            SUM(period_electric_price+period_service_price) as total_amount
            SUM(period_electric_price) as total_amount
        FROM
            t_charging_order_accounting_strategy
        <where>
@@ -398,9 +399,9 @@
    <select id="getDateData" resultType="java.util.Map">
        SELECT
            DATE_FORMAT( create_time, '%Y-%m-%d %H' ) as time,
    SUM(service_charge) as servicecharge,
    SUM(electrovalence) as electrovalence,
    SUM(payment_amount) AS paymentAmount,
        CAST(SUM(service_charge-coupon_discount_amount) AS DECIMAL(20, 6)) as  servicecharge,
        CAST(SUM(charging_capacity) AS DECIMAL(20, 6)) as electrovalence,
        CAST(SUM(electrovalence) AS DECIMAL(20, 4)) AS paymentAmount,
    count(1) as orderCount
        FROM
            t_charging_order
@@ -422,9 +423,9 @@
    <select id="getWeekData" resultType="java.util.Map">
        SELECT
        DATE_FORMAT( create_time, '%Y-%m-%d' ) as time,
        SUM(service_charge) as servicecharge,
        SUM(electrovalence) as electrovalence,
        SUM(payment_amount) AS paymentAmount,
        SUM(service_charge-coupon_discount_amount) as servicecharge,
        SUM(charging_capacity) as electrovalence,
        SUM(electrovalence) AS paymentAmount,
        count(1) as orderCount
        FROM
        t_charging_order
@@ -446,9 +447,9 @@
    <select id="getMonthData" resultType="java.util.Map">
        SELECT
        DATE_FORMAT( create_time, '%Y-%m-%d' ) as time,
        SUM(service_charge) as servicecharge,
        SUM(electrovalence) as electrovalence,
        SUM(payment_amount) AS paymentAmount,
        SUM(service_charge-coupon_discount_amount) as servicecharge,
        SUM(charging_capacity) as electrovalence,
        SUM(electrovalence) AS paymentAmount,
        count(1) as orderCount
        FROM
        t_charging_order
@@ -470,9 +471,9 @@
    <select id="getYearData" resultType="java.util.Map">
        SELECT
        DATE_FORMAT( create_time, '%Y-%m-%d' ) as time,
        SUM(service_charge) as servicecharge,
        SUM(electrovalence) as electrovalence,
        SUM(payment_amount) AS paymentAmount,
        SUM(service_charge-coupon_discount_amount) as servicecharge,
        SUM(charging_capacity) as electrovalence,
        SUM(electrovalence) AS paymentAmount,
        count(1) as orderCount
        FROM
@@ -496,8 +497,8 @@
    <select id="getByDate" resultType="java.util.Map">
        SELECT
        DATE_FORMAT( create_time, '%Y-%m-%d' ) as time,
        SUM(service_charge) as servicecharge,
        SUM(electrovalence) as electrovalence,
        SUM(service_charge-coupon_discount_amount) as servicecharge,
        SUM(charging_capacity) as electrovalence,
        count(1) as orderCount
        FROM
        t_charging_order
@@ -564,11 +565,11 @@
    </select>
    <select id="queryPowerLevel" resultType="java.util.Map">
        SELECT
            count(CASE WHEN power BETWEEN 0 AND 30 THEN 1 ELSE 0 END) AS count_0_30,
            count(CASE WHEN power BETWEEN 31 AND 60 THEN 1 ELSE 0 END) AS count_31_60,
            count(CASE WHEN power BETWEEN 61 AND 120 THEN 1 ELSE 0 END) AS count_61_120,
            count(CASE WHEN power BETWEEN 121 AND 300 THEN 1 ELSE 0 END) AS count_121_300,
            count(CASE WHEN power > 300 THEN 1 ELSE 0 END) AS count_above_300
        SUM(CASE WHEN power BETWEEN 0 AND 30 THEN 1 ELSE 0 END) AS count_0_30,
        SUM(CASE WHEN power BETWEEN 31 AND 60 THEN 1 ELSE 0 END) AS count_31_60,
        SUM(CASE WHEN power BETWEEN 61 AND 120 THEN 1 ELSE 0 END) AS count_61_120,
        SUM(CASE WHEN power BETWEEN 121 AND 300 THEN 1 ELSE 0 END) AS count_121_300,
        SUM(CASE WHEN power > 300 THEN 1 ELSE 0 END) AS count_above_300
        FROM
            t_charging_order
        WHERE
@@ -580,25 +581,25 @@
                #{siteId}
            </foreach>
        </if>
        <if test="statisticsQueryDto.dayType =1">
        <if test="statisticsQueryDto.dayType ==1">
            AND DATE(create_time) = CURDATE()
        </if>
        <if test="statisticsQueryDto.dayType =2">
        <if test="statisticsQueryDto.dayType ==2">
            AND WEEKOFYEAR(create_time) = WEEKOFYEAR(CURDATE())
        </if>
        <if test="statisticsQueryDto.dayType =3">
        <if test="statisticsQueryDto.dayType ==3">
            AND MONTH(create_time) = MONTH(CURDATE())
        </if>
        <if test="statisticsQueryDto.dayType =4">
        <if test="statisticsQueryDto.dayType ==4">
           AND YEAR(create_time) = YEAR(CURDATE())
        </if>
        <if test="statisticsQueryDto.dayType =5">
        <if test="statisticsQueryDto.startTime != null">
        <if test="statisticsQueryDto.dayType ==5">
            AND create_time >= #{statisticsQueryDto.startTime}
        </if>
        <if test="statisticsQueryDto.endTime != null">
            AND create_time &lt;= #{statisticsQueryDto.endTime}
        </if>
        </if>
    </select>
@@ -606,7 +607,7 @@
        SELECT
            DATE_FORMAT( create_time, '%Y-%m-%d %H' ) AS time,
            DATE_FORMAT( create_time, '%H:00' ) AS time,
    count(1) AS counts
        FROM
            charging_pile_account.t_app_user
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java
@@ -2,11 +2,15 @@
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.account.api.dto.SendCouponDto;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.feignClient.AppUserVipDetailClient;
import com.ruoyi.account.api.model.TAppUser;
import com.ruoyi.account.api.model.TAppUserVipDetail;
import com.ruoyi.account.api.vo.GetAppUserVipDetail;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.BasePage;
@@ -222,6 +226,9 @@
    @Resource
    private AppUserClient appUserClient;
    @Resource
    private AppUserVipDetailClient vipDetailClient;
    @ApiOperation(value = "当前生效会员信息", tags = {"小程序-个人中心"})
    @GetMapping("/recent/vipInfo")
    public R<List<VipInfoDto>> recentVipInfo() {
@@ -230,7 +237,17 @@
       if (data.getVipEndTime()!=null&&data.getVipEndTime().isAfter(LocalDateTime.now())) {
           List<VipInfoDto> vipInfoDtos = new ArrayList<>();
           List<TVip> vips = vipService.lambdaQuery().eq(TVip::getId, data.getVipId()).list();
//           List<TVip> vips = vipService.lambdaQuery().eq(TVip::getId, data.getVipId()).list();
           List<TVip> vips = new ArrayList<>();
           GetAppUserVipDetail getAppUserVipDetail = new GetAppUserVipDetail();
           getAppUserVipDetail.setAppUserId(userId);
           getAppUserVipDetail.setVipId(data.getVipId());
           R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail);
           TAppUserVipDetail data1 = appUserVipDetail.getData();
           String vipJson = data1.getVipJson();
           TVip tVip = JSON.parseObject(vipJson, TVip.class);
           vips.add(tVip);
           LocalDateTime now = LocalDateTime.now();
           for (TVip vip : vips) {
               VipInfoDto vipInfoDto = new VipInfoDto();
@@ -255,6 +272,7 @@
               vipInfoDto.setMallExclusivePrice(vip.getMallExclusivePrice());
               vipInfoDto.setName(vip.getName());
               vipInfoDto.setId(vip.getId());
               if (vip.getCoupon()!=null) {
               List<SendCouponDto> javaList = JSON.parseArray(vip.getCoupon()).toJavaList(SendCouponDto.class);
               List<VipCouponDto> vipCouponDtos = new ArrayList<>();
               if (!javaList.isEmpty()) {
@@ -280,9 +298,14 @@
                       total.add(tCoupon.getDiscountAmount());
                   }
               }
               vipInfoDto.setTotalDiscount(total);
               vipInfoDto.setTimeAmount(vip.getMaximumDeduction().multiply(BigDecimal.valueOf(vip.getDiscountTimes())));
               }
               vipInfoDto.setType(vip.getType());
               vipInfoDtos.add(vipInfoDto);
           }
           return R.ok(vipInfoDtos);