|
|
@ -19,15 +19,18 @@ package com.elink.esua.epdc.service.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.elink.esua.epdc.async.NewsTask; |
|
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.constant.VolunteerInfoConsant; |
|
|
|
import com.elink.esua.epdc.dao.VolunteerInfoDao; |
|
|
|
import com.elink.esua.epdc.dto.UserTagDTO; |
|
|
|
import com.elink.esua.epdc.dto.VolunteerInfoDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; |
|
|
|
import com.elink.esua.epdc.entity.VolunteerInfoEntity; |
|
|
|
import com.elink.esua.epdc.redis.VolunteerInfoRedis; |
|
|
|
import com.elink.esua.epdc.service.UserService; |
|
|
@ -59,6 +62,9 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
@Autowired |
|
|
|
private UserService userService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private NewsTask newsTask; |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据查询条件,返回首页 志愿者信息列表 |
|
|
|
* @param params |
|
|
@ -115,6 +121,22 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
@Override |
|
|
|
public void updateVolunteerInfo(VolunteerInfoDTO dto) { |
|
|
|
volunteerInfoDao.updateVolunteerInfo(dto); |
|
|
|
//审核状态(0-未审核,1-审核通过,2-审核不通过,3-拉黑),当审核状态为2,3时推送消息
|
|
|
|
if (dto.getAuditStatus().equals("2") || dto.getAuditStatus().equals("3")){ |
|
|
|
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO(); |
|
|
|
informationFormDTO.setUserId(dto.getUserId()); |
|
|
|
if (dto.getAuditStatus().equals("2")){ |
|
|
|
informationFormDTO.setTitle(VolunteerInfoConsant.NOTICE_TITLE_VOLUNTEER_NOT_PASSED); |
|
|
|
}else if (dto.getAuditStatus().equals("3")){ |
|
|
|
informationFormDTO.setTitle(VolunteerInfoConsant.NOTICE_TITLE_VOLUNTEER_BLACKLIST); |
|
|
|
} |
|
|
|
informationFormDTO.setContent(dto.getFailureReason());//审核不通过原因
|
|
|
|
informationFormDTO.setType("0"); //消息类型:0审核通知
|
|
|
|
informationFormDTO.setBusinessType(VolunteerInfoConsant.NOTICE_BUSINESSTYPE_VOLUNTEER_CHECK);//消息所属业务类型
|
|
|
|
informationFormDTO.setBusinessId(dto.getId());//消息所属业务ID:主键id
|
|
|
|
//消息推送
|
|
|
|
newsTask.insertUserInformation(informationFormDTO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|