Browse Source

报名爱心互助、活动发布,存储targetId,messageType

master
yinzuomei 4 years ago
parent
commit
7c530d7861
  1. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  2. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
  3. 13
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java

7
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java

@ -21,6 +21,7 @@ import com.epmet.commons.tools.utils.*;
import com.epmet.constant.ActConstant;
import com.epmet.constant.ActMessageConstant;
import com.epmet.constant.ReadFlagConstant;
import com.epmet.constant.UserMessageTypeConstant;
import com.epmet.dao.*;
import com.epmet.dto.*;
import com.epmet.dto.form.UserMessageFormDTO;
@ -32,7 +33,6 @@ import com.epmet.entity.*;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.*;
import com.epmet.utils.ModuleConstant;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -694,6 +694,11 @@ public class WorkActServiceImpl implements WorkActService {
userMessageFormDTO.setMessageContent(String.format(ActMessageConstant.ACT_CANCELED,
actInfoDTO.getTitle(),
formDTO.getCancelReason()));
//21.09.10:记录消息类型和对应的业务id
userMessageFormDTO.setMessageType(UserMessageTypeConstant.HEART_CANCEL_ACT);
userMessageFormDTO.setTargetId(formDTO.getActId());
userMessageFormDTOS.add(userMessageFormDTO);
//2020.10.26 添加发送微信订阅消息功能 sun
WxSubscribeMessageFormDTO dto = new WxSubscribeMessageFormDTO();

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java

@ -11,6 +11,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.ActConstant;
import com.epmet.constant.ActMessageConstant;
import com.epmet.constant.ReadFlagConstant;
import com.epmet.constant.UserMessageTypeConstant;
import com.epmet.dao.ActInfoDao;
import com.epmet.dao.ActUserLogDao;
import com.epmet.dao.ActUserRelationDao;
@ -639,6 +640,11 @@ public class WorkActUserServiceImpl implements WorkActUserService {
} else if (ActConstant.ACT_USER_STATUS_REFUSED.equals(type)) {
userMessageFormDTO.setMessageContent(String.format(ActMessageConstant.AUDIT_REFUSED, actInfo.getTitle(), actUserRelationEntity.getFailureReason()));
}
//21.09.10:记录消息类型和对应的业务id
userMessageFormDTO.setMessageType(UserMessageTypeConstant.HEART_SIGIN_UP_RES);
userMessageFormDTO.setTargetId(actUserRelationEntity.getId());
Result result = epmetMessageOpenFeignClient.saveUserMessage(userMessageFormDTO);
if (result.success()) {
logger.info("审核成功,已成功发送站内信");

13
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java

@ -165,4 +165,17 @@ public interface UserMessageTypeConstant {
* targetId:article.DRAFT_ID
*/
String PARTY_VOICE_PUBLISH="party_voice_publish";
/**
* 爱心互助通过审核的用户发送消息
* targetId:act_info.id
*/
String HEART_CANCEL_ACT="heart_cancel_act";
/**
* 活动报名结果通知居民
* act_user_relation.id
*/
String HEART_SIGIN_UP_RES="heart_sigin_up_res";
}

Loading…
Cancel
Save