Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
c8aafb35
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
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,发现更多精彩内容 >>
提交
c8aafb35
编写于
11月 01, 2022
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
记录内容管理文档发布http请求的body体内容3
上级
f1f49329
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
71 deletion
+38
-71
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java
...e/control/jaxrs/document/ActionPersistPublishContent.java
+35
-70
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistSaveDocument.java
...ble/control/jaxrs/document/ActionPersistSaveDocument.java
+3
-1
未找到文件。
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java
浏览文件 @
c8aafb35
...
@@ -10,7 +10,9 @@ import java.util.UUID;
...
@@ -10,7 +10,9 @@ import java.util.UUID;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
com.x.base.core.project.config.Token
;
import
com.x.base.core.project.config.Token
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.tools.DateTools
;
import
com.x.base.core.project.tools.DateTools
;
import
com.x.cms.assemble.control.Business
;
import
com.x.cms.core.entity.enums.DocumentStatus
;
import
com.x.cms.core.entity.enums.DocumentStatus
;
import
com.x.cms.core.entity.query.DocumentNotify
;
import
com.x.cms.core.entity.query.DocumentNotify
;
import
org.apache.commons.io.FilenameUtils
;
import
org.apache.commons.io.FilenameUtils
;
...
@@ -52,90 +54,51 @@ public class ActionPersistPublishContent extends BaseAction {
...
@@ -52,90 +54,51 @@ public class ActionPersistPublishContent extends BaseAction {
protected
ActionResult
<
Wo
>
execute
(
HttpServletRequest
request
,
JsonElement
jsonElement
,
EffectivePerson
effectivePerson
)
throws
Exception
{
protected
ActionResult
<
Wo
>
execute
(
HttpServletRequest
request
,
JsonElement
jsonElement
,
EffectivePerson
effectivePerson
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
List
<
FileInfo
>
cloudPictures
=
null
;
AppInfo
appInfo
=
null
;
CategoryInfo
categoryInfo
=
null
;
Document
document
=
null
;
Document
document
=
null
;
Form
form
=
null
;
Wi
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
Wi
wi
=
null
;
Boolean
check
=
true
;
Boolean
check
=
true
;
try
{
if
(
StringUtils
.
isEmpty
(
wi
.
getCategoryId
()
)
)
{
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
throw
new
ExceptionDocumentCategoryIdEmpty
();
}
catch
(
Exception
e
)
{
check
=
false
;
Exception
exception
=
new
ExceptionDocumentInfoProcess
(
e
,
"系统在将JSON信息转换为对象时发生异常。JSON:"
+
jsonElement
.
toString
()
);
result
.
error
(
exception
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
}
if
(
check
)
{
CategoryInfo
categoryInfo
;
if
(
StringUtils
.
isEmpty
(
wi
.
getCategoryId
()))
{
AppInfo
appInfo
=
null
;
check
=
false
;
Exception
exception
=
new
ExceptionDocumentCategoryIdEmpty
();
Document
oldDocument
=
documentQueryService
.
get
(
wi
.
getId
());
result
.
error
(
exception
);
if
(
oldDocument
!=
null
){
categoryInfo
=
categoryInfoServiceAdv
.
get
(
oldDocument
.
getCategoryId
()
);
appInfo
=
appInfoServiceAdv
.
get
(
oldDocument
.
getAppId
());
}
else
{
categoryInfo
=
categoryInfoServiceAdv
.
get
(
wi
.
getCategoryId
()
);
if
(
categoryInfo
!=
null
)
{
appInfo
=
appInfoServiceAdv
.
get
(
categoryInfo
.
getAppId
());
}
}
}
}
if
(
check
)
{
if
(
categoryInfo
==
null
){
try
{
throw
new
ExceptionCategoryInfoNotExists
(
wi
.
getCategoryId
());
categoryInfo
=
categoryInfoServiceAdv
.
get
(
wi
.
getCategoryId
()
);
}
if
(
categoryInfo
==
null
)
{
if
(
appInfo
==
null
)
{
check
=
false
;
throw
new
ExceptionAppInfoNotExists
(
categoryInfo
.
getAppId
());
Exception
exception
=
new
ExceptionCategoryInfoNotExists
(
wi
.
getCategoryId
());
result
.
error
(
exception
);
}
}
catch
(
Exception
e
)
{
check
=
false
;
Exception
exception
=
new
ExceptionDocumentInfoProcess
(
e
,
"系统在根据ID查询分类信息时发生异常!ID:"
+
wi
.
getCategoryId
());
result
.
error
(
exception
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
}
}
if
(
check
)
{
Business
business
=
new
Business
(
null
);
try
{
if
(!
business
.
isDocumentEditor
(
effectivePerson
,
appInfo
,
categoryInfo
,
oldDocument
)){
appInfo
=
appInfoServiceAdv
.
get
(
categoryInfo
.
getAppId
()
);
throw
new
ExceptionAccessDenied
(
effectivePerson
);
if
(
appInfo
==
null
)
{
check
=
false
;
Exception
exception
=
new
ExceptionAppInfoNotExists
(
categoryInfo
.
getAppId
());
result
.
error
(
exception
);
}
}
catch
(
Exception
e
)
{
check
=
false
;
Exception
exception
=
new
ExceptionDocumentInfoProcess
(
e
,
"系统在根据ID查询应用栏目信息时发生异常!ID:"
+
categoryInfo
.
getAppId
());
result
.
error
(
exception
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
}
}
// 查询分类设置的编辑表单
// 查询分类设置的编辑表单
if
(
check
)
{
if
(
StringUtils
.
isEmpty
(
categoryInfo
.
getFormId
()
))
{
if
(
StringUtils
.
isEmpty
(
categoryInfo
.
getFormId
()))
{
throw
new
ExceptionCategoryFormIdEmpty
();
check
=
false
;
Exception
exception
=
new
ExceptionCategoryFormIdEmpty
();
result
.
error
(
exception
);
}
}
}
if
(
check
)
{
Form
form
=
formServiceAdv
.
get
(
categoryInfo
.
getFormId
());
try
{
if
(
form
==
null
)
{
form
=
formServiceAdv
.
get
(
categoryInfo
.
getFormId
());
throw
new
ExceptionFormForEditNotExists
(
categoryInfo
.
getFormId
());
if
(
form
==
null
)
{
}
else
{
check
=
false
;
wi
.
setForm
(
form
.
getId
());
Exception
exception
=
new
ExceptionFormForEditNotExists
(
categoryInfo
.
getFormId
());
wi
.
setFormName
(
form
.
getName
());
result
.
error
(
exception
);
}
else
{
wi
.
setForm
(
form
.
getId
());
wi
.
setFormName
(
form
.
getName
());
}
}
catch
(
Exception
e
)
{
check
=
false
;
Exception
exception
=
new
ExceptionDocumentInfoProcess
(
e
,
"系统在根据ID查询编辑表单时发生异常!ID:"
+
categoryInfo
.
getFormId
());
result
.
error
(
exception
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
}
}
if
(
check
)
{
if
(
check
)
{
...
@@ -345,7 +308,9 @@ public class ActionPersistPublishContent extends BaseAction {
...
@@ -345,7 +308,9 @@ public class ActionPersistPublishContent extends BaseAction {
if
(
check
&&
!
wi
.
getSkipPermission
()
)
{
if
(
check
&&
!
wi
.
getSkipPermission
()
)
{
//将读者以及作者信息持久化到数据库中
//将读者以及作者信息持久化到数据库中
try
{
try
{
documentPersistService
.
refreshDocumentPermission
(
document
.
getId
(),
wi
.
getReaderList
(),
wi
.
getAuthorList
()
);
if
(
oldDocument
==
null
||
(
wi
.
getReaderList
()
!=
null
&&
wi
.
getAuthorList
()
!=
null
))
{
documentPersistService
.
refreshDocumentPermission
(
document
.
getId
(),
wi
.
getReaderList
(),
wi
.
getAuthorList
());
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Exception
exception
=
new
ExceptionDocumentInfoProcess
(
e
,
"系统在核对文档访问管理权限信息时发生异常!"
);
Exception
exception
=
new
ExceptionDocumentInfoProcess
(
e
,
"系统在核对文档访问管理权限信息时发生异常!"
);
result
.
error
(
exception
);
result
.
error
(
exception
);
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistSaveDocument.java
浏览文件 @
c8aafb35
...
@@ -262,7 +262,9 @@ public class ActionPersistSaveDocument extends BaseAction {
...
@@ -262,7 +262,9 @@ public class ActionPersistSaveDocument extends BaseAction {
if
(
check
)
{
if
(
check
)
{
try
{
//将读者以及作者信息持久化到数据库中
try
{
//将读者以及作者信息持久化到数据库中
documentPersistService
.
refreshDocumentPermission
(
document
.
getId
(),
wi
.
getReaderList
(),
wi
.
getAuthorList
()
);
if
(
oldDocument
==
null
||
(
wi
.
getReaderList
()
!=
null
&&
wi
.
getAuthorList
()
!=
null
)){
documentPersistService
.
refreshDocumentPermission
(
document
.
getId
(),
wi
.
getReaderList
(),
wi
.
getAuthorList
()
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
check
=
false
;
check
=
false
;
Exception
exception
=
new
ExceptionDocumentInfoProcess
(
e
,
"系统在核对文档访问管理权限信息时发生异常!"
);
Exception
exception
=
new
ExceptionDocumentInfoProcess
(
e
,
"系统在核对文档访问管理权限信息时发生异常!"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录