【修改】mysql判分用云服务器,字符集设置为统一uft8
This commit is contained in:
@@ -129,8 +129,19 @@ public class EducationPaperServiceImpl implements IEducationPaperService
|
||||
List<EducationPaperScheme> educationPaperSchemeList= educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskid);
|
||||
for (int i = 0; i <num ; i++) {
|
||||
List<String> examQuestionIds = new ArrayList<>();
|
||||
int totalScore = 0;
|
||||
//第i张卷子
|
||||
for (EducationPaperScheme educationPaperScheme : educationPaperSchemeList) {
|
||||
|
||||
|
||||
try {
|
||||
totalScore += Integer.parseInt(educationPaperScheme.getSubtotalScore());
|
||||
} catch (NumberFormatException e) {
|
||||
// 非数字按 0 处理
|
||||
totalScore += 0;
|
||||
// 可选:记录日志(避免静默忽略)
|
||||
throw new RuntimeException("非数字 subtotal_score: {}"+ educationPaperScheme.getSubtotalScore());
|
||||
}
|
||||
//获取试卷方案对象
|
||||
String pointNames = educationPaperScheme.getPointNames();
|
||||
//知识点id
|
||||
@@ -170,6 +181,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService
|
||||
EducationPaper educationPaper =new EducationPaper();
|
||||
String uuid = IdUtils.simpleUUID();
|
||||
educationPaper.setPaperId(uuid);
|
||||
educationPaper.setPaperScore(String.valueOf(totalScore));
|
||||
educationPaper.setTaskId(taskid);
|
||||
educationPaper.setNum(formattedNumber);
|
||||
educationPaper.setTenantId(TenantContextHolder.getRequiredTenantId());
|
||||
|
Reference in New Issue
Block a user