|
@@ -141,7 +141,7 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
// 某考点某时段的“已预约数量” 累减1(释放1个被占数量)
|
|
// 某考点某时段的“已预约数量” 累减1(释放1个被占数量)
|
|
applyTaskCacheService.decreaseApplyFinishCount(examSiteId, timePeriodId);
|
|
applyTaskCacheService.decreaseApplyFinishCount(examSiteId, timePeriodId);
|
|
|
|
|
|
- log.warn("预约失败,当前时段已预约,请勿重复预约!examSiteId:{} timePeriodId:{}", examSiteId, timePeriodId);
|
|
|
|
|
|
+ log.warn("当前时段已预约,请勿重复预约!examSiteId:{} timePeriodId:{}", examSiteId, timePeriodId);
|
|
throw new StatusException("当前时段已预约,请勿重复预约");
|
|
throw new StatusException("当前时段已预约,请勿重复预约");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -149,10 +149,12 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
existApply.setCancel(false);
|
|
existApply.setCancel(false);
|
|
existApply.setOperateId(student.getId());
|
|
existApply.setOperateId(student.getId());
|
|
existApply.setOperateTime(System.currentTimeMillis());
|
|
existApply.setOperateTime(System.currentTimeMillis());
|
|
- applyTaskCacheService.saveStudentApplyRecord(existApply);
|
|
|
|
|
|
|
|
// 推送至预约队列
|
|
// 推送至预约队列
|
|
applyTaskCacheService.pushStudentApplyRecordQueue(existApply);
|
|
applyTaskCacheService.pushStudentApplyRecordQueue(existApply);
|
|
|
|
+
|
|
|
|
+ // 保存至预约缓存
|
|
|
|
+ applyTaskCacheService.saveStudentApplyRecord(existApply);
|
|
} else {
|
|
} else {
|
|
// 不存在则新增预约记录
|
|
// 不存在则新增预约记录
|
|
ApplyRecordCacheBean newApply = new ApplyRecordCacheBean();
|
|
ApplyRecordCacheBean newApply = new ApplyRecordCacheBean();
|
|
@@ -162,10 +164,12 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
newApply.setCancel(false);
|
|
newApply.setCancel(false);
|
|
newApply.setOperateId(student.getId());
|
|
newApply.setOperateId(student.getId());
|
|
newApply.setOperateTime(System.currentTimeMillis());
|
|
newApply.setOperateTime(System.currentTimeMillis());
|
|
- applyTaskCacheService.saveStudentApplyRecord(newApply);
|
|
|
|
|
|
|
|
// 推送至预约队列
|
|
// 推送至预约队列
|
|
applyTaskCacheService.pushStudentApplyRecordQueue(newApply);
|
|
applyTaskCacheService.pushStudentApplyRecordQueue(newApply);
|
|
|
|
+
|
|
|
|
+ // 保存至预约缓存
|
|
|
|
+ applyTaskCacheService.saveStudentApplyRecord(newApply);
|
|
}
|
|
}
|
|
|
|
|
|
log.warn("预约成功!studentId:{} examSiteId:{} timePeriodId:{}", student.getId(), examSiteId, timePeriodId);
|
|
log.warn("预约成功!studentId:{} examSiteId:{} timePeriodId:{}", student.getId(), examSiteId, timePeriodId);
|
|
@@ -215,7 +219,7 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
}
|
|
}
|
|
|
|
|
|
if (existApply.getCancel()) {
|
|
if (existApply.getCancel()) {
|
|
- log.warn("取消预约失败,当前时段已取消,忽略重复取消!examSiteId:{} timePeriodId:{}", examSiteId, timePeriodId);
|
|
|
|
|
|
+ log.warn("当前时段已取消,忽略重复取消!examSiteId:{} timePeriodId:{}", examSiteId, timePeriodId);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -253,11 +257,13 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
existApply.setCancel(true);
|
|
existApply.setCancel(true);
|
|
existApply.setOperateId(student.getId());
|
|
existApply.setOperateId(student.getId());
|
|
existApply.setOperateTime(System.currentTimeMillis());
|
|
existApply.setOperateTime(System.currentTimeMillis());
|
|
- applyTaskCacheService.saveStudentApplyRecord(existApply);
|
|
|
|
|
|
|
|
// 推送至预约队列
|
|
// 推送至预约队列
|
|
applyTaskCacheService.pushStudentApplyRecordQueue(existApply);
|
|
applyTaskCacheService.pushStudentApplyRecordQueue(existApply);
|
|
|
|
|
|
|
|
+ // 保存至预约缓存
|
|
|
|
+ applyTaskCacheService.saveStudentApplyRecord(existApply);
|
|
|
|
+
|
|
// 某考点某时段的“已预约数量” 累减1
|
|
// 某考点某时段的“已预约数量” 累减1
|
|
applyTaskCacheService.decreaseApplyFinishCount(examSiteId, timePeriodId);
|
|
applyTaskCacheService.decreaseApplyFinishCount(examSiteId, timePeriodId);
|
|
|
|
|