|
@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
|
|
import com.epmet.commons.rocketmq.constants.TopicConstants; |
|
|
import com.epmet.commons.rocketmq.messages.GroupAchievementMQMsg; |
|
|
import com.epmet.commons.rocketmq.messages.GroupAchievementMQMsg; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.MqConstant; |
|
|
import com.epmet.commons.tools.constant.MqConstant; |
|
@ -45,6 +46,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
import com.epmet.commons.tools.utils.*; |
|
|
import com.epmet.commons.tools.utils.*; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.constant.OrgInfoConstant; |
|
|
import com.epmet.constant.OrgInfoConstant; |
|
|
|
|
|
import com.epmet.constant.SystemMessageType; |
|
|
import com.epmet.constant.WxmpMessageConstant; |
|
|
import com.epmet.constant.WxmpMessageConstant; |
|
|
import com.epmet.dto.CustomerGridDTO; |
|
|
import com.epmet.dto.CustomerGridDTO; |
|
|
import com.epmet.dto.IssueApplicationDTO; |
|
|
import com.epmet.dto.IssueApplicationDTO; |
|
@ -414,10 +416,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
if (null != publishTopicCount && publishTopicCount <= NumConstant.THREE){ |
|
|
if (null != publishTopicCount && publishTopicCount <= NumConstant.THREE){ |
|
|
|
|
|
|
|
|
//mq的事件类型
|
|
|
//mq的事件类型
|
|
|
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO(); |
|
|
//MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO();
|
|
|
mqBaseMsgDTO.setEventClass(EventEnum.PUBLISH_ONE_TOPIC.getEventClass()); |
|
|
//mqBaseMsgDTO.setEventClass(EventEnum.PUBLISH_ONE_TOPIC.getEventClass());
|
|
|
//事件code
|
|
|
//事件code
|
|
|
mqBaseMsgDTO.setEventTag(EventEnum.PUBLISH_ONE_TOPIC.getEventTag()); |
|
|
//mqBaseMsgDTO.setEventTag(EventEnum.PUBLISH_ONE_TOPIC.getEventTag());
|
|
|
|
|
|
|
|
|
|
|
|
String eventClass = TopicConstants.RESI_GROUP; |
|
|
|
|
|
String eventTag = SystemMessageType.PUBLISH_ONE_TOPIC; |
|
|
|
|
|
|
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
BasePointEventMsg pointEventMsg = new BasePointEventMsg(); |
|
|
BasePointEventMsg pointEventMsg = new BasePointEventMsg(); |
|
|
ResiGroupInfoRedisDTO resiGroupInfoRedisDTO = resiGroupRedis.get(resiTopicPublishFormDTO.getGroupId()); |
|
|
ResiGroupInfoRedisDTO resiGroupInfoRedisDTO = resiGroupRedis.get(resiTopicPublishFormDTO.getGroupId()); |
|
@ -449,13 +455,19 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
// 加分
|
|
|
// 加分
|
|
|
pointEventMsg.setActionFlag(MqConstant.PLUS); |
|
|
pointEventMsg.setActionFlag(MqConstant.PLUS); |
|
|
pointEventMsg.setIsCommon(false); |
|
|
pointEventMsg.setIsCommon(false); |
|
|
pointEventMsg.setEventTag(mqBaseMsgDTO.getEventTag()); |
|
|
pointEventMsg.setEventTag(eventTag); |
|
|
pointEventMsg.setEventClass(mqBaseMsgDTO.getEventClass()); |
|
|
pointEventMsg.setEventClass(eventClass); |
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
|
|
|
|
|
|
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList)); |
|
|
//mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList));
|
|
|
Result msgResult= SendMqMsgUtils.sendMsg(mqBaseMsgDTO); |
|
|
//Result msgResult= SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
|
|
|
if(!msgResult.success()){ |
|
|
|
|
|
|
|
|
SystemMsgFormDTO msgFormDTO = new SystemMsgFormDTO(); |
|
|
|
|
|
msgFormDTO.setMessageType(eventTag); |
|
|
|
|
|
msgFormDTO.setContent(pointEventMsgList); |
|
|
|
|
|
Result sendMsgResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(msgFormDTO); |
|
|
|
|
|
|
|
|
|
|
|
if(!sendMsgResult.success()){ |
|
|
logger.error(TopicConstant.CREATE_TOPIC_FAILURE); |
|
|
logger.error(TopicConstant.CREATE_TOPIC_FAILURE); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -810,10 +822,10 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//mq的事件类型
|
|
|
//mq的事件类型
|
|
|
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO(); |
|
|
//MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO();
|
|
|
mqBaseMsgDTO.setEventClass("resi_group"); |
|
|
//mqBaseMsgDTO.setEventClass("resi_group");
|
|
|
//事件code 组长解决组内话题
|
|
|
//事件code 组长解决组内话题
|
|
|
mqBaseMsgDTO.setEventTag(EventEnum.LEADER_RESOLVE_TOPIC.getEventTag()); |
|
|
//mqBaseMsgDTO.setEventTag(EventEnum.LEADER_RESOLVE_TOPIC.getEventTag());
|
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
BasePointEventMsg pointEventMsg = new BasePointEventMsg(); |
|
|
BasePointEventMsg pointEventMsg = new BasePointEventMsg(); |
|
@ -840,8 +852,15 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
"已被解决"); |
|
|
"已被解决"); |
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
|
|
|
|
|
|
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList)); |
|
|
//mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList));
|
|
|
if (!SendMqMsgUtils.sendMsg(mqBaseMsgDTO).success()) { |
|
|
//Result<String> result = SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
|
|
|
|
|
|
|
|
|
|
|
|
SystemMsgFormDTO msgFormDTO = new SystemMsgFormDTO(); |
|
|
|
|
|
msgFormDTO.setContent(pointEventMsgList); |
|
|
|
|
|
msgFormDTO.setMessageType(SystemMessageType.LEADER_RESOLVE_TOPIC); |
|
|
|
|
|
Result result = epmetMessageOpenFeignClient.sendSystemMsgByMQ(msgFormDTO); |
|
|
|
|
|
|
|
|
|
|
|
if (!result.success()) { |
|
|
log.error("组长解决话题事件发送失败,参数:{}", JSON.toJSONString(closeFormDTO)); |
|
|
log.error("组长解决话题事件发送失败,参数:{}", JSON.toJSONString(closeFormDTO)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -1931,15 +1950,22 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
).append("转为议题").toString()); |
|
|
).append("转为议题").toString()); |
|
|
pointEventMsgList.add(pointEventMsg2); |
|
|
pointEventMsgList.add(pointEventMsg2); |
|
|
pointEventMsgList.forEach(item -> { |
|
|
pointEventMsgList.forEach(item -> { |
|
|
MqBaseMsgDTO msgDTO = new MqBaseMsgDTO(); |
|
|
//MqBaseMsgDTO msgDTO = new MqBaseMsgDTO();
|
|
|
msgDTO.setEventClass("resi_group"); |
|
|
//msgDTO.setEventClass("resi_group");
|
|
|
//事件code 因为楼院小组的事件回调统一入口,外层的EventTag不能够判断具体的事件
|
|
|
//事件code 因为楼院小组的事件回调统一入口,外层的EventTag不能够判断具体的事件
|
|
|
//因为可能会一次发送多个事件集合,需要对集合里的对象逐个判断
|
|
|
//因为可能会一次发送多个事件集合,需要对集合里的对象逐个判断
|
|
|
msgDTO.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag()); |
|
|
//msgDTO.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag());
|
|
|
List<BasePointEventMsg> msgList = new ArrayList<>(); |
|
|
List<BasePointEventMsg> msgList = new ArrayList<>(); |
|
|
msgList.add(item); |
|
|
msgList.add(item); |
|
|
msgDTO.setMsg(JSON.toJSONString(msgList)); |
|
|
//msgDTO.setMsg(JSON.toJSONString(msgList));
|
|
|
if(!SendMqMsgUtils.sendMsg(msgDTO).success()){ |
|
|
|
|
|
|
|
|
SystemMsgFormDTO msgForm = new SystemMsgFormDTO(); |
|
|
|
|
|
msgForm.setMessageType(SystemMessageType.SHIFT_TOPIC_TO_ISSUE); |
|
|
|
|
|
msgForm.setContent(msgList); |
|
|
|
|
|
Result sendMsgResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(msgForm); |
|
|
|
|
|
|
|
|
|
|
|
//Result<String> sendMsgResult = SendMqMsgUtils.sendMsg(msgDTO);
|
|
|
|
|
|
if(!sendMsgResult.success()){ |
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(topicTurnIssueFromDTO)); |
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(topicTurnIssueFromDTO)); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -2104,15 +2130,22 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
).append("转为议题").toString()); |
|
|
).append("转为议题").toString()); |
|
|
pointEventMsgList.add(pointEventMsg2); |
|
|
pointEventMsgList.add(pointEventMsg2); |
|
|
pointEventMsgList.forEach(item -> { |
|
|
pointEventMsgList.forEach(item -> { |
|
|
MqBaseMsgDTO msgDTO = new MqBaseMsgDTO(); |
|
|
//MqBaseMsgDTO msgDTO = new MqBaseMsgDTO();
|
|
|
msgDTO.setEventClass("resi_group"); |
|
|
//msgDTO.setEventClass("resi_group");
|
|
|
//事件code 因为楼院小组的事件回调统一入口,外层的EventTag不能够判断具体的事件
|
|
|
//事件code 因为楼院小组的事件回调统一入口,外层的EventTag不能够判断具体的事件
|
|
|
//因为可能会一次发送多个事件集合,需要对集合里的对象逐个判断
|
|
|
//因为可能会一次发送多个事件集合,需要对集合里的对象逐个判断
|
|
|
msgDTO.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag()); |
|
|
//msgDTO.setEventTag(EventEnum.SHIFT_TOPIC_TO_ISSUE.getEventTag());
|
|
|
List<BasePointEventMsg> msgList = new ArrayList<>(); |
|
|
List<BasePointEventMsg> msgList = new ArrayList<>(); |
|
|
msgList.add(item); |
|
|
msgList.add(item); |
|
|
msgDTO.setMsg(JSON.toJSONString(msgList)); |
|
|
//msgDTO.setMsg(JSON.toJSONString(msgList));
|
|
|
if(!SendMqMsgUtils.sendMsg(msgDTO).success()){ |
|
|
|
|
|
|
|
|
SystemMsgFormDTO sendMsgForm = new SystemMsgFormDTO(); |
|
|
|
|
|
sendMsgForm.setContent(msgList); |
|
|
|
|
|
sendMsgForm.setMessageType(SystemMessageType.SHIFT_TOPIC_TO_ISSUE); |
|
|
|
|
|
Result sendMsgResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(sendMsgForm); |
|
|
|
|
|
|
|
|
|
|
|
//Result<String> sendMsgResult = SendMqMsgUtils.sendMsg(msgDTO);
|
|
|
|
|
|
if(!sendMsgResult.success()){ |
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(param)); |
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(param)); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -2462,10 +2495,10 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
//某某小组中发布的话题“某某某…” (前十个字后面省略号) 被转为项目
|
|
|
//某某小组中发布的话题“某某某…” (前十个字后面省略号) 被转为项目
|
|
|
if(EventEnum.TOPIC_SHIFTED_TO_PROJECT == param.getEvent()){ |
|
|
if(EventEnum.TOPIC_SHIFTED_TO_PROJECT == param.getEvent()){ |
|
|
|
|
|
|
|
|
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO(); |
|
|
//MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO();
|
|
|
mqBaseMsgDTO.setEventClass("resi_group"); |
|
|
//mqBaseMsgDTO.setEventClass("resi_group");
|
|
|
|
|
|
|
|
|
mqBaseMsgDTO.setEventTag(EventEnum.TOPIC_SHIFTED_TO_PROJECT.getEventTag()); |
|
|
//mqBaseMsgDTO.setEventTag(EventEnum.TOPIC_SHIFTED_TO_PROJECT.getEventTag());
|
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>(); |
|
|
//话题被转为项目 话题作者
|
|
|
//话题被转为项目 话题作者
|
|
|
|
|
|
|
|
@ -2493,8 +2526,16 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
+ (NumConstant.TEN > content.length() ? "\"" : "…\"") |
|
|
+ (NumConstant.TEN > content.length() ? "\"" : "…\"") |
|
|
).append("被转为项目").toString()); |
|
|
).append("被转为项目").toString()); |
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
pointEventMsgList.add(pointEventMsg); |
|
|
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList)); |
|
|
//mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList));
|
|
|
if(!SendMqMsgUtils.sendMsg(mqBaseMsgDTO).success()){ |
|
|
|
|
|
|
|
|
//Result<String> sendMsgResult = SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
|
|
|
|
|
|
|
|
|
|
|
|
SystemMsgFormDTO sendMsgForm = new SystemMsgFormDTO(); |
|
|
|
|
|
sendMsgForm.setContent(pointEventMsgList); |
|
|
|
|
|
sendMsgForm.setMessageType(SystemMessageType.TOPIC_TO_PROJECT); |
|
|
|
|
|
Result sendMsgResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(sendMsgForm); |
|
|
|
|
|
|
|
|
|
|
|
if(!sendMsgResult.success()){ |
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(param)); |
|
|
log.error("话题转议题事件发送失败,参数:{}",JSON.toJSONString(param)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|