飞书消息
This commit is contained in:
+6
-3
@@ -2967,6 +2967,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String serialNumber = (String) dataList.get(0).get("serial_number");
|
||||
String category = (String)map.get("lei4_bie2");
|
||||
//只要修改了标准,就需要向订阅用户发送消息(内容为-->XXX对“GB 7258 进行了修改请及时查看”)
|
||||
//向订阅领域管理中订阅了该技术领域的人和文档库中订阅了该条文档的人发送消息
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
@@ -2978,6 +2979,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(SysUser::getId,userIdList);
|
||||
List<SysUser> sysUserList = sysUserService.list(wrapper);
|
||||
sysUserList = sysUserList.stream().filter(e->StringUtils.isNotBlank(e.getThirdId())).collect(Collectors.toList());
|
||||
List<String> thirdIdList = sysUserList.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
|
||||
String id = (String) map.get("id");
|
||||
@@ -2985,7 +2987,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String href = "<a href='/docManage/library/detail?id=" + id +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
String url = backUrl + "/docManage/library/detail?id=" + id;
|
||||
|
||||
if (StringUtils.isNotBlank(sbStr.toString())) {
|
||||
//您订阅的XXX已被修改
|
||||
@@ -3002,8 +3003,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
//飞书
|
||||
try {
|
||||
String content = sysUser.getUsername() + " update " + serialNumber + ",Please pay attention to check.";
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), content, MessageTypeEnum.READ.getName(), url);
|
||||
String replace = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
||||
String contentInfo = "In the " + category + serialNumber+" you subscribed to, "+sysUser.getUsername()+" changed the " + replace.toString();
|
||||
String url = backUrl + "/isps/userAnnouncement";
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfo, MessageTypeEnum.READ.getName(), url);
|
||||
} catch (IOException e) {
|
||||
log.error("文档新增飞书消息推送失败");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user