|
@@ -140,6 +140,12 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
|
throw new StatusException(Constants.SYSTEM_BUSY);
|
|
|
}
|
|
|
|
|
|
+ String capacityLockKey = String.format(CacheConstants.LOCK_EXAM_SITE_CAPACITY, examSiteId);
|
|
|
+ if (concurrentService.isLocked(capacityLockKey)) {
|
|
|
+ log.warn("考点剩余可约数量更新中,不允许考生操作预约!lockKey:{}", capacityLockKey);
|
|
|
+ throw new StatusException(Constants.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
// 考生预约操作锁
|
|
|
String studentApplyLockKey = String.format(CacheConstants.LOCK_STUDENT_APPLY, student.getId());
|
|
|
RLock studentApplyLock = (RLock) concurrentService.getLock(studentApplyLockKey);
|
|
@@ -276,6 +282,12 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
|
throw new StatusException(Constants.SYSTEM_BUSY);
|
|
|
}
|
|
|
|
|
|
+ String capacityLockKey = String.format(CacheConstants.LOCK_EXAM_SITE_CAPACITY, examSiteId);
|
|
|
+ if (concurrentService.isLocked(capacityLockKey)) {
|
|
|
+ log.warn("考点剩余可约数量更新中,不允许考生操作预约!lockKey:{}", capacityLockKey);
|
|
|
+ throw new StatusException(Constants.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
// 考生预约操作锁
|
|
|
String studentApplyLockKey = String.format(CacheConstants.LOCK_STUDENT_APPLY, student.getId());
|
|
|
RLock studentApplyLock = (RLock) concurrentService.getLock(studentApplyLockKey);
|