puzhibing
2026-08-18 0cc47a51f964524ffef0d5d9b87a0f87bb465870
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -304,12 +304,12 @@
            chargingUsersByDay.computeIfAbsent(agg.getStatDay(), key -> new HashSet<>()).add(agg.getAppUserId());
        }
        Map<LocalDate, Long> newUsersByDay = new LinkedHashMap<>();
        if (range != null && range[0] != null && range[1] != null) {
            List<FranchiseeNewUserStat> newUserStats = chargingOrderMapper.franchiseeNewUserStats(range[0], range[1]);
            if (newUserStats != null) {
                for (FranchiseeNewUserStat stat : newUserStats) {
                    if (stat != null && stat.getStatDay() != null && stat.getUserCount() != null) {
                        newUsersByDay.put(stat.getStatDay(), stat.getUserCount());
        if (siteIds != null && !siteIds.isEmpty() && range != null && range[0] != null && range[1] != null) {
            List<FranchiseeUserFirstCharge> firstCharges = chargingOrderMapper.franchiseeUserFirstChargedDays(siteIds, range[0], range[1]);
            if (firstCharges != null) {
                for (FranchiseeUserFirstCharge fc : firstCharges) {
                    if (fc != null && fc.getAppUserId() != null && fc.getFirstChargedDay() != null) {
                        newUsersByDay.merge(fc.getFirstChargedDay(), 1L, Long::sum);
                    }
                }
            }