文档编辑--订阅领域发消息
This commit is contained in:
+19
-20
@@ -3406,11 +3406,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
mapTemp.put("domainId", map.get("technology_territory"));
|
mapTemp.put("domainId", map.get("technology_territory"));
|
||||||
mapTemp.put("documentId", map.get("id"));
|
mapTemp.put("documentId", map.get("id"));
|
||||||
//订阅技术领域的人和订阅该条标准的人
|
//订阅技术领域的人和订阅该条标准的人
|
||||||
// List<String> userIdList = domainUserRelService.queryDomainUserRelInfo(mapTemp);
|
|
||||||
//订阅技术领域发消息
|
//订阅技术领域发消息
|
||||||
List<DomainUserRel> domainUserRelList = domainManageService.list();
|
List<DomainUserRel> domainUserRelList = domainManageService.list();
|
||||||
// List<String> thirdIdListAll = new ArrayList<>();
|
|
||||||
// List<String> userListAll = new ArrayList<>();
|
|
||||||
List<String> thirdIdList = new ArrayList<>();
|
List<String> thirdIdList = new ArrayList<>();
|
||||||
List<String> userList = new ArrayList<>();
|
List<String> userList = new ArrayList<>();
|
||||||
String technologyTerritoryNameEn = "";
|
String technologyTerritoryNameEn = "";
|
||||||
@@ -3426,12 +3423,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if(sysUsersFeishu.size() != 0){
|
if(sysUsersFeishu.size() != 0){
|
||||||
thirdIdList = sysUsersFeishu.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
thirdIdList = sysUsersFeishu.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||||
userList = sysUsersFeishu.stream().map(SysUser::getId).collect(Collectors.toList());
|
userList = sysUsersFeishu.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||||
// if(thirdIdList.size() != 0){
|
|
||||||
// thirdIdListAll.addAll(thirdIdList);
|
|
||||||
// }
|
|
||||||
// if(userList.size() != 0){
|
|
||||||
// userListAll.addAll(userList);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(domainIdList.size() != 0){
|
if(domainIdList.size() != 0){
|
||||||
@@ -3467,19 +3458,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) {
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) {
|
||||||
userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||||
userIdListUpdateFeishu = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
userIdListUpdateFeishu = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||||
// if(userIdListUpdate.size() != 0){
|
|
||||||
// userListAll.addAll(userIdListUpdate);
|
|
||||||
// }
|
|
||||||
// if(userIdListUpdateFeishu.size() != 0){
|
|
||||||
// thirdIdListAll.addAll(userIdListUpdateFeishu);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//订阅管理
|
//订阅管理
|
||||||
if(thirdIdList.size() != 0){
|
if(thirdIdList.size() != 0){
|
||||||
// thirdIdListAll = thirdIdListAll.stream().distinct().collect(Collectors.toList());
|
|
||||||
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||||
category + " " + serialNumber+" has been updated.";
|
category + " " + serialNumber+" has been updated.";
|
||||||
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;
|
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;
|
||||||
@@ -3510,15 +3494,30 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
//您订阅的XXX已被修改
|
//您订阅的XXX已被修改
|
||||||
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||||
String msgTitle = "The " + technologyTerritoryNameEn + " technical field you subscribed to has been updated";
|
String msgTitle = "The " + technologyTerritoryNameEn + " technical field you subscribed to has been updated";
|
||||||
|
//消息英文--不带标签
|
||||||
|
String contentNo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||||
|
category + " " + serialNumber+" has been updated.";;
|
||||||
|
|
||||||
|
//消息英文--带标签
|
||||||
|
String contentYes = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||||
|
category + " " + href+" has been updated.";;
|
||||||
|
|
||||||
|
//消息中文--不带标签
|
||||||
|
String contentInfoNo = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;;
|
||||||
|
|
||||||
|
//消息中文--带标签
|
||||||
|
String contentInfoYes = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + href;;
|
||||||
|
|
||||||
|
|
||||||
// 封装消息的实体类
|
// 封装消息的实体类
|
||||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList,
|
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList,
|
||||||
msgTitle,
|
msgTitle,
|
||||||
contentInfoFei,
|
contentNo,
|
||||||
contentInfo,
|
contentYes,
|
||||||
MessageTypeEnum.READ.getValue(),
|
MessageTypeEnum.READ.getValue(),
|
||||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||||
null,
|
contentInfoNo,
|
||||||
null);
|
contentInfoYes);
|
||||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
sendWebsocket((String) map.get("id"), contentInfo);
|
sendWebsocket((String) map.get("id"), contentInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user