deason 1 year ago
parent
commit
6f9dfe90c6

+ 9 - 3
src/main/java/com/qmth/exam/reserve/service/impl/StudentApplyServiceImpl.java

@@ -159,8 +159,10 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
                 bean.setCancel(Boolean.TRUE);
                 bean.setOperateId(user.getId());
                 bean.setOperateTime(System.currentTimeMillis());
-                cacheService.saveStudentApplyRecord(bean);
+
+                // 先推送至预约队列
                 cacheService.pushStudentApplyRecordQueue(bean);
+                cacheService.saveStudentApplyRecord(bean);
                 cacheService.decreaseApplyFinishCount(studentApply.getExamSiteId(), studentApply.getTimePeriodId());
             }
         } catch (Exception e) {
@@ -496,8 +498,10 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
                         bean.setCancel(Boolean.FALSE);
                         bean.setOperateId(userId);
                         bean.setOperateTime(System.currentTimeMillis());
-                        cacheService.saveStudentApplyRecord(bean);
+
+                        // 先推送至预约队列
                         cacheService.pushStudentApplyRecordQueue(bean);
+                        cacheService.saveStudentApplyRecord(bean);
                         cacheService.increaseApplyFinishCount(agentTime.getAgentId(), agentTime.getTimePeriodId());
                     }
                 }
@@ -683,8 +687,10 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
                         bean.setCancel(Boolean.FALSE);
                         bean.setOperateId(userId);
                         bean.setOperateTime(System.currentTimeMillis());
-                        cacheService.saveStudentApplyRecord(bean);
+
+                        // 先推送至预约队列
                         cacheService.pushStudentApplyRecordQueue(bean);
+                        cacheService.saveStudentApplyRecord(bean);
                         cacheService.increaseApplyFinishCount(studentApply.getExamSiteId(),
                                 studentApply.getTimePeriodId());
                     }