|
|
@ -1604,7 +1604,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
pointEventMsg.setRemark(new StringBuilder(groupCache.getGroupName()).append("小组中发布的") |
|
|
|
.append( |
|
|
|
StringUtils.isBlank(content) ? "语音话题" : |
|
|
|
"\"" + |
|
|
|
"话题\"" + |
|
|
|
content |
|
|
|
.substring(NumConstant.ZERO,content.length() < NumConstant.TEN ? content.length() : NumConstant.TEN) |
|
|
|
+ (NumConstant.TEN > content.length() ? "\"" : "…\"") |
|
|
@ -1619,7 +1619,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
pointEventMsg2.setIsCommon(false); |
|
|
|
pointEventMsg2.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag()); |
|
|
|
//将话题“某某某…” (前十个字后面省略号) 转为议题
|
|
|
|
pointEventMsg2.setRemark(new StringBuilder("将话题") |
|
|
|
pointEventMsg2.setRemark(new StringBuilder("将") |
|
|
|
.append( |
|
|
|
new StringBuilder(new StringBuilder(pointEventMsg.getRemark().replaceFirst(new StringBuilder(groupCache.getGroupName()).append("小组中发布的").toString(),"")) |
|
|
|
.reverse().toString() |
|
|
@ -1738,7 +1738,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
pointEventMsg.setRemark(new StringBuilder(groupCache.getGroupName()).append("小组中发布的") |
|
|
|
.append( |
|
|
|
StringUtils.isBlank(content) ? "语音话题" : |
|
|
|
"\"" + |
|
|
|
"话题\"" + |
|
|
|
content |
|
|
|
.substring(NumConstant.ZERO,content.length() < NumConstant.TEN ? content.length() : NumConstant.TEN) |
|
|
|
+ (NumConstant.TEN > content.length() ? "\"" : "…\"") |
|
|
@ -1753,7 +1753,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
pointEventMsg2.setIsCommon(false); |
|
|
|
pointEventMsg2.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag()); |
|
|
|
//将话题“某某某…” (前十个字后面省略号) 转为议题
|
|
|
|
pointEventMsg2.setRemark(new StringBuilder("将话题") |
|
|
|
pointEventMsg2.setRemark(new StringBuilder("将") |
|
|
|
.append( |
|
|
|
new StringBuilder(new StringBuilder(pointEventMsg.getRemark().replaceFirst(new StringBuilder(groupCache.getGroupName()).append("小组中发布的").toString(),"")).reverse() |
|
|
|
.toString().replaceFirst("题议为转被","")).reverse() |
|
|
@ -1995,6 +1995,60 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 根据事件枚举发送积分事件 |
|
|
|
* @param param |
|
|
|
* @return void |
|
|
|
* @author wangc |
|
|
|
* @date 2021.01.04 16:41 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void sendTopicPointEventByEventType(TopicEventFormDTO param) { |
|
|
|
ResiTopicEntity topic = baseDao.selectById(param.getTopicId()); |
|
|
|
if(null == topic){ |
|
|
|
log.error("com.epmet.modules.topic.service.impl.ResiTopicServiceImpl.sendTopicPointEventByEventType,根据话题Id没有找到对应的话题信息,参数:{}",JSON.toJSONString(param |
|
|
|
)); |
|
|
|
return; |
|
|
|
} |
|
|
|
ResiGroupInfoRedisDTO group = resiGroupRedis.get(topic.getGroupId()); |
|
|
|
if(null == group){ |
|
|
|
log.error("com.epmet.modules.topic.service.impl.ResiTopicServiceImpl.sendTopicPointEventByEventType,根据组Id没有找到对应的小组信息,组Id:{}",topic.getGroupId()); |
|
|
|
return; |
|
|
|
} |
|
|
|
//某某小组中发布的话题“某某某…” (前十个字后面省略号) 被转为项目
|
|
|
|
if(EventEnum.TOPIC_SHIFTED_TO_PROJECT == param.getEvent()){ |
|
|
|
|
|
|
|
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO(); |
|
|
|
mqBaseMsgDTO.setEventClass("resi_group"); |
|
|
|
|
|
|
|
mqBaseMsgDTO.setEventTag(EventEnum.TOPIC_SHIFTED_TO_PROJECT.getEventTag()); |
|
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
|
//话题被转为项目 话题作者
|
|
|
|
|
|
|
|
BasePointEventMsg pointEventMsg = new BasePointEventMsg(); |
|
|
|
pointEventMsg.setCustomerId(group.getCustomerId()); |
|
|
|
pointEventMsg.setUserId(topic.getCreatedBy()); |
|
|
|
pointEventMsg.setActionFlag(MqConstant.PLUS); |
|
|
|
pointEventMsg.setIsCommon(false); |
|
|
|
pointEventMsg.setEventTag(EventEnum.TOPIC_SHIFTED_TO_ISSUE.getEventTag()); |
|
|
|
//某某小组中发布的话题“某某某…” (前十个字后面省略号) 被转为议题
|
|
|
|
String content = CharMatcher.WHITESPACE.trimFrom(topic.getTopicContent()); |
|
|
|
pointEventMsg.setRemark(new StringBuilder(group.getGroupName()).append("小组中发布的") |
|
|
|
.append( |
|
|
|
StringUtils.isBlank(content) ? "语音话题" : |
|
|
|
"话题\"" + |
|
|
|
content |
|
|
|
.substring(NumConstant.ZERO,content.length() < NumConstant.TEN ? content.length() : NumConstant.TEN) |
|
|
|
+ (NumConstant.TEN > content.length() ? "\"" : "…\"") |
|
|
|
).append("被转为项目").toString()); |
|
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
|
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList)); |
|
|
|
if(!SendMqMsgUtils.sendMsg(mqBaseMsgDTO).success()){ |
|
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(param)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|