Explorar o código

修复栏目路径问题

sgjj %!s(int64=5) %!d(string=hai) anos
pai
achega
78a8b4c48c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/main/java/net/mingsoft/cms/action/CategoryAction.java

+ 2 - 2
src/main/java/net/mingsoft/cms/action/CategoryAction.java

@@ -249,10 +249,10 @@ public class CategoryAction extends BaseAction{
 		 CategoryEntity categoryEntity=new CategoryEntity();
 		 categoryEntity.setCategoryPinyin(pingYin);
 		 categoryEntity.setAppId(BasicUtil.getAppId());
-		 Object categoryBizEntity = categoryBiz.getEntity(categoryEntity);
+		 CategoryEntity categoryBizEntity = (CategoryEntity)categoryBiz.getEntity(categoryEntity);
 		 category.setCategoryPinyin(pingYin);
 		 //如果存在此拼音栏目则拼接上id
-		 if(categoryBizEntity!=null){
+		 if(categoryBizEntity!=null&&!categoryBizEntity.getId().equals(category.getId())){
 			 category.setCategoryPinyin(pingYin+category.getId());
 		 }
 		//判断是否选择子级为所属栏目