文档库新增时--添加文档动态
This commit is contained in:
+20
-4
@@ -38,6 +38,8 @@ import com.jero.modules.document.utils.ReadWordUtil;
|
||||
import com.jero.modules.document.vo.QueryConditionVO;
|
||||
import com.jero.modules.domain.service.DomainUserRelService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.home.entity.HomeDocumentDynamicEO;
|
||||
import com.jero.modules.home.service.IHomeDocumentDynamicEOService;
|
||||
import com.jero.modules.log.entity.BussLogEO;
|
||||
import com.jero.modules.log.service.IBussLogEOService;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
@@ -163,6 +165,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
private WebSocket webSocket;
|
||||
@Resource
|
||||
private IFeishuService iFeishuService;
|
||||
@Autowired
|
||||
private IHomeDocumentDynamicEOService homeDocumentDynamicEOService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@@ -1960,6 +1964,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
mapTemp.put("domainId", map.get("technology_territory"));
|
||||
mapTemp.put("documentId", "");
|
||||
List<String> userIdList = domainUserRelService.queryDomainUserRelInfo(mapTemp);
|
||||
String title = (String) map.get("title");
|
||||
String serialNumber = (String) map.get("serial_number");
|
||||
String href = "<a href='/docManage/library/detail?id=" + idTemp +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
//文档动态, 文档库中新增了标准XXXX homeDocumentDynamicEOService
|
||||
HomeDocumentDynamicEO homeDocumentDynamicEO = new HomeDocumentDynamicEO();
|
||||
homeDocumentDynamicEO.setMsgContent("文档库中新增了标准" + href);
|
||||
homeDocumentDynamicEOService.save(homeDocumentDynamicEO);
|
||||
|
||||
|
||||
//给发送消息的用户
|
||||
if(userIdList.size() == 0){
|
||||
return;
|
||||
@@ -1967,10 +1982,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
if (userIdList.size() != 0) {
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String title = (String) map.get("title");
|
||||
String serialNumber = (String) map.get("serial_number");
|
||||
String href = backUrl + "/docManage/library/detail?id=" + idTemp;
|
||||
|
||||
String hrefTemp = backUrl + "/docManage/library/detail?id=" + idTemp;
|
||||
String content = sysUser.getUsername() + " add " + serialNumber + ",Please pay attention to check.";
|
||||
String contentInfo = sysUser.getUsername() + " add " + href + ",Please pay attention to check.";
|
||||
//封装消息的实体类
|
||||
@@ -1979,11 +1994,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
//飞书
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), content, MessageTypeEnum.PUSH.getName(), href);
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), content, MessageTypeEnum.PUSH.getName(), hrefTemp);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -64,6 +64,6 @@ public class HomeDocumentDynamicEO implements Serializable {
|
||||
/**消息内容*/
|
||||
@Excel(name = "消息内容", width = 15)
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
private java.lang.String content;
|
||||
private java.lang.String msgContent;
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="content" property="content" />
|
||||
<result column="msg_content" property="msgContent" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user