飞书消息--文档库转发推送

This commit is contained in:
zhn
2023-04-11 09:42:00 +08:00
parent f956ee61e5
commit b53d52b5fb
2 changed files with 19 additions and 11 deletions
@@ -5669,18 +5669,26 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
list.add(serialNumber);
}
});
String contentTemp = sysUser.getUsername() + " shared " + StringUtils.join(list, ",") + " with you, please be reminded to check it out.";
String contentTempCn = sysUser.getUsername() + "向您分享了" + StringUtils.join(list, ",") + "请查看.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
feishuMsgVo.setUrl(encode);
feishuMsgVo.setContentEn(contentTemp);
feishuMsgVo.setContent(contentTempCn);
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}),feishuMsgVo);
String contentTemp = sysUser.getUsername() + " shared " + StringUtils.join(list, ",") + " with you, Please be reminded to check it out.";
String contentTempCn = sysUser.getUsername() + "向您分享了" + StringUtils.join(list, ",") + "请查看";
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
// feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
// feishuMsgVo.setUrl(encode);
// feishuMsgVo.setContentEn(contentTemp);
// feishuMsgVo.setContent(contentTempCn);
// iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}),feishuMsgVo);
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
//飞书消息模板-20230410
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentTempCn);
params.put("contentInfoFeiEn",contentTemp);
params.put("userIdList",userIdList);
params.put("back_url",encode);
params.put("titleCn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
}
} catch (IOException e) {
} catch (Exception e) {
log.error("飞书推送失败");
}
sendWebsocket(documentIds, contentInfo);
@@ -75,7 +75,7 @@ public enum TemplateInfoEnum2 {
/**
* 转发推送
*/
TRANSPOND_PUSH("转发推送","ctp_AArfkau1GRMZ","Share / Forward"),
TRANSPOND_PUSH("转发推送","","Share / Forward"),