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
8a2fc3b7
Commit
8a2fc3b7
authored
Nov 11, 2020
by
sgjj
Browse files
恢复栏目的斜杠
parent
92d07bc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
View file @
8a2fc3b7
...
@@ -108,7 +108,6 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
...
@@ -108,7 +108,6 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
//保存链接地址
//保存链接地址
String
path
=
ObjectUtil
.
isNotNull
(
parentCategory
)?
parentCategory
.
getCategoryPath
():
""
;
String
path
=
ObjectUtil
.
isNotNull
(
parentCategory
)?
parentCategory
.
getCategoryPath
():
""
;
categoryEntity
.
setCategoryPath
(
path
+
"/"
+
categoryEntity
.
getCategoryPinyin
());
categoryEntity
.
setCategoryPath
(
path
+
"/"
+
categoryEntity
.
getCategoryPinyin
());
removeVirgule
(
categoryEntity
);
setTopId
(
categoryEntity
);
setTopId
(
categoryEntity
);
super
.
updateById
(
categoryEntity
);
super
.
updateById
(
categoryEntity
);
}
}
...
@@ -146,7 +145,6 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
...
@@ -146,7 +145,6 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
//判断是否有parentIds
//判断是否有parentIds
x
.
setCategoryPath
(
path
+
"/"
+
x
.
getCategoryPinyin
());
x
.
setCategoryPath
(
path
+
"/"
+
x
.
getCategoryPinyin
());
//去除多余的/符号
//去除多余的/符号
removeVirgule
(
x
);
super
.
updateEntity
(
x
);
super
.
updateEntity
(
x
);
setChildParentId
(
x
);
setChildParentId
(
x
);
});
});
...
@@ -167,20 +165,10 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
...
@@ -167,20 +165,10 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
}
}
setParentLeaf
(
entity
);
setParentLeaf
(
entity
);
setTopId
(
entity
);
setTopId
(
entity
);
removeVirgule
(
entity
);
super
.
updateById
(
entity
);
super
.
updateById
(
entity
);
setChildParentId
(
entity
);
setChildParentId
(
entity
);
}
}
/**去除多余的/符号
* @param entity
*/
private
void
removeVirgule
(
CategoryEntity
entity
)
{
if
(
entity
.
getCategoryPath
().
startsWith
(
"/"
))
{
entity
.
setCategoryPath
(
entity
.
getCategoryPath
().
substring
(
1
));
}
}
@Override
@Override
public
void
update
(
CategoryEntity
entity
)
{
public
void
update
(
CategoryEntity
entity
)
{
...
...
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