虚拟清单撤回不需要发消息

This commit is contained in:
zhn
2022-11-03 17:11:16 +08:00
parent 413b0b32e2
commit 20f5e1e683
@@ -547,52 +547,52 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
} }
}else{ }else{
//撤回,需要发消息 //撤回,需要发消息
try { // try {
List<String> userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId()); // List<String> userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId());
List<String> thirdIdList = new ArrayList<>(); // List<String> thirdIdList = new ArrayList<>();
if(userNameList.size() != 0){ // if(userNameList.size() != 0){
List<String> userIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getId()).collect(Collectors.toList()); // 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()); // thirdIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getThirdId()).collect(Collectors.toList());
if(userIdList.size() != 0){ // if(userIdList.size() != 0){
String hrefTemp = "<a href='/virtualListDetails?id=" + dummyInventoryBaseEO.getId() + // String hrefTemp = "<a href='/virtualListDetails?id=" + dummyInventoryBaseEO.getId() +
"&useExplain="+baseEO.getUseExplain()+ // "&useExplain="+baseEO.getUseExplain()+
"&name=" + baseEO.getName() + "'" + " target='_blank'>" + baseEO.getName() + "</a>"; // "&name=" + baseEO.getName() + "'" + " target='_blank'>" + baseEO.getName() + "</a>";
//封装消息的实体类 The XX virtual list you subscribed to has been withdrawn // //封装消息的实体类 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. // //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.";
String contentCnNo = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回."; // String contentCnNo = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回.";
String contentCnYes = "您订阅的虚拟清单"+ hrefTemp+"已被撤回."; // String contentCnYes = "您订阅的虚拟清单"+ hrefTemp+"已被撤回.";
String contentInfoEnNo = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; // 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."; // String contentInfoEnYes = "Please note that the "+ hrefTemp+" virtual list you subscribed to has been withdrawn.";
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, // SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
title, // title,
contentInfoEnNo, // contentInfoEnNo,
contentInfoEnYes, // contentInfoEnYes,
MessageTypeEnum.READ.getValue(), // MessageTypeEnum.READ.getValue(),
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(), // MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
contentCnNo,contentCnYes); // contentCnNo,contentCnYes);
sysAnnouncementService.saveAnnouncement(sysAnnouncement); // sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title); // bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
} // }
} // }
//飞书 //飞书
if(thirdIdList.size() != 0){ // 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 contentInfoFeiCn = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回."; // String contentInfoFeiCn = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回.";
String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单"; // String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); // FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName()); // feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
feishuMsgVo.setUrl(href); // feishuMsgVo.setUrl(href);
feishuMsgVo.setContentEn(contentInfoTemp); // feishuMsgVo.setContentEn(contentInfoTemp);
feishuMsgVo.setContent(contentInfoFeiCn); // feishuMsgVo.setContent(contentInfoFeiCn);
iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}), feishuMsgVo,null,null); // iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}), feishuMsgVo,null,null);
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href); //// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href);
} // }
}catch (Exception e){ // }catch (Exception e){
e.printStackTrace(); // e.printStackTrace();
} // }
} }
} }
// /** // /**