Browse Source

志愿者、添加实况,消息发送修改

dev_shibei_match
zhangyongzhangyong 5 years ago
parent
commit
d34509f12a
  1. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActMessageConstant.java
  2. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java
  3. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActMessageConstant.java

@ -26,16 +26,6 @@ public interface ActMessageConstant {
*/
String ACT_POINTS_EVENT_REMARK="参与%s";
/**
* 居民端-用户认证志愿者发送消息
*/
String POINTS_EVENT_VOLUNTEER_AUTHENTICATE="用户%s,认证志愿者";
/**
* 居民端-添加实况发送消息
*/
String ACT_POINTS_EVENT_VOLUNTEER_LIVE="用户%s,添加活动实况,活动:%s";
/**
* 工作端-重新发布活动通知待审核+已经审核通过的用户
*/

12
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java

@ -39,6 +39,7 @@ import com.epmet.commons.tools.utils.SendMqMsgUtils;
import com.epmet.constant.ActMessageConstant;
import com.epmet.dao.ActLivePicDao;
import com.epmet.dao.ActLiveRecDao;
import com.epmet.dto.ActInfoDTO;
import com.epmet.dto.ActLivePicDTO;
import com.epmet.dto.ActLiveRecDTO;
import com.epmet.dto.form.resi.ResiActInsertLiveFormDTO;
@ -48,6 +49,7 @@ import com.epmet.entity.ActLivePicEntity;
import com.epmet.entity.ActLiveRecEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.redis.ActLiveRecRedis;
import com.epmet.service.ActInfoService;
import com.epmet.service.ActLiveRecService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -77,6 +79,9 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
@Autowired
private ActLivePicDao actLivePicDao;
@Autowired
private ActInfoService actInfoService;
@Value("${openapi.scan.server.url}")
private String scanApiUrl;
@Value("${openapi.scan.method.textSyncScan}")
@ -217,8 +222,9 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
}
private void grantActPoints(ResiActInsertLiveFormDTO formDTO){
//备注
String remark=String.format(ActMessageConstant.ACT_POINTS_EVENT_VOLUNTEER_LIVE,formDTO.getUserId(),formDTO.getActId());
// 查询 活动信息
ActInfoDTO actInfoDTO = actInfoService.get(formDTO.getActId());
MqBaseMsgDTO mqBaseMsgDTO=new MqBaseMsgDTO();
//mq的事件类型
mqBaseMsgDTO.setEventClass(EventEnum.ACTIVE_INSERT_LIVE.getEventClass());
@ -230,7 +236,7 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
actPointEventMsg.setUserId(formDTO.getUserId());
actPointEventMsg.setActionFlag(MqConstant.PLUS);
actPointEventMsg.setIsCommon(false);
actPointEventMsg.setRemark(remark);
actPointEventMsg.setRemark(actInfoDTO.getTitle());
actPointEventMsg.setSourceId(formDTO.getActId());
actPointEventMsgList.add(actPointEventMsg);

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java

@ -99,8 +99,6 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
}
private void grantActPoints(ResiVolunteerAuthenticateFormDTO formDTO){
//备注
String remark=String.format(ActMessageConstant.POINTS_EVENT_VOLUNTEER_AUTHENTICATE,formDTO.getUserId());
MqBaseMsgDTO mqBaseMsgDTO=new MqBaseMsgDTO();
//mq的事件类型
mqBaseMsgDTO.setEventClass(EventEnum.REGISTER_VOLUNTEER.getEventClass());
@ -112,7 +110,6 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
actPointEventMsg.setUserId(formDTO.getUserId());
actPointEventMsg.setActionFlag(MqConstant.PLUS);
actPointEventMsg.setIsCommon(false);
actPointEventMsg.setRemark(remark);
actPointEventMsgList.add(actPointEventMsg);
mqBaseMsgDTO.setMsg(JSON.toJSONString(actPointEventMsgList));

Loading…
Cancel
Save