飞书消息
This commit is contained in:
+11
@@ -483,4 +483,15 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
|||||||
List<OSSFileForDocumentLibrary> fileInfos = bussDocumentLibraryEOService.getFileInfos(id);
|
List<OSSFileForDocumentLibrary> fileInfos = bussDocumentLibraryEOService.getFileInfos(id);
|
||||||
return Result.OK(fileInfos);
|
return Result.OK(fileInfos);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据id查询编号和标题
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||||
|
@GetMapping(value = "/getTitle")
|
||||||
|
public Result<?> getTitle(String id,String cut) {
|
||||||
|
String title = bussDocumentLibraryEOService.getTitle(id, cut);
|
||||||
|
return Result.OK(title);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -218,4 +218,6 @@ public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibr
|
|||||||
IPage getPageDummy(Map<String, Object> parameter);
|
IPage getPageDummy(Map<String, Object> parameter);
|
||||||
|
|
||||||
void isModifyForOcrAndSplit(Map<String, Object> parameter);
|
void isModifyForOcrAndSplit(Map<String, Object> parameter);
|
||||||
|
|
||||||
|
String getTitle(String id,String cut);
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-3
@@ -3023,10 +3023,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
//飞书
|
//飞书
|
||||||
try {
|
try {
|
||||||
|
String hrefTemp = "<a href='/docManage/library/detail?id=" + id +
|
||||||
|
"'" + " target='_blank'>" + serialNumber + "</a>";
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String replace = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
String replace = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
||||||
String contentInfo = "In the " + category + serialNumber+" you subscribed to, "+sysUser.getUsername()+" changed the " + replace.toString();
|
String contentInfoFei = "In the " + category + serialNumber+" you subscribed to, "+sysUser.getUsername()+" changed the " + replace;
|
||||||
String url = backUrl + "/isps/userAnnouncement";
|
String contentInfo = "In the " + category + hrefTemp+" you subscribed to, "+sysUser.getUsername()+" changed the " + sbStr;
|
||||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfo, MessageTypeEnum.READ.getName(), url);
|
String content = "In the "+serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
|
||||||
|
String encodeContent = UriEncoder.encode(content);
|
||||||
|
String encodeContentInfo = UriEncoder.encode(contentInfo);
|
||||||
|
String url = backUrl + "/system/MessageDetails?msgContent="+encodeContent+"&sendTime="+sdf.format(new Date())+"&msgContentInfo="+encodeContentInfo;
|
||||||
|
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("文档新增飞书消息推送失败");
|
log.error("文档新增飞书消息推送失败");
|
||||||
}
|
}
|
||||||
@@ -5507,6 +5514,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//高级搜索条件拼接
|
//高级搜索条件拼接
|
||||||
|
|
||||||
private String sqlJoint(List<QueryConditionVO> queryConditionVOList){
|
private String sqlJoint(List<QueryConditionVO> queryConditionVOList){
|
||||||
@@ -5593,4 +5601,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTitle(String id,String cut) {
|
||||||
|
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(BussDocumentLibraryEO::getId,id);
|
||||||
|
List<Map<String, Object>> mapList = this.listMaps();
|
||||||
|
String title = "";
|
||||||
|
if(mapList.size() != 0){
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
title = mapList.get(0).get("serial_number") + "《"+ mapList.get(0).get("title") + "》";
|
||||||
|
}else{
|
||||||
|
title = mapList.get(0).get("") + "《"+ mapList.get(0).get("title_en") + "》";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user