Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
此号慢热型
o2oa
提交
004f6ed2
o2oa
项目概览
此号慢热型
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
004f6ed2
编写于
8月 07, 2020
作者:
liyi_hz2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[内容管理]修复了发布文档时会通知所有人员的问题
上级
b12f3f24
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
12 deletion
+29
-12
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java
...e/control/jaxrs/document/ActionPersistPublishContent.java
+3
-2
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/queue/QueueSendDocumentNotify.java
...x/cms/assemble/control/queue/QueueSendDocumentNotify.java
+25
-9
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/UserManagerService.java
...om/x/cms/assemble/control/service/UserManagerService.java
+1
-1
未找到文件。
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java
浏览文件 @
004f6ed2
...
...
@@ -177,8 +177,9 @@ public class ActionPersistPublishContent extends BaseAction {
if
(
check
)
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
if
(
StringUtils
.
isEmpty
(
wi
.
getIdentity
()))
{
if
(
StringUtils
.
is
Not
Empty
(
wi
.
getIdentity
()))
{
wi
.
setCreatorIdentity
(
wi
.
getIdentity
()
);
wi
.
setCreatorPerson
(
userManagerService
.
getPersonNameWithIdentity
(
wi
.
getIdentity
()));
}
if
(
StringUtils
.
isEmpty
(
wi
.
getCreatorPerson
()))
{
...
...
@@ -404,7 +405,7 @@ public class ActionPersistPublishContent extends BaseAction {
}
}
if
(
notify
){
logger
.
info
(
"try to add notify object to queue for document:"
+
document
.
getTitle
()
);
logger
.
debug
(
"try to add notify object to queue for document:"
+
document
.
getTitle
()
);
ThisApplication
.
queueSendDocumentNotify
.
send
(
document
);
}
}
catch
(
Exception
e
)
{
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/queue/QueueSendDocumentNotify.java
浏览文件 @
004f6ed2
...
...
@@ -28,18 +28,19 @@ import java.util.List;
public
class
QueueSendDocumentNotify
extends
AbstractQueue
<
Document
>
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
QueueSendDocumentNotify
.
class
);
private
UserManagerService
userManagerService
=
new
UserManagerService
();
public
void
execute
(
Document
document
)
throws
Exception
{
logger
.
info
(
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>QueueSendDocumentNotify:"
+
document
.
getTitle
()
);
logger
.
debug
(
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>QueueSendDocumentNotify:"
+
document
.
getTitle
()
);
if
(
document
==
null
)
{
logger
.
info
(
"can not send publish notify , document is NULL!"
);
logger
.
debug
(
"can not send publish notify , document is NULL!"
);
return
;
}
if
(
!
StringUtils
.
equalsIgnoreCase
(
"信息"
,
document
.
getDocumentType
())
)
{
logger
.
info
(
"can not send publish notify , document is not '信息'!"
);
logger
.
debug
(
"can not send publish notify , document is not '信息'!"
);
return
;
}
logger
.
info
(
"send publish notify for new document:"
+
document
.
getTitle
()
);
logger
.
debug
(
"send publish notify for new document:"
+
document
.
getTitle
()
);
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
AppInfo
appInfo
=
emc
.
find
(
document
.
getAppId
(),
AppInfo
.
class
);
CategoryInfo
category
=
emc
.
find
(
document
.
getCategoryId
(),
CategoryInfo
.
class
);
...
...
@@ -50,9 +51,24 @@ public class QueueSendDocumentNotify extends AbstractQueue<Document> {
if
(
ListTools
.
isNotEmpty
(
persons
))
{
//有可能是*, 一般是所有的人员标识列表
if
(
persons
.
contains
(
"*"
))
{
logger
.
info
(
">>>>>document.getCreatorTopUnitName()="
+
document
.
getCreatorTopUnitName
()
);
persons
=
listPersonWithUnit
(
document
.
getCreatorTopUnitName
()
);
String
topUnitName
=
document
.
getCreatorTopUnitName
();
logger
.
debug
(
">>>>>document.getCreatorTopUnitName()="
+
topUnitName
);
if
(
StringUtils
.
equalsAnyIgnoreCase
(
"cipher"
,
topUnitName
)
||
StringUtils
.
equalsAnyIgnoreCase
(
"xadmin"
,
topUnitName
)
){
//取发起人所有顶层组织
if
(
!
StringUtils
.
equalsAnyIgnoreCase
(
"cipher"
,
document
.
getCreatorIdentity
()
)
&&
!
StringUtils
.
equalsAnyIgnoreCase
(
"xadmin"
,
document
.
getCreatorIdentity
()
)){
topUnitName
=
userManagerService
.
getTopUnitNameByIdentity
(
document
.
getCreatorIdentity
());
}
else
if
(!
StringUtils
.
equalsAnyIgnoreCase
(
"cipher"
,
document
.
getCreatorPerson
()
)
&&
!
StringUtils
.
equalsAnyIgnoreCase
(
"xadmin"
,
document
.
getCreatorPerson
()
)){
topUnitName
=
userManagerService
.
getTopUnitNameWithPerson
(
document
.
getCreatorPerson
());
}
}
if
(
StringUtils
.
isNotEmpty
(
topUnitName
)){
//取顶层组织的所有人
persons
=
listPersonWithUnit
(
topUnitName
);
}
else
{
persons
=
new
ArrayList
<>();
}
}
}
if
(
ListTools
.
isNotEmpty
(
persons
))
{
...
...
@@ -69,10 +85,10 @@ public class QueueSendDocumentNotify extends AbstractQueue<Document> {
}
logger
.
debug
(
"cms send total count:"
+
persons
.
size
()
);
}
logger
.
info
(
"cms send publish notify for new document completed! "
);
logger
.
debug
(
"cms send publish notify for new document completed! "
);
//}
}
else
{
logger
.
info
(
"can not send publish notify for document, category or appinfo not exists! ID: "
+
document
.
getId
()
);
logger
.
debug
(
"can not send publish notify for document, category or appinfo not exists! ID: "
+
document
.
getId
()
);
}
}
}
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/UserManagerService.java
浏览文件 @
004f6ed2
...
...
@@ -454,7 +454,7 @@ public class UserManagerService {
* @throws Exception
*/
public
List
<
String
>
listPersonWithUnit
(
String
unitName
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
unitName
))
{
if
(
StringUtils
.
isEmpty
(
unitName
))
{
throw
new
Exception
(
"unitName is empty!"
);
}
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录