|
@@ -2,11 +2,15 @@ package com.keao.edu.user.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.keao.edu.common.dal.BaseDAO;
|
|
import com.keao.edu.common.dal.BaseDAO;
|
|
|
|
+import com.keao.edu.common.enums.MessageTypeEnum;
|
|
import com.keao.edu.common.exception.BizException;
|
|
import com.keao.edu.common.exception.BizException;
|
|
import com.keao.edu.common.page.PageInfo;
|
|
import com.keao.edu.common.page.PageInfo;
|
|
import com.keao.edu.common.page.QueryInfo;
|
|
import com.keao.edu.common.page.QueryInfo;
|
|
import com.keao.edu.common.service.IdGeneratorService;
|
|
import com.keao.edu.common.service.IdGeneratorService;
|
|
|
|
+import com.keao.edu.common.service.SysMessageService;
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
|
|
+import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
|
|
|
|
+import com.keao.edu.thirdparty.message.provider.YimeiSmsPlugin;
|
|
import com.keao.edu.user.dao.*;
|
|
import com.keao.edu.user.dao.*;
|
|
import com.keao.edu.user.dto.ExamRecordDto;
|
|
import com.keao.edu.user.dto.ExamRecordDto;
|
|
import com.keao.edu.user.dto.ExamRegistrationDto;
|
|
import com.keao.edu.user.dto.ExamRegistrationDto;
|
|
@@ -54,6 +58,8 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
private ExamRegistrationPaymentService examRegistrationPaymentService;
|
|
private ExamRegistrationPaymentService examRegistrationPaymentService;
|
|
@Autowired
|
|
@Autowired
|
|
private OrganizationDao organizationDao;
|
|
private OrganizationDao organizationDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysMessageService sysMessageService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public BaseDAO<Long, ExamRegistration> getDAO() {
|
|
public BaseDAO<Long, ExamRegistration> getDAO() {
|
|
@@ -278,6 +284,17 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
&& !StudentRegistrationStatusEnum.AUDIT_REJECT.equals(examRegistration.getStatus())) {
|
|
&& !StudentRegistrationStatusEnum.AUDIT_REJECT.equals(examRegistration.getStatus())) {
|
|
throw new BizException("审核状态错误");
|
|
throw new BizException("审核状态错误");
|
|
}
|
|
}
|
|
|
|
+ Map<Integer, String> receiverMap = new HashMap<>(1);
|
|
|
|
+ receiverMap.put(er.getStudentId(), er.getStudentId().toString());
|
|
|
|
+ if(StudentRegistrationStatusEnum.AUDIT_PASS.equals(examRegistration.getStatus())){
|
|
|
|
+ sysMessageService.batchSendMessage(MessageTypeEnum.REGIST_PASS_PUSH,
|
|
|
|
+ receiverMap, null, 0, null, JiguangPushPlugin.PLUGIN_NAME);
|
|
|
|
+ }else if(StudentRegistrationStatusEnum.AUDIT_REJECT.equals(examRegistration.getStatus())){
|
|
|
|
+ sysMessageService.batchSendMessage(MessageTypeEnum.REGIST_REJECT_PUSH,
|
|
|
|
+ receiverMap, null, 0, null, JiguangPushPlugin.PLUGIN_NAME);
|
|
|
|
+ sysMessageService.batchSendMessage(MessageTypeEnum.REGIST_REJECT_SMS,
|
|
|
|
+ receiverMap, null, 0, null, YimeiSmsPlugin.PLUGIN_NAME);
|
|
|
|
+ }
|
|
examRegistrationDao.update(examRegistration);
|
|
examRegistrationDao.update(examRegistration);
|
|
}
|
|
}
|
|
|
|
|