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