diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/ActPointEventMsg.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/ActPointEventMsg.java deleted file mode 100644 index 60db245a07..0000000000 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/ActPointEventMsg.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.epmet.commons.tools.dto.form.mq.eventmsg; - -import lombok.Data; - -/** - * 结束活动,发放活动积分消息体 - * - * @author yinzuomei@elink-cn.com - * @date 2020/7/27 9:26 - */ -@Data -public class ActPointEventMsg extends BasePointEventMsg{ - /** - * 参与活动的备注 - */ - private String remark; - -} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java index 435234f7dd..28fabc500c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java @@ -42,4 +42,14 @@ public class BasePointEventMsg implements Serializable { * 是否是通用事件,通用事件不走规则 */ private Boolean isCommon; + + /** + * 备注 + */ + private String remark; + + /** + * 业务id eg:活动id + */ + private String sourceId; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java index 89d5c1e4ec..7906c364d5 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java @@ -165,5 +165,5 @@ public class LatestDraftActInfoResultDTO implements Serializable { /** * 活动内容- */ - private List actContentList; + private List actContent; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java index ef55f849ab..e4c8f97b1e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java @@ -23,7 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; -import com.epmet.commons.tools.dto.form.mq.eventmsg.ActPointEventMsg; +import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; @@ -221,8 +221,8 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl actPointEventMsgList=new ArrayList<>(); - ActPointEventMsg actPointEventMsg=new ActPointEventMsg(); + List actPointEventMsgList=new ArrayList<>(); + BasePointEventMsg actPointEventMsg=new BasePointEventMsg(); actPointEventMsg.setCustomerId(formDTO.getCustomerId()); actPointEventMsg.setUserId(formDTO.getUserId()); actPointEventMsg.setActionFlag(MqConstant.PLUS); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index 9e329e81af..7d219aca27 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -22,7 +22,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; -import com.epmet.commons.tools.dto.form.mq.eventmsg.ActPointEventMsg; +import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; @@ -102,8 +102,8 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl actPointEventMsgList=new ArrayList<>(); - ActPointEventMsg actPointEventMsg=new ActPointEventMsg(); + List actPointEventMsgList=new ArrayList<>(); + BasePointEventMsg actPointEventMsg=new BasePointEventMsg(); actPointEventMsg.setCustomerId(formDTO.getCustomerId()); actPointEventMsg.setUserId(formDTO.getUserId()); actPointEventMsg.setActionFlag(MqConstant.PLUS); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java index 1af9e0522b..0375e16a36 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java @@ -76,7 +76,7 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { LatestDraftActInfoResultDTO latestAct=latestActInfoService.getLatestActDraft(userId); if(null!=latestAct){ List actContentList=latestActContentService.selectActContentList(latestAct.getActDraftId()); - latestAct.setActContentList(actContentList); + latestAct.setActContent(actContentList); } return latestAct; }else{ 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 dde37b6663..945adad5b6 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 @@ -6,7 +6,7 @@ import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; -import com.epmet.commons.tools.dto.form.mq.eventmsg.ActPointEventMsg; +import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; @@ -798,19 +798,20 @@ public class WorkActServiceImpl implements WorkActService { mqBaseMsgDTO.setEventClass(EventEnum.ACTIVE_SEND_POINT.getEventClass()); //事件code mqBaseMsgDTO.setEventTag(EventEnum.ACTIVE_SEND_POINT.getEventTag()); - List actPointEventMsgList=new ArrayList<>(); + List basePointEventMsgArrayList=new ArrayList<>(); for(ActUserRelationEntity actUserRelationEntity:actUserRelationEntityList){ - ActPointEventMsg actPointEventMsg=new ActPointEventMsg(); - actPointEventMsg.setOpAgencyId(opAgencyId); - actPointEventMsg.setCustomerId(actInfoDTO.getCustomerId()); - actPointEventMsg.setUserId(actUserRelationEntity.getUserId()); - actPointEventMsg.setActionFlag(MqConstant.PLUS); - actPointEventMsg.setPoint(actInfoDTO.getReward()); - actPointEventMsg.setIsCommon(true); - actPointEventMsg.setRemark(remark); - actPointEventMsgList.add(actPointEventMsg); + BasePointEventMsg basePointEventMsg=new BasePointEventMsg(); + basePointEventMsg.setOpAgencyId(opAgencyId); + basePointEventMsg.setCustomerId(actInfoDTO.getCustomerId()); + basePointEventMsg.setUserId(actUserRelationEntity.getUserId()); + basePointEventMsg.setActionFlag(MqConstant.PLUS); + basePointEventMsg.setPoint(actInfoDTO.getReward()); + basePointEventMsg.setIsCommon(true); + basePointEventMsg.setRemark(remark); + basePointEventMsg.setSourceId(actInfoDTO.getId()); + basePointEventMsgArrayList.add(basePointEventMsg); } - mqBaseMsgDTO.setMsg(JSON.toJSONString(actPointEventMsgList)); + mqBaseMsgDTO.setMsg(JSON.toJSONString(basePointEventMsgArrayList)); Result result=SendMqMsgUtils.sendMsg(mqBaseMsgDTO); if(!result.success()){ logger.error("活动积分发放失败");