Forráskód Böngészése

优化益寿缘用户信息采集进度逻辑

cgp 1 hete
szülő
commit
17fa0df82d

+ 6 - 6
fs-service/src/main/java/com/fs/hisStore/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -245,13 +245,13 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
             throw new CustomException("确认中,暂无法修改");
         }
         //编辑用户信息采集信息时,同时新增采集进度数据(先中止再新增)
+        //获取当前用户正在运行的信息采集进度
+        FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(collection.getId());
+        if (schedule != null){
+            log.info("用户信息采集进度未终止,进度id:{}",schedule.getId());
+            throw new CustomException("请先终止此用户信息的采集进度");
+        }
         try {
-            //获取当前用户正在运行的信息采集进度
-            FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(collection.getId());
-            if (schedule != null){
-                log.info("用户信息采集进度未终止,进度id:{}",schedule.getId());
-                throw new CustomException("请先终止此用户信息的采集进度");
-            }
             FsUserInformationCollection condition = getFsUserInformationCollection(param);
             condition.setPackageId(param.getPackageId());
             FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule = assembleCreateSchedule(condition);