|
@@ -84,9 +84,15 @@ public class ScoreService implements ApplicationContextAware {
|
|
|
try {
|
|
try {
|
|
|
List<Score> data = f.get();
|
|
List<Score> data = f.get();
|
|
|
for (Score score : data) {
|
|
for (Score score : data) {
|
|
|
|
|
+ Double scoreValue = score.getScore();
|
|
|
|
|
+ if (scoreValue == null || Double.isNaN(scoreValue) || Double.isInfinite(scoreValue)) {
|
|
|
|
|
+ log.warn("Invalid score detected: strategy={}, contentId={}, score={}",
|
|
|
|
|
+ score.getStrategy(), score.getContentId(), scoreValue);
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
Map<String, Double> map
|
|
Map<String, Double> map
|
|
|
= scoreMap.computeIfAbsent(score.getContentId(), k -> new HashMap<>());
|
|
= scoreMap.computeIfAbsent(score.getContentId(), k -> new HashMap<>());
|
|
|
- map.put(score.getStrategy(), score.getScore());
|
|
|
|
|
|
|
+ map.put(score.getStrategy(), scoreValue);
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("future get error ", e);
|
|
log.error("future get error ", e);
|