|
@ -454,6 +454,10 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD |
|
|
// 根据actID查询活动开始未审核报名人默认状态
|
|
|
// 根据actID查询活动开始未审核报名人默认状态
|
|
|
ActInfoDTO actInfoDTO = actInfoService.get(actId); |
|
|
ActInfoDTO actInfoDTO = actInfoService.get(actId); |
|
|
String actUserDefaultState = actInfoDTO.getActUserDefaultState(); // 活动开始未审核报名人默认状态
|
|
|
String actUserDefaultState = actInfoDTO.getActUserDefaultState(); // 活动开始未审核报名人默认状态
|
|
|
|
|
|
// 判断活动状态是否下架若下架直接返回
|
|
|
|
|
|
if ("0".equals(actInfoDTO.getActStatus())) { |
|
|
|
|
|
return new Result().ok("该活动已下架"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 查询已报名未审核的志愿者
|
|
|
// 查询已报名未审核的志愿者
|
|
|
List<ActUserRelationDTO> data = baseDao.selectListActUserInfo(actId); |
|
|
List<ActUserRelationDTO> data = baseDao.selectListActUserInfo(actId); |
|
@ -471,6 +475,8 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD |
|
|
actUserLog.setOperationType(actUserDefaultState);// 默认状态
|
|
|
actUserLog.setOperationType(actUserDefaultState);// 默认状态
|
|
|
actUserLog.setOperationTime(new Date()); |
|
|
actUserLog.setOperationTime(new Date()); |
|
|
actUserLogDao.insert(actUserLog); |
|
|
actUserLogDao.insert(actUserLog); |
|
|
|
|
|
// 给用户发送消息通知
|
|
|
|
|
|
this.sendNotice(actUserRelationDTO, actUserDefaultState, actInfoDTO); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
return new Result().ok("该活动暂时没有未审核的志愿者"); |
|
|
return new Result().ok("该活动暂时没有未审核的志愿者"); |
|
@ -479,4 +485,25 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD |
|
|
return new Result().ok("该活动对已报名的志愿者自动审核成功"); |
|
|
return new Result().ok("该活动对已报名的志愿者自动审核成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 自动审核 定时任务 消息通知 |
|
|
|
|
|
*/ |
|
|
|
|
|
private void sendNotice(ActUserRelationDTO actUserRelationDTO, String actUserDefaultState, ActInfoDTO actInfoDTO) { |
|
|
|
|
|
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO(); |
|
|
|
|
|
informationFormDTO.setUserId(actUserRelationDTO.getUserId()); |
|
|
|
|
|
informationFormDTO.setType(HeartNoticeConstant.NOTICE_TYPE_AUDIT_NOTICE); |
|
|
|
|
|
informationFormDTO.setBusinessId(actUserRelationDTO.getActId()); |
|
|
|
|
|
informationFormDTO.setRelBusinessContent(actInfoDTO.getTitle()); |
|
|
|
|
|
// 审核不通过
|
|
|
|
|
|
if (!NumConstant.ONE_STR.equals(actUserDefaultState)) { |
|
|
|
|
|
informationFormDTO.setBusinessType(HeartNoticeConstant.NOTICE__BUSINESS_TYPE_ACT_FAILURE); |
|
|
|
|
|
informationFormDTO.setTitle(HeartNoticeConstant.NOTICE_SIGN_UP_NOT_PASSED); |
|
|
|
|
|
informationFormDTO.setContent(HeartNoticeConstant.AUTH_NOTICE_SIGN_UP); |
|
|
|
|
|
} else { |
|
|
|
|
|
informationFormDTO.setBusinessType(HeartNoticeConstant.NOTICE__BUSINESS_TYPE_ACT_SUCCESS); |
|
|
|
|
|
informationFormDTO.setTitle(HeartNoticeConstant.NOTICE_SIGN_UP_PASSED); |
|
|
|
|
|
informationFormDTO.setContent(HeartNoticeConstant.AUTH_NOTICE_SIGN_UP); |
|
|
|
|
|
} |
|
|
|
|
|
newsTask.insertUserInformation(informationFormDTO); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|