Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
42549f2e
Commit
42549f2e
authored
Aug 07, 2019
by
hcong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
栏目属性
parent
2e2dc065
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
ColumnAction.java
src/main/java/net/mingsoft/cms/action/ColumnAction.java
+20
-0
No files found.
src/main/java/net/mingsoft/cms/action/ColumnAction.java
View file @
42549f2e
...
@@ -9,6 +9,8 @@ import java.util.List;
...
@@ -9,6 +9,8 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
net.mingsoft.basic.util.ArrysUtil
;
import
net.mingsoft.mdiy.util.DictUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -84,6 +86,8 @@ public class ColumnAction extends BaseAction{
...
@@ -84,6 +86,8 @@ public class ColumnAction extends BaseAction{
int
appId
=
BasicUtil
.
getAppId
();
int
appId
=
BasicUtil
.
getAppId
();
List
<
ColumnEntity
>
list
=
columnBiz
.
queryAll
(
appId
,
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
List
<
ColumnEntity
>
list
=
columnBiz
.
queryAll
(
appId
,
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
ColumnEntity
columnSuper
=
new
ColumnEntity
();
ColumnEntity
columnSuper
=
new
ColumnEntity
();
// 栏目属性
model
.
addAttribute
(
"columnFlag"
,
DictUtil
.
list
(
"栏目属性"
));
model
.
addAttribute
(
"appId"
,
appId
);
model
.
addAttribute
(
"appId"
,
appId
);
model
.
addAttribute
(
"columnSuper"
,
columnSuper
);
model
.
addAttribute
(
"columnSuper"
,
columnSuper
);
model
.
addAttribute
(
"column"
,
new
ColumnEntity
());
model
.
addAttribute
(
"column"
,
new
ColumnEntity
());
...
@@ -199,6 +203,8 @@ public class ColumnAction extends BaseAction{
...
@@ -199,6 +203,8 @@ public class ColumnAction extends BaseAction{
list
=
columnBiz
.
queryAll
(
appId
,
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
list
=
columnBiz
.
queryAll
(
appId
,
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
//查询当前栏目实体
//查询当前栏目实体
ColumnEntity
column
=
(
ColumnEntity
)
columnBiz
.
getEntity
(
columnId
);
ColumnEntity
column
=
(
ColumnEntity
)
columnBiz
.
getEntity
(
columnId
);
// 栏目属性
model
.
addAttribute
(
"columnFlag"
,
DictUtil
.
list
(
"栏目属性"
));
model
.
addAttribute
(
"appId"
,
appId
);
model
.
addAttribute
(
"appId"
,
appId
);
model
.
addAttribute
(
"column"
,
column
);
model
.
addAttribute
(
"column"
,
column
);
model
.
addAttribute
(
"columnc"
,
column
.
getCategoryId
());
model
.
addAttribute
(
"columnc"
,
column
.
getCategoryId
());
...
@@ -245,6 +251,13 @@ public class ColumnAction extends BaseAction{
...
@@ -245,6 +251,13 @@ public class ColumnAction extends BaseAction{
column
.
setCategoryManagerId
(
getManagerBySession
(
request
).
getManagerId
());
column
.
setCategoryManagerId
(
getManagerBySession
(
request
).
getManagerId
());
column
.
setCategoryDateTime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
column
.
setCategoryDateTime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
column
.
setCategoryModelId
(
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
column
.
setCategoryModelId
(
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
String
checkboxType
=
BasicUtil
.
getString
(
"checkboxType"
);
//如果选择一个属性不做排序操作
if
(!
StringUtils
.
isEmpty
(
checkboxType
)
&&
checkboxType
.
length
()>
2
){
column
.
setColumnFlag
(
ArrysUtil
.
sort
(
checkboxType
,
","
)+
","
);
}
else
{
column
.
setColumnFlag
(
checkboxType
);
}
if
(
column
.
getColumnType
()==
ColumnEntity
.
ColumnTypeEnum
.
COLUMN_TYPE_COVER
.
toInt
()){
if
(
column
.
getColumnType
()==
ColumnEntity
.
ColumnTypeEnum
.
COLUMN_TYPE_COVER
.
toInt
()){
column
.
setColumnListUrl
(
null
);
column
.
setColumnListUrl
(
null
);
}
}
...
@@ -274,6 +287,13 @@ public class ColumnAction extends BaseAction{
...
@@ -274,6 +287,13 @@ public class ColumnAction extends BaseAction{
}
}
column
.
setCategoryManagerId
(
getManagerBySession
(
request
).
getManagerId
());
column
.
setCategoryManagerId
(
getManagerBySession
(
request
).
getManagerId
());
column
.
setAppId
(
websiteId
);
column
.
setAppId
(
websiteId
);
String
checkboxType
=
BasicUtil
.
getString
(
"checkboxType"
);
//如果选择一个属性不做排序操作
if
(!
StringUtils
.
isEmpty
(
checkboxType
)
&&
checkboxType
.
length
()>
2
){
column
.
setColumnFlag
(
ArrysUtil
.
sort
(
checkboxType
,
","
)+
","
);
}
else
{
column
.
setColumnFlag
(
checkboxType
);
}
columnBiz
.
updateCategory
(
column
);
columnBiz
.
updateCategory
(
column
);
this
.
columnPath
(
request
,
column
);
this
.
columnPath
(
request
,
column
);
//查询当前栏目是否有子栏目,
//查询当前栏目是否有子栏目,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment