|
@@ -269,27 +269,28 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void updateExamRegistration(ExamRegistration examRegistration) {
|
|
|
- if (Objects.isNull(examRegistration.getId())) {
|
|
|
+ public void updateExamRegistrationStatus(Long registId, StudentRegistrationStatusEnum status, String memo) {
|
|
|
+ if (Objects.isNull(registId)) {
|
|
|
throw new BizException("请指定学员报名信息");
|
|
|
}
|
|
|
- ExamRegistration er = examRegistrationDao.get(examRegistration.getId().longValue());
|
|
|
+ ExamRegistration er = examRegistrationDao.get(registId);
|
|
|
if (Objects.isNull(er)) {
|
|
|
throw new BizException("学员报名信息不存在");
|
|
|
}
|
|
|
if (!StudentRegistrationStatusEnum.AUDIT_WAIT.equals(er.getStatus())) {
|
|
|
throw new BizException("审核状态错误");
|
|
|
}
|
|
|
- if (!StudentRegistrationStatusEnum.AUDIT_PASS.equals(examRegistration.getStatus())
|
|
|
- && !StudentRegistrationStatusEnum.AUDIT_REJECT.equals(examRegistration.getStatus())) {
|
|
|
+ if (!StudentRegistrationStatusEnum.AUDIT_PASS.equals(status)
|
|
|
+ && !StudentRegistrationStatusEnum.AUDIT_REJECT.equals(status)) {
|
|
|
throw new BizException("审核状态错误");
|
|
|
}
|
|
|
+ er.setStatus(status);
|
|
|
Map<Integer, String> receiverMap = new HashMap<>(1);
|
|
|
receiverMap.put(er.getStudentId(), er.getStudentId().toString());
|
|
|
- if(StudentRegistrationStatusEnum.AUDIT_PASS.equals(examRegistration.getStatus())){
|
|
|
+ if(StudentRegistrationStatusEnum.AUDIT_PASS.equals(er.getStatus())){
|
|
|
sysMessageService.batchSendMessage(MessageTypeEnum.REGIST_PASS_PUSH,
|
|
|
receiverMap, null, 0, null, JiguangPushPlugin.PLUGIN_NAME);
|
|
|
- }else if(StudentRegistrationStatusEnum.AUDIT_REJECT.equals(examRegistration.getStatus())){
|
|
|
+ }else if(StudentRegistrationStatusEnum.AUDIT_REJECT.equals(er.getStatus())){
|
|
|
sysMessageService.batchSendMessage(MessageTypeEnum.REGIST_REJECT_PUSH,
|
|
|
receiverMap, null, 0, null, JiguangPushPlugin.PLUGIN_NAME);
|
|
|
|
|
@@ -299,6 +300,19 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
|
sysMessageService.batchSendMessage(MessageTypeEnum.REGIST_REJECT_SMS,
|
|
|
phoneMap, null, 0, null, YimeiSmsPlugin.PLUGIN_NAME);
|
|
|
}
|
|
|
+ examRegistrationDao.update(er);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void updateExamRegistration(ExamRegistration examRegistration) {
|
|
|
+ if (Objects.isNull(examRegistration.getId())) {
|
|
|
+ throw new BizException("学员报名信息有误");
|
|
|
+ }
|
|
|
+ ExamRegistration er = examRegistrationDao.get(examRegistration.getId().longValue());
|
|
|
+ if (Objects.isNull(er)) {
|
|
|
+ throw new BizException("学员报名信息有误");
|
|
|
+ }
|
|
|
+ examRegistration.setStatus(null);
|
|
|
examRegistrationDao.update(examRegistration);
|
|
|
}
|
|
|
|