飞书消息-问题知识库评论信息
This commit is contained in:
+21
-10
@@ -6,6 +6,7 @@ import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
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.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
@@ -36,7 +37,9 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -94,7 +97,7 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
|
||||
String url = backUrl +"/problemknowledgeBase?id="+problemKnowledgeBaseEO.getId();
|
||||
|
||||
String href = "<a href='"+url + "'"+ " target='_blank'>"+ problemKnowledgeBaseEO.getTitle() + "</a>";
|
||||
String contentINfoCNNo = "您发布的问题知识库信息"+href+"有新评论,请注意查看.";
|
||||
String contentINfoCNNo = "您发布的问题知识库信息"+href+"有新评论,请注意查看。";
|
||||
String contentInfoENNo = "In the Q&A knowledge "+href+" you created, a new comment has been added. Please be reminded to check it out.";
|
||||
|
||||
//发送消息(站内和飞书)
|
||||
@@ -111,16 +114,24 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
|
||||
this.sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(com.jero.modules.system.util.StringUtils.join(sysUser.getThirdId(), ","), sysUser.getThirdId());
|
||||
|
||||
// String href = backUrl +"/problemknowledgeBase";
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
|
||||
feishuMsgVo.setUrl(url);
|
||||
feishuMsgVo.setContentEn(contentENNo);
|
||||
feishuMsgVo.setContent(contentCNNo);
|
||||
|
||||
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
// feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
|
||||
// feishuMsgVo.setUrl(url);
|
||||
// feishuMsgVo.setContentEn(contentENNo);
|
||||
// feishuMsgVo.setContent(contentCNNo);
|
||||
try {
|
||||
this.iFeishuService.sendCardMsgTerritory(sysUser.getThirdId().split(","), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
// this.iFeishuService.sendCardMsgTerritory(sysUser.getThirdId().split(","), feishuMsgVo);
|
||||
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentCNNo);
|
||||
params.put("contentInfoFeiEn",contentENNo);
|
||||
params.put("userIdList",Arrays.asList(sysUser.getId().split(",")));
|
||||
params.put("back_url",url);
|
||||
params.put("titleCn", TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user