|
@@ -347,10 +347,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
examStudentService.saveOrUpdate(examStudent);
|
|
|
//上传个人试卷结构
|
|
|
ExamStudentPaperStructCacheBean struct = (ExamStudentPaperStructCacheBean) redisUtil.get(RedisKeyHelper.studentPaperStructKey(recordId));
|
|
|
- File structFile = new File(dir + "struct.json");
|
|
|
- FileUtil.saveAsFile(structFile.getAbsolutePath(), struct.getContent());
|
|
|
- SystemConfig systemConfig = SpringContextHolder.getBean(SystemConfig.class);
|
|
|
- OssUtil.ossUpload(systemConfig.getOssEnv(3), structFilePath, structFile);
|
|
|
+ if(struct!=null) {
|
|
|
+ File structFile = new File(dir + "struct.json");
|
|
|
+ FileUtil.saveAsFile(structFile.getAbsolutePath(), struct.getContent());
|
|
|
+ SystemConfig systemConfig = SpringContextHolder.getBean(SystemConfig.class);
|
|
|
+ OssUtil.ossUpload(systemConfig.getOssEnv(3), structFilePath, structFile);
|
|
|
+ }
|
|
|
} finally {
|
|
|
FileUtil.deleteFolder(dir);
|
|
|
}
|