|
|
@ -392,9 +392,13 @@ public class LaborEducationServiceImpl implements LaborEducationService {
|
|
|
|
studentScores.putIfAbsent(studentKey, new HashMap<>());
|
|
|
|
studentScores.putIfAbsent(studentKey, new HashMap<>());
|
|
|
|
Map<String, Integer> studentScoreMap = studentScores.get(studentKey);
|
|
|
|
Map<String, Integer> studentScoreMap = studentScores.get(studentKey);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 计分
|
|
|
|
// 计分
|
|
|
|
// 计分
|
|
|
|
int score = isPraise ? 1 : -1;
|
|
|
|
int score = isPraise ? 1 : -1;
|
|
|
|
int currentScore = studentScoreMap.getOrDefault(knowledgeBlock, 0) + score;
|
|
|
|
int currentScore = studentScoreMap.getOrDefault(knowledgeBlock, 0) + score;
|
|
|
|
|
|
|
|
if (currentScore < 0) {
|
|
|
|
|
|
|
|
currentScore = 0; // 或者你可以设置为其他最小允许的分数
|
|
|
|
|
|
|
|
}
|
|
|
|
studentScoreMap.put(knowledgeBlock, currentScore);
|
|
|
|
studentScoreMap.put(knowledgeBlock, currentScore);
|
|
|
|
|
|
|
|
|
|
|
|
// 存储每个学生的评价记录
|
|
|
|
// 存储每个学生的评价记录
|
|
|
|