|
|
@@ -349,7 +349,7 @@ public class ClaudeServiceImpl implements ClaudeService {
|
|
|
|
|
|
// 清理旧数据和重新计算评分
|
|
|
public void cleanupOldExperiencesAndRecalculateScore(String carId, long currentTimestamp) {
|
|
|
- long threeHoursAgo = currentTimestamp - (3 * 60 * 60 * 1000); // 3小时前的时间戳
|
|
|
+ long threeHoursAgo = currentTimestamp - (6 * 60 * 60 * 1000); // 3小时前的时间戳
|
|
|
|
|
|
// 清理高级体验旧数据
|
|
|
redisService.zRemoveRangeByScore(RedisService.key.CLAUDE_CAR_CHAT.getName() + carId, 0, threeHoursAgo);
|
|
|
@@ -362,7 +362,7 @@ public class ClaudeServiceImpl implements ClaudeService {
|
|
|
// 重新计算指定车队的评分
|
|
|
private void recalculateScore(String carId, long currentTimestamp) {
|
|
|
// 实际应用中,你需要根据高级体验和低级体验的数量重新计算得分
|
|
|
- double highExperienceScore = (double) redisService.zCount(RedisService.key.CLAUDE_CAR_CHAT.getName() + carId, currentTimestamp - (3 * 60 * 60 * 1000), currentTimestamp) * 2;
|
|
|
+ double highExperienceScore = (double) redisService.zCount(RedisService.key.CLAUDE_CAR_CHAT.getName() + carId, currentTimestamp - (6 * 60 * 60 * 1000), currentTimestamp) * 2;
|
|
|
redisService.zAdd(RedisService.key.CLAUDE_CAR_SCORES.getName(), highExperienceScore, carId);
|
|
|
}
|
|
|
|