问题知识库转发推送--发送飞书消息
This commit is contained in:
+15
-1
@@ -18,6 +18,7 @@ import com.jero.modules.document.enums.SearchEnum;
|
|||||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||||
import com.jero.modules.document.utils.ReadWordUtil;
|
import com.jero.modules.document.utils.ReadWordUtil;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.message.websocket.WebSocket;
|
import com.jero.modules.message.websocket.WebSocket;
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
@@ -886,7 +887,20 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||||
//飞书
|
//飞书
|
||||||
try {
|
try {
|
||||||
this.iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContentEN, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
//XXX向您分享了XXXXXXXXX,请查看。
|
||||||
|
//XXX shared xxxxxxxx with you. Please be reminded to check it out.
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
this.iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||||
|
|
||||||
|
// this.iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContentEN, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书推送失败");
|
log.error("飞书推送失败");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user