虚拟清单--发布飞书消息

This commit is contained in:
zhn
2022-07-27 09:50:15 +08:00
parent d9a0f07515
commit 1b29bb2ed2
@@ -365,6 +365,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
lambdaQueryWrapper.in(DummyInventoryInfoEO::getDummyInventoryBaseId,dummyInventoryBaseEO.getId());
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = iDummyInventoryInfoEOService.list(lambdaQueryWrapper);
String contentLog = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows" + "</br>";
String contentLogFeishu = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows" + " ";
if(dummyContentChangeEOList.size() == 0){
//没有添加过需要进行第一次添加
@@ -415,6 +416,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
hrefList.add(href);
}
contentLog += count+". New regulations: " + StringUtils.join(hrefList,",") + "</br>";
contentLogFeishu += count+". New regulations: " + StringUtils.join(serialNumberAddList,",") + " ";
count++;
}
if(serialNumberDeleteList.size() != 0){
@@ -426,6 +428,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
hrefList.add(href);
}
contentLog += count + ". Remove regulations: " + StringUtils.join(hrefList,",") + "</br>";
contentLogFeishu += count + ". Remove regulations: " + StringUtils.join(serialNumberDeleteList,",") + " ";
}
if(serialNumberAddList.size() != 0 || serialNumberDeleteList.size() != 0){
@@ -436,7 +439,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
thirdIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getThirdId()).collect(Collectors.toList());
if(userIdList.size() != 0){
//封装消息的实体类
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated";
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated.";
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, title, contentLog,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
@@ -446,7 +449,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if(thirdIdList.size() != 0){
String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单";
try {
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentLog, MessageTypeEnum.PUSH.getName(), href);
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentLogFeishu, MessageTypeEnum.PUSH.getName(), href);
} catch (IOException e) {
e.printStackTrace();
}
@@ -476,18 +479,17 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
thirdIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getThirdId()).collect(Collectors.toList());
if(userIdList.size() != 0){
//封装消息的实体类 The XX virtual list you subscribed to has been withdrawn
String title = "The "+ baseEO.getName()+" 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 contentLog = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, title, contentLog,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
}
sendMsg(null, dummyInventoryBaseEO.getId(),null,dummyInventoryBaseEO.getState(),dummyInventoryBaseEO.getCut());
}
//飞书
if(thirdIdList.size() != 0){
String contentInfoTemp = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn";
String contentInfoTemp = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单";
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href);
}