Browse Source

志愿者审核发布通知

feature/dangjian
yujintao 6 years ago
parent
commit
c39fffa664
  1. 25
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/constant/VolunteerInfoNoticeConstant.java
  2. 16
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java

25
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/constant/VolunteerInfoNoticeConstant.java

@ -6,17 +6,18 @@ package com.elink.esua.epdc.constant;
* @Date 2020/2/7 12:20 * @Date 2020/2/7 12:20
*/ */
public interface VolunteerInfoNoticeConstant { public interface VolunteerInfoNoticeConstant {
/** /**
* 志愿者审核未通过 * 志愿者审核未通过
*/ */
String NOTICE_CERTIFICATION_NOT_PASSED = "您的志愿者认证【审核未通过】"; String NOTICE_CERTIFICATION_NOT_PASSED = "您的志愿者认证【审核未通过】";
/** String NOTICE_CERTIFICATION_PASSED = "您的志愿者认证【审核通过】";
* 消息所属业务类型volunteer志愿者审核 /**
*/ * 消息所属业务类型volunteer志愿者审核
String NOTICE__BUSINESS_TYPE_VOLUNTEER = "volunteer"; */
String NOTICE__BUSINESS_TYPE_VOLUNTEER = "volunteer";
/** /**
* 我的消息类型0审核通知 * 我的消息类型0审核通知
*/ */
String NOTICE_TYPE_AUDIT_NOTICE = "0"; String NOTICE_TYPE_AUDIT_NOTICE = "0";
} }

16
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java

@ -325,29 +325,33 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
if (StringUtils.isBlank(volunteerInfoDTO.getFailureReason())) { if (StringUtils.isBlank(volunteerInfoDTO.getFailureReason())) {
return new Result().error("请填写原因"); return new Result().error("请填写原因");
} }
sendInfo(dto, volunteerInfoDTO);
} else { } else {
//2、审核通过-新增用户标签关系表(此方法里面实现了更新redis里的userTagInfos) //2、审核通过-新增用户标签关系表(此方法里面实现了更新redis里的userTagInfos)
if (isVolunteer(volunteerInfoDTO.getUserId())) { if (isVolunteer(volunteerInfoDTO.getUserId())) {
return new Result().error("当前用户已审核通过,无法操作历史记录"); return new Result().error("当前用户已审核通过,无法操作历史记录");
} }
sendInfo(dto, volunteerInfoDTO);
userTagRelationService.addUserTagRelation(volunteerInfoDTO.getUserId(), UserTagEnum.VOLUNTEER.value()); userTagRelationService.addUserTagRelation(volunteerInfoDTO.getUserId(), UserTagEnum.VOLUNTEER.value());
} }
sendInfo(volunteerInfoDTO);
//3、更新志愿者信息表 //3、更新志愿者信息表
this.update(volunteerInfoDTO); this.update(volunteerInfoDTO);
return new Result(); return new Result();
} }
private void sendInfo(VolunteerInfoDTO dto, VolunteerInfoDTO volunteerInfoDTO) { private void sendInfo(VolunteerInfoDTO volunteerInfoDTO) {
// 1、未通过审核时发送消息-用户可修改信息重新提交
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO(); EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO();
// 审核通过
if (NumConstant.TWO_STR.equals(volunteerInfoDTO.getAuditStatus())) {
informationFormDTO.setTitle(VolunteerInfoNoticeConstant.NOTICE_CERTIFICATION_PASSED);
} else {
informationFormDTO.setTitle(VolunteerInfoNoticeConstant.NOTICE_CERTIFICATION_NOT_PASSED);
}
informationFormDTO.setContent(volunteerInfoDTO.getFailureReason());
informationFormDTO.setUserId(volunteerInfoDTO.getUserId()); informationFormDTO.setUserId(volunteerInfoDTO.getUserId());
informationFormDTO.setContent(dto.getFailureReason());
informationFormDTO.setType(VolunteerInfoNoticeConstant.NOTICE_TYPE_AUDIT_NOTICE); informationFormDTO.setType(VolunteerInfoNoticeConstant.NOTICE_TYPE_AUDIT_NOTICE);
informationFormDTO.setBusinessType(VolunteerInfoNoticeConstant.NOTICE__BUSINESS_TYPE_VOLUNTEER); informationFormDTO.setBusinessType(VolunteerInfoNoticeConstant.NOTICE__BUSINESS_TYPE_VOLUNTEER);
informationFormDTO.setBusinessId(volunteerInfoDTO.getId()); informationFormDTO.setBusinessId(volunteerInfoDTO.getId());
informationFormDTO.setTitle(VolunteerInfoNoticeConstant.NOTICE_CERTIFICATION_NOT_PASSED);
newsTask.insertUserInformation(informationFormDTO); newsTask.insertUserInformation(informationFormDTO);
} }

Loading…
Cancel
Save