合并分支 'feature_dev_20221025_message' 到 'dev_2nd_period_test'

Feature dev 20221025 message

查看合并请求 laws-nio/laws-weilai!234
This commit is contained in:
高嵩
2022-11-03 15:35:18 +08:00
2 changed files with 29 additions and 17 deletions
@@ -459,10 +459,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){
sbContentYes.append(countYes+". Remove regulations: "+StringUtils.join(hrefListDelete,","));
}
String hrefTemp = "<a href='/virtualListDetails?id=" + dummyInventoryBaseEO.getId() +
"&useExplain="+baseEO.getUseExplain()+
"&name=" + baseEO.getName() + "'" + " target='_blank'>" + baseEO.getName() + "</a>";
//消息英文--不带标签
String contentNo = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows" + sbContentNo;
//消息英文--带标签
String contentYes = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows"+ "</br>" + sbContentYes;;
String contentYes = "The "+ hrefTemp+" virtual list you subscribed to has been updated as follows"+ "</br>" + sbContentYes;;
int countInfoNo = 1;
StringBuilder sbContentINfoNo = new StringBuilder();
@@ -487,9 +491,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
//消息中文--不带标签
String contentInfoNo = "您所订阅的"+baseEO.getName()+"虚拟清单已更新,更新内容如下:"+sbContentINfoNo;
//消息中文--带标签
String contentInfoYes = "您所订阅的"+baseEO.getName()+"虚拟清单已更新,更新内容如下:"+"</br>"+sbContentInfoYes;
String contentInfoYes = "您所订阅的"+hrefTemp+"虚拟清单已更新,更新内容如下:"+"</br>"+sbContentInfoYes;
List<String> userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId());
List<String> thirdIdList = new ArrayList<>();
@@ -552,20 +554,25 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
List<String> userIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getId()).collect(Collectors.toList());
thirdIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getThirdId()).collect(Collectors.toList());
if(userIdList.size() != 0){
String hrefTemp = "<a href='/virtualListDetails?id=" + dummyInventoryBaseEO.getId() +
"&useExplain="+baseEO.getUseExplain()+
"&name=" + baseEO.getName() + "'" + " target='_blank'>" + baseEO.getName() + "</a>";
//封装消息的实体类 The XX virtual list you subscribed to has been withdrawn
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
//Please note that the XX virtual list you subscribed to has been withdrawn.
String contentLog = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
String contentCn = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回.";
String contentInfoEn = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
String contentCnNo = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回.";
String contentCnYes = "您订阅的虚拟清单"+ hrefTemp+"已被撤回.";
String contentInfoEnNo = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
String contentInfoEnYes = "Please note that the "+ hrefTemp+" virtual list you subscribed to has been withdrawn.";
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
title,
contentInfoEn,
contentInfoEn,
contentInfoEnNo,
contentInfoEnYes,
MessageTypeEnum.READ.getValue(),
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
contentCn,contentCn);
contentCnNo,contentCnYes);
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
}
@@ -88,28 +88,33 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
String createBy = problemKnowledgeBaseEO.getCreateBy();
//自己回复的时候不发消息
// if(!loginUser.getUsername().equals(createBy)){
SysUser sysUser = sysUserService.getUserByName(createBy);
String contentCNNo = "您发布的问题知识库信息"+problemKnowledgeBaseEO.getTitle()+"有新评论,请注意查看.";
String contentENNo = "In the Q&A knowledge "+problemKnowledgeBaseEO.getTitle()+" you created, a new comment has been added. Please be reminded to check it out.";
SysUser sysUser = sysUserService.getUserByName(createBy);
String contentCNNo = "您发布的问题知识库信息"+problemKnowledgeBaseEO.getTitle()+"有新评论,请注意查看.";
String contentENNo = "In the Q&A knowledge "+problemKnowledgeBaseEO.getTitle()+" you created, a new comment has been added. Please be reminded to check it out.";
String url = backUrl +"/problemknowledgeBase";
//发送消息(站内和飞书)
String href = "<a href='"+url + "'"+ " target='_blank'>"+ problemKnowledgeBaseEO.getTitle() + "</a>";
String contentINfoCNNo = "您发布的问题知识库信息"+href+"有新评论,请注意查看.";
String contentInfoENNo = "In the Q&A knowledge "+href+" you created, a new comment has been added. Please be reminded to check it out.";
//发送消息(站内和飞书)
//您发布的问题知识库信息XXXXXXXX有新评论,请注意查看。
//In the Q&A knowledge xxxxxxxx you created, a new comment has been added. Please be reminded to check it out.
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(Arrays.asList(sysUser.getId().split(",")),
"msgTitle",
contentENNo,
contentENNo,
contentInfoENNo,
MessageTypeEnum.PUSH.getValue(),
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
contentCNNo,
contentCNNo);
contentINfoCNNo);
this.sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(com.jero.modules.system.util.StringUtils.join(sysUser.getThirdId(), ","), sysUser.getThirdId());
String href = backUrl +"/problemknowledgeBase";
// String href = backUrl +"/problemknowledgeBase";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
feishuMsgVo.setUrl(href);
feishuMsgVo.setUrl(url);
feishuMsgVo.setContentEn(contentENNo);
feishuMsgVo.setContent(contentCNNo);