|
@@ -109,6 +109,8 @@ public class ExamRoomServiceImpl extends ServiceImpl<ExamRoomDao, ExamRoomEntity
|
|
|
log.warn("[考场保存] 获取锁失败,同一个教学点不允许同时操作一个考点的容量修改, lockKey:{}", examSiteLockKey);
|
|
|
throw new StatusException("其他老师正在修改该考点的容量,不允许同时操作,请稍后再试!");
|
|
|
} else {
|
|
|
+ log.warn("[考场保存] 获取锁成功!lockKey:{}", examSiteLockKey);
|
|
|
+
|
|
|
//校验
|
|
|
checkExamRoom(req);
|
|
|
|
|
@@ -298,6 +300,8 @@ public class ExamRoomServiceImpl extends ServiceImpl<ExamRoomDao, ExamRoomEntity
|
|
|
log.warn("[考场禁用/启用] 获取锁失败,同一个教学点不允许同时操作一个考点的容量修改, lockKey:{}", examSiteLockKey);
|
|
|
throw new StatusException("其他老师正在修改该考点的容量,不允许同时操作,请稍后再试!");
|
|
|
} else {
|
|
|
+ log.warn("[考场禁用/启用] 获取锁成功!lockKey:{}", examSiteLockKey);
|
|
|
+
|
|
|
//考点容量
|
|
|
ExamSiteEntity examSite = examSiteService.getById(examRoom.getExamSiteId());
|
|
|
int oldCapacity = examSite.getCapacity();
|
|
@@ -475,6 +479,8 @@ public class ExamRoomServiceImpl extends ServiceImpl<ExamRoomDao, ExamRoomEntity
|
|
|
log.warn("[考场导入] 获取锁失败,同一个教学点不允许同时操作一个考点的容量修改, lockKey:{}", examSiteLockKey);
|
|
|
throw new StatusException("其他老师正在修改该考点的容量,不允许同时操作,请稍后再试!");
|
|
|
} else {
|
|
|
+ log.warn("[考场导入] 获取锁成功! lockKey:{}", examSiteLockKey);
|
|
|
+
|
|
|
//保存之前的考点容量
|
|
|
ExamSiteEntity examSite = examSiteService.getById(room.getExamSiteId());
|
|
|
if (examSite == null) {
|
|
@@ -508,8 +514,10 @@ public class ExamRoomServiceImpl extends ServiceImpl<ExamRoomDao, ExamRoomEntity
|
|
|
updateExamSiteAndTeachingCapacity(room.getExamSiteId());
|
|
|
//更新之后的容量
|
|
|
examSite = examSiteService.getById(room.getExamSiteId());
|
|
|
+
|
|
|
//刷新缓存
|
|
|
- refreshApplyCountCacheAfterCommit(roomId, room.getExamSiteId(), oldCapacity, examSite.getCapacity());
|
|
|
+ //refreshApplyCountCacheAfterCommit(roomId, room.getExamSiteId(), oldCapacity, examSite.getCapacity());
|
|
|
+ doRefreshApplyCountCache(roomId, room.getExamSiteId(), oldCapacity, examSite.getCapacity());
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("[考场导入]保存失败,原因:{}", e.getMessage(), e);
|