From 8a2fc3b7466fefad0c4fb2144d8e47f42fb86c8a Mon Sep 17 00:00:00 2001 From: sgjj <995959152@qq.com> Date: Wed, 11 Nov 2020 16:36:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=A0=8F=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E6=96=9C=E6=9D=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/mingsoft/cms/biz/impl/CategoryBizImpl.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java index 0f6bca5e..4edf39be 100644 --- a/src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java +++ b/src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java @@ -108,7 +108,6 @@ public class CategoryBizImpl extends BaseBizImpl i //保存链接地址 String path=ObjectUtil.isNotNull(parentCategory)?parentCategory.getCategoryPath():""; categoryEntity.setCategoryPath( path+"/" + categoryEntity.getCategoryPinyin()); - removeVirgule(categoryEntity); setTopId(categoryEntity); super.updateById(categoryEntity); } @@ -146,7 +145,6 @@ public class CategoryBizImpl extends BaseBizImpl i //判断是否有parentIds x.setCategoryPath(path+"/"+x.getCategoryPinyin()); //去除多余的/符号 - removeVirgule(x); super.updateEntity(x); setChildParentId(x); }); @@ -167,20 +165,10 @@ public class CategoryBizImpl extends BaseBizImpl i } setParentLeaf(entity); setTopId(entity); - removeVirgule(entity); super.updateById(entity); setChildParentId(entity); } - /**去除多余的/符号 - * @param entity - */ - private void removeVirgule(CategoryEntity entity) { - - if (entity.getCategoryPath().startsWith("/")) { - entity.setCategoryPath(entity.getCategoryPath().substring(1)); - } - } @Override public void update(CategoryEntity entity) {