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
12f58816
Commit
12f58816
authored
Nov 06, 2020
by
wujj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成文章
parent
28269bbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
GeneraterAction.java
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
+9
-7
No files found.
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
12f58816
...
@@ -147,20 +147,20 @@ public class GeneraterAction extends BaseAction {
...
@@ -147,20 +147,20 @@ public class GeneraterAction extends BaseAction {
*
*
* @param request
* @param request
* @param response
* @param response
* @param
C
ategoryId
* @param
c
ategoryId
*/
*/
@RequestMapping
(
"/{
C
ategoryId}/genernateColumn"
)
@RequestMapping
(
"/{
c
ategoryId}/genernateColumn"
)
@LogAnn
(
title
=
"生成栏目"
,
businessType
=
BusinessTypeEnum
.
UPDATE
)
@LogAnn
(
title
=
"生成栏目"
,
businessType
=
BusinessTypeEnum
.
UPDATE
)
@RequiresPermissions
(
"cms:generate:column"
)
@RequiresPermissions
(
"cms:generate:column"
)
@ResponseBody
@ResponseBody
public
ResultData
genernateColumn
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@PathVariable
int
C
ategoryId
)
throws
IOException
{
public
ResultData
genernateColumn
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@PathVariable
String
c
ategoryId
)
throws
IOException
{
// 获取站点id
// 获取站点id
AppEntity
app
=
BasicUtil
.
getApp
();
AppEntity
app
=
BasicUtil
.
getApp
();
List
<
CategoryEntity
>
columns
=
new
ArrayList
<
CategoryEntity
>();
List
<
CategoryEntity
>
columns
=
new
ArrayList
<
CategoryEntity
>();
// 如果栏目id小于0则更新所有的栏目,否则只更新选中的栏目
// 如果栏目id小于0则更新所有的栏目,否则只更新选中的栏目
if
(
CategoryId
>
0
)
{
if
(
!
"0"
.
equals
(
categoryId
)
)
{
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryEntity
.
setId
(
CategoryId
+
""
);
categoryEntity
.
setId
(
categoryId
);
columns
=
categoryBiz
.
queryChilds
(
categoryEntity
);
columns
=
categoryBiz
.
queryChilds
(
categoryEntity
);
}
else
{
}
else
{
// 获取所有的内容管理栏目
// 获取所有的内容管理栏目
...
@@ -243,7 +243,8 @@ public class GeneraterAction extends BaseAction {
...
@@ -243,7 +243,8 @@ public class GeneraterAction extends BaseAction {
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
PAGE
,
page
);
map
.
put
(
ParserUtil
.
PAGE
,
page
);
if
(
StringUtils
.
isNotEmpty
(
columnId
)){
// 生成所有栏目的文章
if
(
"0"
.
equals
(
columnId
)){
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryList
=
categoryBiz
.
query
(
categoryEntity
);
categoryList
=
categoryBiz
.
query
(
categoryEntity
);
for
(
CategoryEntity
category
:
categoryList
){
for
(
CategoryEntity
category
:
categoryList
){
...
@@ -262,6 +263,7 @@ public class GeneraterAction extends BaseAction {
...
@@ -262,6 +263,7 @@ public class GeneraterAction extends BaseAction {
contentBean
.
setOrder
(
attributeBean
.
getOrder
());
contentBean
.
setOrder
(
attributeBean
.
getOrder
());
contentBean
.
setOrderBy
(
attributeBean
.
getOrderby
());
contentBean
.
setOrderBy
(
attributeBean
.
getOrderby
());
}
}
//将文章列表标签中的中的参数
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
// 有符合条件的就更新
// 有符合条件的就更新
if
(
articleIdList
.
size
()
>
0
)
{
if
(
articleIdList
.
size
()
>
0
)
{
...
@@ -269,7 +271,7 @@ public class GeneraterAction extends BaseAction {
...
@@ -269,7 +271,7 @@ public class GeneraterAction extends BaseAction {
}
}
}
}
}
else
{
}
else
{
CategoryEntity
category
=
(
CategoryEntity
)
categoryBiz
.
get
Entity
(
Integer
.
parseInt
(
columnId
)
);
CategoryEntity
category
=
(
CategoryEntity
)
categoryBiz
.
get
ById
(
columnId
);
contentBean
.
setContentCategoryId
(
columnId
);
contentBean
.
setContentCategoryId
(
columnId
);
// 分类是列表
// 分类是列表
if
(
category
.
getCategoryType
().
equals
(
"1"
)){
if
(
category
.
getCategoryType
().
equals
(
"1"
)){
...
...
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