Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
刘彦泽
2023-04-11 10:03:28 +08:00
3 changed files with 37 additions and 21 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"),
@@ -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);