|
|
@ -1580,42 +1580,55 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
} |
|
|
|
|
|
|
|
//发送积分
|
|
|
|
|
|
|
|
ResiTopicEntity topic = baseDao.selectById(topicTurnIssueFromDTO.getTopicId()); |
|
|
|
|
|
|
|
//mq的事件类型
|
|
|
|
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO(); |
|
|
|
mqBaseMsgDTO.setEventClass("resi_group"); |
|
|
|
//事件code
|
|
|
|
//事件code 因为楼院小组的事件回调统一入口,外层的EventTag不能够判断具体的事件
|
|
|
|
//因为可能会一次发送多个事件集合,需要对集合里的对象逐个判断
|
|
|
|
mqBaseMsgDTO.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag()); |
|
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
|
//1.话题被转为议题 组内成员
|
|
|
|
group.getTopicAuthorId(); |
|
|
|
|
|
|
|
BasePointEventMsg pointEventMsg = new BasePointEventMsg(); |
|
|
|
pointEventMsg.setCustomerId(groupCache.getCustomerId()); |
|
|
|
//pointEventMsg.setUserId(inviter);
|
|
|
|
pointEventMsg.setUserId(group.getTopicAuthorId()); |
|
|
|
pointEventMsg.setActionFlag(MqConstant.PLUS); |
|
|
|
pointEventMsg.setIsCommon(false); |
|
|
|
//pointEventMsg.setTargetDate(groupMemeberOperationDTO.getCreatedTime());
|
|
|
|
pointEventMsg.setEventTag(EventEnum.TOPIC_SHIFTED_TO_ISSUE.getEventTag()); |
|
|
|
|
|
|
|
//某某小组中发布的话题“某某某…” (前十个字后面省略号) 被转为议题
|
|
|
|
|
|
|
|
pointEventMsg.setRemark(new StringBuilder(groupCache.getGroupName()).append("小组中发布的") |
|
|
|
.append( |
|
|
|
StringUtils.isBlank(topic.getTopicContent()) ? "语音话题" : |
|
|
|
"\"" + |
|
|
|
topic.getTopicContent() |
|
|
|
.substring(topic.getTopicContent().length() < NumConstant.TEN ? topic.getTopicContent().length() : NumConstant.TEN) |
|
|
|
+ (NumConstant.TEN > topic.getTopicContent().length() ? "\"" : "…\"") |
|
|
|
).append("被转为议题").toString()); |
|
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
|
|
|
|
|
//2.转话题为议题 组长
|
|
|
|
topicTurnIssueFromDTO.getUserId(); |
|
|
|
|
|
|
|
|
|
|
|
pointEventMsg.setCustomerId(groupCache.getCustomerId()); |
|
|
|
//pointEventMsg.setUserId(inviter);
|
|
|
|
pointEventMsg.setUserId(topicTurnIssueFromDTO.getUserId()); |
|
|
|
pointEventMsg.setActionFlag(MqConstant.PLUS); |
|
|
|
pointEventMsg.setIsCommon(false); |
|
|
|
//pointEventMsg.setTargetDate(groupMemeberOperationDTO.getCreatedTime());
|
|
|
|
pointEventMsg.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag()); |
|
|
|
|
|
|
|
//将话题“某某某…” (前十个字后面省略号) 转为议题
|
|
|
|
pointEventMsg.setRemark(new StringBuilder("将话题") |
|
|
|
.append( |
|
|
|
"\"" + |
|
|
|
topic.getTopicContent() |
|
|
|
.substring(topic.getTopicContent().length() < NumConstant.TEN ? topic.getTopicContent().length() : NumConstant.TEN) |
|
|
|
+ (NumConstant.TEN > topic.getTopicContent().length() ? "\"" : "…\"") |
|
|
|
).append("转为议题").toString()); |
|
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
|
|
|
|
|
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList)); |
|
|
|
if(!SendMqMsgUtils.sendMsg(mqBaseMsgDTO).success()){ |
|
|
|
log.error("事件发送失败,参数:{}",JSON.toJSONString(topicTurnIssueFromDTO)); |
|
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(topicTurnIssueFromDTO)); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
@ -1699,6 +1712,59 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
); |
|
|
|
resiGroupRedis.set(groupCache); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//发送积分
|
|
|
|
|
|
|
|
//mq的事件类型
|
|
|
|
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO(); |
|
|
|
mqBaseMsgDTO.setEventClass("resi_group"); |
|
|
|
//事件code 因为楼院小组的事件回调统一入口,外层的EventTag不能够判断具体的事件
|
|
|
|
//因为可能会一次发送多个事件集合,需要对集合里的对象逐个判断
|
|
|
|
mqBaseMsgDTO.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag()); |
|
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
|
//1.话题被转为议题 组内成员
|
|
|
|
|
|
|
|
BasePointEventMsg pointEventMsg = new BasePointEventMsg(); |
|
|
|
pointEventMsg.setCustomerId(groupCache.getCustomerId()); |
|
|
|
pointEventMsg.setUserId(group.getTopicAuthorId()); |
|
|
|
pointEventMsg.setActionFlag(MqConstant.PLUS); |
|
|
|
pointEventMsg.setIsCommon(false); |
|
|
|
|
|
|
|
//某某小组中发布的话题“某某某…” (前十个字后面省略号) 被转为议题
|
|
|
|
|
|
|
|
pointEventMsg.setRemark(new StringBuilder(groupCache.getGroupName()).append("小组中发布的") |
|
|
|
.append( |
|
|
|
StringUtils.isBlank(topic.getTopicContent()) ? "语音话题" : |
|
|
|
"\"" + |
|
|
|
topic.getTopicContent() |
|
|
|
.substring(topic.getTopicContent().length() < NumConstant.TEN ? topic.getTopicContent().length() : NumConstant.TEN) |
|
|
|
+ (NumConstant.TEN > topic.getTopicContent().length() ? "\"" : "…\"") |
|
|
|
).append("被转为议题").toString()); |
|
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
|
|
|
|
|
//2.转话题为议题 组长
|
|
|
|
|
|
|
|
pointEventMsg.setCustomerId(groupCache.getCustomerId()); |
|
|
|
pointEventMsg.setUserId(param.getUserId()); |
|
|
|
pointEventMsg.setActionFlag(MqConstant.PLUS); |
|
|
|
pointEventMsg.setIsCommon(false); |
|
|
|
pointEventMsg.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag()); |
|
|
|
//将话题“某某某…” (前十个字后面省略号) 转为议题
|
|
|
|
pointEventMsg.setRemark(new StringBuilder("将话题") |
|
|
|
.append( |
|
|
|
"\"" + |
|
|
|
topic.getTopicContent() |
|
|
|
.substring(topic.getTopicContent().length() < NumConstant.TEN ? topic.getTopicContent().length() : NumConstant.TEN) |
|
|
|
+ (NumConstant.TEN > topic.getTopicContent().length() ? "\"" : "…\"") |
|
|
|
).append("转为议题").toString()); |
|
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
|
|
|
|
|
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList)); |
|
|
|
if(!SendMqMsgUtils.sendMsg(mqBaseMsgDTO).success()){ |
|
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(param)); |
|
|
|
} |
|
|
|
} |
|
|
|
return issueInfo; |
|
|
|
} |
|
|
|