Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
4b344720
Commit
4b344720
authored
May 07, 2021
by
msgroup
Browse files
修复栏目删除问题
parent
7acd23a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
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