Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
486eda7a
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
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,发现更多精彩内容 >>
提交
486eda7a
编写于
12月 24, 2018
作者:
liyi_hz2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
为CMS栏目信息保存适应Cihper操作
上级
052dfae6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
21 deletion
+33
-21
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appdict/BaseAction.java
.../com/x/cms/assemble/control/jaxrs/appdict/BaseAction.java
+1
-0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionSave.java
.../com/x/cms/assemble/control/jaxrs/appinfo/ActionSave.java
+31
-20
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/data/BaseAction.java
...ava/com/x/cms/assemble/control/jaxrs/data/BaseAction.java
+1
-0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPublishContent.java
...assemble/control/jaxrs/document/ActionPublishContent.java
+0
-1
未找到文件。
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appdict/BaseAction.java
浏览文件 @
486eda7a
...
...
@@ -111,6 +111,7 @@ abstract class BaseAction extends StandardJaxrsAction {
}
}
@SuppressWarnings
(
"deprecation"
)
void
delete
(
Business
business
,
AppDict
appDict
,
String
...
paths
)
throws
Exception
{
EntityManagerContainer
emc
=
business
.
entityManagerContainer
();
List
<
AppDictItem
>
exists
=
business
.
getAppDictItemFactory
()
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionSave.java
浏览文件 @
486eda7a
...
...
@@ -15,6 +15,7 @@ import com.x.base.core.project.http.EffectivePerson;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.cms.assemble.control.service.LogService
;
import
com.x.cms.core.entity.AppInfo
;
import
com.x.cms.core.entity.CategoryInfo
;
...
...
@@ -25,6 +26,11 @@ import com.x.cms.core.entity.element.View;
import
com.x.cms.core.entity.element.ViewCategory
;
import
com.x.cms.core.entity.element.ViewFieldConfig
;
/**
* 保存CMS栏目信息设置
* @author O2LEE
*
*/
public
class
ActionSave
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionSave
.
class
);
...
...
@@ -50,7 +56,15 @@ public class ActionSave extends BaseAction {
}
if
(
check
)
{
if
(
!
"xadmin"
.
equalsIgnoreCase
(
effectivePerson
.
getDistinguishedName
())
)
{
if
(
"cipher"
.
equalsIgnoreCase
(
effectivePerson
.
getDistinguishedName
()
))
{
identityName
=
"cipher"
;
unitName
=
"cipher"
;
topUnitName
=
"cipher"
;
}
else
if
(
"xadmin"
.
equalsIgnoreCase
(
effectivePerson
.
getDistinguishedName
()
))
{
identityName
=
"xadmin"
;
unitName
=
"xadmin"
;
topUnitName
=
"xadmin"
;
}
else
{
try
{
identityName
=
userManagerService
.
getPersonIdentity
(
effectivePerson
.
getDistinguishedName
(),
identityName
);
}
catch
(
Exception
e
)
{
...
...
@@ -59,56 +73,51 @@ public class ActionSave extends BaseAction {
result
.
error
(
exception
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
}
else
{
identityName
=
"xadmin"
;
unitName
=
"xadmin"
;
topUnitName
=
"xadmin"
;
}
}
if
(
check
&&
!
"xadmin"
.
equals
(
identityName
))
{
if
(
check
&&
!
"xadmin"
.
equals
(
identityName
)
&&
!
"cipher"
.
equals
(
identityName
)
)
{
try
{
unitName
=
userManagerService
.
getUnitNameByIdentity
(
identityName
);
}
catch
(
Exception
e
)
{
check
=
false
;
Exception
exception
=
new
ExceptionAppInfoProcess
(
e
,
"系统在根据用户身份信息查询所属组织名称时发生异常。Identity:"
+
identityName
);
Exception
exception
=
new
ExceptionAppInfoProcess
(
e
,
"系统在根据用户身份信息查询所属组织名称时发生异常。Identity:"
+
identityName
);
result
.
error
(
exception
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
}
if
(
check
&&
!
"xadmin"
.
equals
(
identityName
))
{
if
(
check
&&
!
"xadmin"
.
equals
(
identityName
)
&&
!
"cipher"
.
equals
(
identityName
)
)
{
try
{
topUnitName
=
userManagerService
.
getTopUnitNameByIdentity
(
identityName
);
}
catch
(
Exception
e
)
{
check
=
false
;
Exception
exception
=
new
ExceptionAppInfoProcess
(
e
,
"系统在根据用户身份信息查询所属顶层组织名称时发生异常。Identity:"
+
identityName
);
Exception
exception
=
new
ExceptionAppInfoProcess
(
e
,
"系统在根据用户身份信息查询所属顶层组织名称时发生异常。Identity:"
+
identityName
);
result
.
error
(
exception
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
}
if
(
check
)
{
if
(
wi
.
getAppName
()
==
null
||
wi
.
getAppName
().
isEmpty
()
)
{
if
(
StringUtils
.
isEmpty
(
wi
.
getAppName
()
)
)
{
check
=
false
;
Exception
exception
=
new
ExceptionAppInfoNameEmpty
();
result
.
error
(
exception
);
}
}
if
(
check
)
{
if
(
StringUtils
.
isEmpty
(
wi
.
getDocumentType
()
)
)
{
wi
.
setDocumentType
(
"
信息
"
);
if
(
"数据"
.
equals
(
wi
.
getDocumentType
()
)
)
{
wi
.
setDocumentType
(
"
数据
"
);
}
else
{
if
(
!
"信息"
.
equals
(
wi
.
getDocumentType
())
&&
!
"数据"
.
equals
(
wi
.
getDocumentType
()
))
{
wi
.
setDocumentType
(
"信息"
);
}
wi
.
setDocumentType
(
"信息"
);
}
}
if
(
check
)
{
try
{
//判断栏目信息是否已经存在,栏目信息不允许重名
ids
=
appInfoServiceAdv
.
listByAppName
(
wi
.
getAppName
());
if
(
ids
!=
null
&&
!
ids
.
isEmpty
()
)
{
if
(
ListTools
.
isNotEmpty
(
ids
)
)
{
for
(
String
tmp
:
ids
)
{
if
(
tmp
!=
null
&&
!
tmp
.
trim
().
equals
(
wi
.
getId
()))
{
check
=
false
;
...
...
@@ -119,8 +128,7 @@ public class ActionSave extends BaseAction {
}
}
catch
(
Exception
e
)
{
check
=
false
;
Exception
exception
=
new
ExceptionAppInfoProcess
(
e
,
"系统根据应用栏目名称查询应用栏目信息对象时发生异常。AppName:"
+
wi
.
getAppName
());
Exception
exception
=
new
ExceptionAppInfoProcess
(
e
,
"系统根据应用栏目名称查询应用栏目信息对象时发生异常。AppName:"
+
wi
.
getAppName
());
result
.
error
(
exception
);
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
...
...
@@ -132,6 +140,7 @@ public class ActionSave extends BaseAction {
wi
.
setCreatorTopUnitName
(
topUnitName
);
try
{
//保存CMS栏目信息
appInfo
=
appInfoServiceAdv
.
save
(
wi
,
effectivePerson
);
// 更新缓存
...
...
@@ -159,7 +168,9 @@ public class ActionSave extends BaseAction {
}
public
static
class
Wi
extends
AppInfo
{
private
static
final
long
serialVersionUID
=
-
6314932919066148113L
;
private
String
identity
=
null
;
public
String
getIdentity
()
{
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/data/BaseAction.java
浏览文件 @
486eda7a
...
...
@@ -122,6 +122,7 @@ public class BaseAction extends StandardJaxrsAction {
}
}
@SuppressWarnings
(
"deprecation"
)
void
deleteData
(
Business
business
,
Document
document
,
String
...
paths
)
throws
Exception
{
List
<
Item
>
exists
=
business
.
itemFactory
().
listWithDocmentWithPath
(
document
.
getId
(),
paths
);
if
(
exists
.
isEmpty
())
{
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPublishContent.java
浏览文件 @
486eda7a
...
...
@@ -28,7 +28,6 @@ import com.x.cms.core.entity.CategoryInfo;
import
com.x.cms.core.entity.Document
;
import
com.x.cms.core.entity.FileInfo
;
import
com.x.cms.core.entity.element.Form
;
import
com.x.cms.core.entity.tools.LogUtil
;
/**
* 直接发布文档内容
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录