飞书消息--问题知识库转发推送
This commit is contained in:
+18
-10
@@ -17,6 +17,7 @@ import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||
import com.jero.modules.document.utils.ReadWordUtil;
|
||||
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
@@ -908,18 +909,25 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
//XXX向您分享了XXXXXXXXX,请查看。
|
||||
//XXX shared xxxxxxxx with you. Please be reminded to check it out.
|
||||
|
||||
String contentInfoFeiCn = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+",请查看";
|
||||
String contentInfoFeiCn = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+",请查看。";
|
||||
String msgContentENTemp = currentUser.getUsername()+" shared " + problemKnowledgeBaseTitle + " with you.Please be reminded to check it out.";
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setContentEn(msgContentENTemp);
|
||||
feishuMsgVo.setContent(contentInfoFeiCn);
|
||||
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
// feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
|
||||
// feishuMsgVo.setUrl(hrefFeishu);
|
||||
// feishuMsgVo.setContentEn(msgContentENTemp);
|
||||
// feishuMsgVo.setContent(contentInfoFeiCn);
|
||||
// this.iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
|
||||
this.iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
|
||||
// this.iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContentEN, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
||||
} catch (IOException e) {
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
params.put("contentInfoFeiEn",msgContentENTemp);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",hrefFeishu);
|
||||
params.put("titleCn", TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书推送失败");
|
||||
}
|
||||
this.sendWebsocket(problemKnowledgeBaseId, contentInfo);
|
||||
|
||||
Reference in New Issue
Block a user