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
4b344720
Commit
4b344720
authored
May 07, 2021
by
msgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复栏目删除问题
parent
7acd23a3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
CategoryBizImpl.java
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
+2
-2
No files found.
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
View file @
4b344720
...
@@ -213,12 +213,12 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
...
@@ -213,12 +213,12 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
//获取被删节点的父节点
//获取被删节点的父节点
CategoryEntity
parentNode
=
categoryDao
.
selectById
(
category
.
getCategoryId
());
CategoryEntity
parentNode
=
categoryDao
.
selectById
(
category
.
getCategoryId
());
//清空CategoryParentIds,避免查找不必要的数据,只需要当前的父级栏目
parentNode
.
setCategoryParentIds
(
null
);
//获取被删节点的所属栏目的其他节点
//获取被删节点的所属栏目的其他节点
List
<
CategoryEntity
>
childNode
=
categoryDao
.
queryChildren
(
parentNode
);
List
<
CategoryEntity
>
childNode
=
categoryDao
.
queryChildren
(
parentNode
);
//判断删除的是否为主节点
//判断删除的是否为主节点
if
(
parentNode
!=
null
)
{
if
(
parentNode
!=
null
)
{
//清空CategoryParentIds,避免查找不必要的数据,只需要当前的父级栏目
parentNode
.
setCategoryParentIds
(
null
);
UpdateWrapper
<
CategoryEntity
>
updateWrapper
=
new
UpdateWrapper
<>();
UpdateWrapper
<
CategoryEntity
>
updateWrapper
=
new
UpdateWrapper
<>();
//如果没有子节点进行更新代码
//如果没有子节点进行更新代码
if
(
childNode
.
size
()
==
1
)
{
if
(
childNode
.
size
()
==
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