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
5694c5d7
Commit
5694c5d7
authored
Oct 20, 2021
by
mingsoft
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
栏目子节点bug修复
parent
d6354983
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
CategoryAction.java
src/main/java/net/mingsoft/cms/action/CategoryAction.java
+3
-3
GeneraterAction.java
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
+2
-2
ICategoryBiz.java
src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
+2
-2
CategoryBizImpl.java
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
+1
-1
No files found.
src/main/java/net/mingsoft/cms/action/CategoryAction.java
View file @
5694c5d7
...
...
@@ -288,8 +288,8 @@ public class CategoryAction extends BaseAction {
}
//判断是否选择子级为所属栏目
CategoryEntity
_category
=
new
CategoryEntity
();
_category
.
set
CategoryParentIds
(
category
.
getId
());
List
<
CategoryEntity
>
categoryList
=
categoryBiz
.
queryChild
s
(
_category
);
_category
.
set
Id
(
category
.
getId
());
List
<
CategoryEntity
>
categoryList
=
categoryBiz
.
queryChild
ren
(
_category
);
if
(
categoryList
.
size
()>
0
)
{
for
(
CategoryEntity
item:
categoryList
){
if
(
item
.
getId
().
equals
(
category
.
getCategoryId
())){
...
...
@@ -330,7 +330,7 @@ public class CategoryAction extends BaseAction {
}
category
=
categoryBiz
.
getById
(
category
.
getId
());
category
.
setCategoryParentIds
(
null
);
List
<
CategoryEntity
>
childs
=
categoryBiz
.
queryChild
s
(
category
);
List
<
CategoryEntity
>
childs
=
categoryBiz
.
queryChild
ren
(
category
);
//更新与父节点相同类型的子栏目的模板内容
for
(
int
i
=
0
;
i
<
childs
.
size
();
i
++)
{
if
(
childs
.
get
(
i
).
getCategoryType
().
equals
(
category
.
getCategoryType
()))
{
...
...
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
5694c5d7
...
...
@@ -165,7 +165,7 @@ public class GeneraterAction extends BaseAction {
}
else
{
//选择栏目更新
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryEntity
.
setId
(
categoryId
);
columns
=
categoryBiz
.
queryChild
s
(
categoryEntity
);
columns
=
categoryBiz
.
queryChild
ren
(
categoryEntity
);
}
//文章列表
...
...
@@ -241,7 +241,7 @@ public class GeneraterAction extends BaseAction {
}
else
{
//选择栏目更新
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryEntity
.
setId
(
columnId
);
categoryList
=
categoryBiz
.
queryChild
s
(
categoryEntity
);
categoryList
=
categoryBiz
.
queryChild
ren
(
categoryEntity
);
}
for
(
CategoryEntity
category
:
categoryList
)
{
...
...
src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
View file @
5694c5d7
...
...
@@ -36,10 +36,10 @@ public interface ICategoryBiz extends IBaseBiz<CategoryEntity> {
/**
* 查询当前分类下的所有子分类,包含自身
* @param category
* @param category
通过setId指定栏目id
* @return
*/
List
<
CategoryEntity
>
queryChild
s
(
CategoryEntity
category
);
List
<
CategoryEntity
>
queryChild
ren
(
CategoryEntity
category
);
void
saveEntity
(
CategoryEntity
entity
);
...
...
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
View file @
5694c5d7
...
...
@@ -67,7 +67,7 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
}
@Override
public
List
<
CategoryEntity
>
queryChild
s
(
CategoryEntity
category
)
{
public
List
<
CategoryEntity
>
queryChild
ren
(
CategoryEntity
category
)
{
// TODO Auto-generated method stub
return
categoryDao
.
queryChildren
(
category
);
}
...
...
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