puzhibing
2026-07-30 df04b62bab37455bd549f670cd47b25f7728e889
修改bug
4个文件已修改
32 ■■■■■ 已修改文件
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/config/log/FeignLoggingAspect.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxAbstractPay.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java
@@ -1,7 +1,6 @@
package com.ruoyi.chargingPile.service.impl;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.feignClient.AppUserVipDetailClient;
@@ -203,16 +202,22 @@
    @Override
    public Boolean isStrategyPriceConsistent(List<TAccountingStrategyDetail> accountingStrategyDetails) {
        Map<Integer, BigDecimal> phaseToElectrovalence = new HashMap<>();
        Map<Integer, BigDecimal> phaseToServiceFee = new HashMap<>();
        Map<Integer, BigDecimal> phaseToCostServiceFee = new HashMap<>();
        for (TAccountingStrategyDetail detail : accountingStrategyDetails) {
            Integer type = detail.getType();
            BigDecimal electrovalence = detail.getElectrovalence();
            BigDecimal serviceFee = detail.getServiceCharge();
            BigDecimal costServiceCharge = detail.getCostServiceCharge();
            if (phaseToServiceFee.containsKey(type)) {
                BigDecimal existingElectrovalence = phaseToElectrovalence.get(type);
                BigDecimal existingFee = phaseToServiceFee.get(type);
                BigDecimal existingCostServiceCharge = phaseToCostServiceFee.get(type);
                if (existingElectrovalence.compareTo(electrovalence) != 0) {
                    return false; // 发现不一致的电价
                }
                if (existingFee.compareTo(serviceFee) != 0) {
                    return false; // 发现不一致的服务费
                }
@@ -220,11 +225,12 @@
                    return false; // 发现不一致的原价服务费
                }
            } else {
                phaseToElectrovalence.put(type, electrovalence);
                phaseToServiceFee.put(type, serviceFee);
                phaseToCostServiceFee.put(type, costServiceCharge);
            }
        }
        return true; // 所有相同阶段的服务费一致
        return true; // 所有相同阶段的电价、服务费均一致
    }
    @Override
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/config/log/FeignLoggingAspect.java
@@ -6,6 +6,7 @@
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.MDC;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@@ -67,7 +68,7 @@
            return result;
        } catch (Throwable ex) {
            long elapsed = System.currentTimeMillis() - start;
            log.error("[Feign] <<< 调用异常 | method={} | elapsed={}ms | error={} | args={}",
            log.info("[Feign] <<< 调用异常 | method={} | elapsed={}ms | error={} | args={}",
                    fullMethod, elapsed, ex.getMessage(), argsJson, ex);
            throw ex;
        }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -1972,14 +1972,11 @@
        List<Integer> siteIds = dto.getSiteIds();
        List<ChargingOrderVO> list = this.baseMapper.chargingOrder(pageInfo, dto, startTime1, startTime2, endTime1, endTime2);
        fillChargingOrderBalanceIncome(list);
        List<TChargingOrderAccountingStrategy> list3 = null;
        if (null != startTime1) {
        List<Long> collect = list.stream().map(ChargingOrderVO::getId).collect(Collectors.toList());
        List<TChargingOrderAccountingStrategy> list3 = new ArrayList<>();
        if (!collect.isEmpty()) {
            list3 = chargingOrderAccountingStrategyService.list(new LambdaQueryWrapper<TChargingOrderAccountingStrategy>()
                    .between(null != startTime1, TChargingOrderAccountingStrategy::getCreateTime, startTime1, startTime2));
        }
        if (null != endTime1) {
            list3 = chargingOrderAccountingStrategyService.list(new LambdaQueryWrapper<TChargingOrderAccountingStrategy>()
                    .between(null != startTime1, TChargingOrderAccountingStrategy::getCreateTime, endTime1, endTime2));
                    .in(TChargingOrderAccountingStrategy::getChargingOrderId, collect));
        }
        for (ChargingOrderVO chargingOrderVO : list) {
            if (roleType == 2) {
@@ -3087,7 +3084,7 @@
                //获取订单的计费策略
                List<AccountingStrategyDetailOrder> accountingStrategyDetailOrderList = accountingStrategyDetailOrderClient.getAllAccountingStrategyDetailOrder(chargingOrder.getId()).getData();
                if (accountingStrategyDetailOrderList.isEmpty()) {
                if (null == accountingStrategyDetailOrderList || accountingStrategyDetailOrderList.isEmpty()) {
                    return R.fail("计费策略为空,无法计算费用");
                }
                accountingStrategyDetailOrderList.get(accountingStrategyDetailOrderList.size() - 1).setEndTime("23:59");
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxAbstractPay.java
@@ -306,12 +306,6 @@
                WxUtils.error("failed,resp code = {},return body = {}", statusCode, respBodyStr);
                throw new RuntimeException(respBodyStr);
            }
        } catch (ConnectTimeoutException e) {
            e.printStackTrace();
            throw new RuntimeException("接口超时");
        } catch (SocketTimeoutException e) {
            e.printStackTrace();
            throw new RuntimeException("读取接口数据超时");
        } catch (IOException e) {
            e.printStackTrace();
            throw new RuntimeException("接口请求失败,请尝试检查网络环境或请求接口是否能正常访问");