fix: 修复积分消耗趋势图表数据源,使用score字段替代scoreReward

This commit is contained in:
Your Name 2026-01-19 19:19:40 +08:00
parent 53187071d5
commit b58efbdbe5

View File

@ -293,8 +293,9 @@ public class AnalyticsService {
.filter(t -> "completed".equals(t.getStatus()))
.count();
// 使用 score 字段(预估积分)作为积分消耗,因为 scoreReward 字段未被使用
BigDecimal scoreUsed = dateTasks.stream()
.map(Task::getScoreReward)
.map(Task::getScore)
.filter(Objects::nonNull)
.reduce(BigDecimal.ZERO, BigDecimal::add);