wukai il y a 7 mois
Parent
commit
2e975ef0a1
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      jjt-biz/src/main/java/com/jjt/biz/util/DataUtil.java

+ 1 - 1
jjt-biz/src/main/java/com/jjt/biz/util/DataUtil.java

@@ -95,7 +95,7 @@ public class DataUtil {
             Map<Date, Float> timeScoreMap = new HashMap<>();
             List<Map<String, Object>> trendList = (List<Map<String, Object>>) map.get("data");
             List<Map<String, Object>> newTrend = new ArrayList<>();
-            Map<Date, Float> map1 = trendList.stream().collect(Collectors.toMap(mp -> (Date) mp.get("time"), mp -> (Float) mp.get("value")));
+            Map<Date, Float> map1 = trendList.stream().collect(Collectors.toMap(mp -> (Date) mp.get("time"), mp -> (Float) mp.get("value"), (existing, replace) -> existing));
             for (Date d : map1.keySet()) {
                 timeScoreMap.put(d, map1.get(d));
             }