haogh há 3 semanas atrás
pai
commit
1eb4fd46f3

+ 10 - 0
src/main/java/com/qmth/exam/reserve/service/impl/TimePeriodExamRoomServiceImpl.java

@@ -253,6 +253,9 @@ public class TimePeriodExamRoomServiceImpl extends ServiceImpl<TimePeriodExamRoo
                 log.warn("[考场排班设置] 获取锁失败,同一个教学点不允许同时操作一个考点的容量修改, lockKey:{}", examSiteLockKey);
                 throw new StatusException("其他老师正在修改该考点的容量,请稍后重试!");
             } else {
+
+                log.warn("[考场排班设置] 获取锁成功,同一个教学点正在修改该考点的容量,请稍后重试!lockKey:{}", examSiteLockKey);
+
                 // 获取已有时段数据
                 List<TimePeriodExamSiteBean> existingTimePeriods = timePeriodService.listTimePeriodByExamRoomId(curApplyTask.getTaskId(), examRoomId);
                 Map<Long, TimePeriodExamSiteBean> existingMap = existingTimePeriods.stream()
@@ -359,6 +362,8 @@ public class TimePeriodExamRoomServiceImpl extends ServiceImpl<TimePeriodExamRoo
                     //防止重复保存
                     checkExistTimePeriodExamRoom(toBeSaved, Collections.emptyList());
                     saveBatch(toBeSaved);
+
+                    log.warn("[考场排班设置] 保存条数:{}", toBeSaved.size());
                 }
 
                 if (!toBeUpdated.isEmpty()) {
@@ -368,6 +373,8 @@ public class TimePeriodExamRoomServiceImpl extends ServiceImpl<TimePeriodExamRoo
                     checkExistTimePeriodExamRoom(toBeUpdated, ids);
 
                     updateBatchById(toBeUpdated);
+
+                    log.warn("[考场排班设置] 更新条数:{}", toBeUpdated.size());
                 }
 
                 // 提交事务后刷新缓存
@@ -377,6 +384,9 @@ public class TimePeriodExamRoomServiceImpl extends ServiceImpl<TimePeriodExamRoo
                         for (Long timePeriodId : updatedTimePeriodIds) {
                             int oldCapacity = oldCapacityMap.getOrDefault(timePeriodId, 0);;
                             int newCapacity = examSiteService.getExamSiteTimePeriodCapacity(examSiteCacheBean.getExamSiteId(), timePeriodId);
+
+                            log.warn("[考场排班设置] 刷新缓存,timePeriodId:{},oldCapacity:{},newCapacity:{}", timePeriodId, oldCapacity, newCapacity);
+
                             applyTaskCacheService.refreshApplyAvailableCountCache(
                                     examRoom.getExamSiteId(),
                                     timePeriodId,