瀏覽代碼

3.2.0-下载bug修改

xiaof 2 年之前
父節點
當前提交
2e4c6051cf

+ 3 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DownloadServiceImpl.java

@@ -128,6 +128,9 @@ public class DownloadServiceImpl implements DownloadService {
 
             // 试卷附件id
             Long attachmentId = paperInfo.getAttachmentId();
+            if(attachmentId == null){
+                throw ExceptionResultEnum.ERROR.exception("命题任务没有上传试卷,无法下载");
+            }
             // 题卡id
             Long cardId = paperInfo.getCardId();
 

+ 1 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -989,6 +989,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         Long time = System.currentTimeMillis();
         String rootPath = dictionaryConfig.fssLocalFileDomain().getConfig() + File.separator + time;
         StringJoiner dirPath = new StringJoiner("")
+                .add(dictionaryConfig.fssLocalFileDomain().getConfig()).add(File.separator)
                 .add(String.valueOf(time)).add(File.separator)
                 .add(examTaskDetailPdfDownloadDto.getSemesterName()).add(File.separator)
                 .add(examTaskDetailPdfDownloadDto.getExamName()).add(File.separator)

+ 1 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -1288,6 +1288,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                 ExamTaskDetailPdfDownloadDto examTaskDetailPdfDownloadDto = examTaskDetailService.findPdfDownload(Long.valueOf(examTask.getId()));
 
                 StringJoiner dirPath = new StringJoiner("")
+                        .add(dictionaryConfig.fssLocalFileDomain().getConfig()).add(File.separator)
                         .add(String.valueOf(time)).add(File.separator)
                         .add(examTaskDetailPdfDownloadDto.getSemesterName()).add(File.separator)
                         .add(examTaskDetailPdfDownloadDto.getExamName()).add(File.separator)