|
@ -1880,14 +1880,22 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
* @Date 2020/12/31 10:28 |
|
|
* @Date 2020/12/31 10:28 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public void sendWxmpUpdateSubscribe(TokenDto tokenDto, String topicId, String type) { |
|
|
public void sendWxmpUpdateSubscribe(TokenDto tokenDto, String sourceId, String type) { |
|
|
if (StringUtils.isBlank(type) || StringUtils.isBlank(topicId)) { |
|
|
if (StringUtils.isBlank(type) || StringUtils.isBlank(sourceId)) { |
|
|
logger.warn("话题转议题-sourceType活sourceId为空"); |
|
|
logger.warn("话题转议题-sourceType活sourceId为空"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
try{ |
|
|
try{ |
|
|
//获取话题的groupId,创建人
|
|
|
//获取话题的groupId,创建人
|
|
|
ResiTopicEntity resiTopicEntity = baseDao.selectById(topicId); |
|
|
ResiTopicEntity resiTopicEntity = null; |
|
|
|
|
|
if (WxmpSubscribeConstant.TYPE_COMMENT.equals(type)){ |
|
|
|
|
|
resiTopicEntity = baseDao.selectById(sourceId); |
|
|
|
|
|
} |
|
|
|
|
|
if (WxmpSubscribeConstant.TYPE_SHIFT_ISSUE.equals(type)){ |
|
|
|
|
|
resiTopicEntity = baseDao.selectOne(new QueryWrapper<ResiTopicEntity>() |
|
|
|
|
|
.eq("del_flag",0) |
|
|
|
|
|
.eq("issue_id",sourceId)); |
|
|
|
|
|
} |
|
|
if (resiTopicEntity == null){ |
|
|
if (resiTopicEntity == null){ |
|
|
log.warn("sendWxmpUpdateSubscribe根据topicid获取议题详情为空"); |
|
|
log.warn("sendWxmpUpdateSubscribe根据topicid获取议题详情为空"); |
|
|
return; |
|
|
return; |
|
@ -1900,7 +1908,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
String gridId = resiGroupEntity.getGridId(); |
|
|
String gridId = resiGroupEntity.getGridId(); |
|
|
//获取所有关心这个话题的userId列表(发布者+评论者)
|
|
|
//获取所有关心这个话题的userId列表(发布者+评论者)
|
|
|
ResiQueryCommentFormDTO resiQueryCommentFormDTO = new ResiQueryCommentFormDTO(); |
|
|
ResiQueryCommentFormDTO resiQueryCommentFormDTO = new ResiQueryCommentFormDTO(); |
|
|
resiQueryCommentFormDTO.setTopicId(topicId); |
|
|
resiQueryCommentFormDTO.setTopicId(resiTopicEntity.getId()); |
|
|
resiQueryCommentFormDTO.setPageNo(1); |
|
|
resiQueryCommentFormDTO.setPageNo(1); |
|
|
resiQueryCommentFormDTO.setPageSize(10000); |
|
|
resiQueryCommentFormDTO.setPageSize(10000); |
|
|
List<ResiCommentResultDTO> commentList = resiTopicCommentService.getCommentList(tokenDto, resiQueryCommentFormDTO).getData(); |
|
|
List<ResiCommentResultDTO> commentList = resiTopicCommentService.getCommentList(tokenDto, resiQueryCommentFormDTO).getData(); |
|
@ -1928,7 +1936,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
subscribeUpdateFormDTO.setClientType(WxmpMessageConstant.RESI); |
|
|
subscribeUpdateFormDTO.setClientType(WxmpMessageConstant.RESI); |
|
|
subscribeUpdateFormDTO.setCustomerId(customerId); |
|
|
subscribeUpdateFormDTO.setCustomerId(customerId); |
|
|
subscribeUpdateFormDTO.setGridId(gridId); |
|
|
subscribeUpdateFormDTO.setGridId(gridId); |
|
|
subscribeUpdateFormDTO.setSourceId(topicId); |
|
|
subscribeUpdateFormDTO.setSourceId(sourceId); |
|
|
subscribeUpdateFormDTO.setMessageTime(now); |
|
|
subscribeUpdateFormDTO.setMessageTime(now); |
|
|
subscribeUpdateFormDTO.setUserId(toUser); |
|
|
subscribeUpdateFormDTO.setUserId(toUser); |
|
|
msgList.add(subscribeUpdateFormDTO); |
|
|
msgList.add(subscribeUpdateFormDTO); |
|
@ -1937,7 +1945,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
epmetMessageOpenFeignClient.sendWxSubscribeUpdate(msgList); |
|
|
epmetMessageOpenFeignClient.sendWxSubscribeUpdate(msgList); |
|
|
} |
|
|
} |
|
|
}catch (Exception e){ |
|
|
}catch (Exception e){ |
|
|
logger.warn("话题相关 发送微信订阅失败,"+e.getMessage()+",topicId="+topicId+" 类型="+type); |
|
|
logger.warn("话题相关 发送微信订阅失败,"+e.getMessage()+",sourceId="+sourceId+" 类型="+type); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|