Bläddra i källkod

Integer to long

wfansh 6 dagar sedan
förälder
incheckning
47ab1cb4bd

+ 4 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/dmp/service/impl/GADailyReportServiceImpl.java

@@ -106,7 +106,7 @@ public class GADailyReportServiceImpl extends ServiceImpl<GADailyReportMapper, G
                 });
 
         // 3. 询盘数据补充
-        List<Pair<String, Integer>> enquiryDailyCounts =
+        List<Pair<String, Long>> enquiryDailyCounts =
                 adwebEnquiryMapper.getEnquiryDailyCounts(siteCode, start, end);
         enquiryDailyCounts.stream()
                 .filter(enquiryDailyCount -> dailyStatsVOs.containsKey(enquiryDailyCount.getKey()))
@@ -114,7 +114,7 @@ public class GADailyReportServiceImpl extends ServiceImpl<GADailyReportMapper, G
                         enquiryDailyCount ->
                                 dailyStatsVOs
                                         .get(enquiryDailyCount.getKey())
-                                        .setEnquires(enquiryDailyCount.getValue())); // 返回值可能为Long型
+                                        .setEnquires(enquiryDailyCount.getValue().intValue()));
 
         // 3. 根据日期排序并返回
         return dailyStatsVOs.values().stream()
@@ -160,6 +160,7 @@ public class GADailyReportServiceImpl extends ServiceImpl<GADailyReportMapper, G
                             2));
         }
 
-        return periodicStatsVOs.values().stream().collect(Collectors.toList());
+        return periodicStatsVOs.values().stream()
+                .collect(Collectors.toList()); // 使用toList()方法返回UnmodifiableList,导致Redis类型解析异常
     }
 }

+ 1 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/mapper/AdwebEnquiryMapper.java

@@ -76,7 +76,7 @@ public interface AdwebEnquiryMapper extends BaseMapper<AdwebEnquiry> {
      * @param end
      * @return
      */
-    List<Pair<String, Integer>> getEnquiryDailyCounts(String siteCode, Date start, Date end);
+    List<Pair<String, Long>> getEnquiryDailyCounts(String siteCode, Date start, Date end);
 
     /**
      * 获取分时间段的询盘数量 - - 今天,昨天,本周,上周,本月,上月,全部