Pārlūkot izejas kodu

转档模块 优化转档失败逻辑

songfuqiang 1 gadu atpakaļ
vecāks
revīzija
894723f929

+ 5 - 2
backend-core/src/main/java/cn/kdan/pdf/backend/core/service/impl/MissionServiceImpl.java

@@ -320,8 +320,11 @@ public class MissionServiceImpl implements MissionService {
                         outputFileService.insert(outputFile);
                     }
                 }else if ("failed".equals(file.getStatus())){
-                    //先查询文件状态是否已更新成失败状态,已更新则不返回券数
-                    if(!MissionFileStatusEnum.FAILED.value().equals(missionFiles.getStatus()) && 0 != missionFiles.getPrice()){
+                    //先查询文件状态是否已更新成失败状态,已更新为失败状态,但是价格没改回0的文件继续返回券数
+                    if(!MissionFileStatusEnum.FAILED.value().equals(missionFiles.getStatus())){
+                        //修改文件状态为失败
+                        fileFailUpdate(members, file, missionFiles,false);
+                    }else if(MissionFileStatusEnum.FAILED.value().equals(missionFiles.getStatus()) && 0 != missionFiles.getPrice()){
                         //修改文件状态为失败
                         fileFailUpdate(members, file, missionFiles,false);
                     }