飞书消息--订阅领域
This commit is contained in:
+28
-12
@@ -2349,19 +2349,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//飞书
|
||||
try {
|
||||
String contentInfoFeiShu = "In the "+ technologyTerritoryName
|
||||
+ " technical field you subscribed to, "+
|
||||
+ " technical field you subscribed to, the "+
|
||||
serialNumber +" has been updated.";
|
||||
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + serialNumber;
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||
feishuMsgVo.setUrl(hrefTemp);
|
||||
feishuMsgVo.setContentEn(contentInfoFeiShu);
|
||||
feishuMsgVo.setContent(contentInfoFeiShuCn);
|
||||
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
// feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||
// feishuMsgVo.setUrl(hrefTemp);
|
||||
// feishuMsgVo.setContentEn(contentInfoFeiShu);
|
||||
// feishuMsgVo.setContent(contentInfoFeiShuCn);
|
||||
// iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiShuCn);
|
||||
params.put("contentInfoFeiEn",contentInfoFeiShu);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",hrefTemp);
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
|
||||
|
||||
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFeiShu, MessageTypeEnum.PUSH.getName(), hrefTemp);
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
@@ -3570,7 +3579,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<String> userList = new ArrayList<>();
|
||||
String technologyTerritoryNameEn = "";
|
||||
if(StringUtils.isNotBlank(technologyTerritory) && !technologyTerritory.equals(technologyTerritoryNew) && domainUserRelList.size() != 0){
|
||||
if(StringUtils.isNotBlank(technologyTerritory) && technologyTerritory.equals(technologyTerritoryNew) && domainUserRelList.size() != 0){
|
||||
List<DomainUserRel> collect = domainUserRelList.stream()
|
||||
.filter(e -> technologyTerritory.contains(e.getDomainId()))
|
||||
.collect(Collectors.toList());
|
||||
@@ -3623,7 +3632,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
//订阅管理
|
||||
if(thirdIdList.size() != 0){
|
||||
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, " +
|
||||
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||
serialNumber+" has been updated.";
|
||||
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + serialNumber;
|
||||
try {
|
||||
@@ -3634,10 +3643,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
feishuMsgVo.setUrl(url);
|
||||
feishuMsgVo.setContentEn(contentInfoFei);
|
||||
feishuMsgVo.setContent(contentInfoFeiCn);
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
params.put("contentInfoFeiEn",contentInfoFei);
|
||||
params.put("userIdList",userList);
|
||||
params.put("back_url",url);
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
|
||||
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
// iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
log.error("文档新增飞书消息推送失败");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user