From 7c530d7861e1995f4987808524c1b4254639c441 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 10 Sep 2021 17:55:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=90=8D=E7=88=B1=E5=BF=83=E4=BA=92?= =?UTF-8?q?=E5=8A=A9=E3=80=81=E6=B4=BB=E5=8A=A8=E5=8F=91=E5=B8=83=EF=BC=8C?= =?UTF-8?q?=E5=AD=98=E5=82=A8targetId=EF=BC=8CmessageType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/WorkActServiceImpl.java | 7 ++++++- .../epmet/service/impl/WorkActUserServiceImpl.java | 6 ++++++ .../com/epmet/constant/UserMessageTypeConstant.java | 13 +++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 15f6ee311f..b552ee29bc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/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(); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java index 735c82dda1..2a67649019 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java +++ b/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("审核成功,已成功发送站内信"); diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java index 6dc2ede42a..eacb06ecb8 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java +++ b/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"; }