From baab15477c13b3eeb04784f784fcc5bac1c68393 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 12 七月 2024 18:35:39 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java
index 6223904..2a03951 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java
@@ -841,10 +841,16 @@
s.setIdPath(s.getId()+"/");
shopMapper.updateById(s);
}else{
+ String idPath = StringUtils.defaultString(parent.getIdPath(),"")+ shop.getId()+"/";
+ String namePath =StringUtils.defaultString(parent.getNamePath(),"")+"/"+shop.getName();
s.setParentId(parent.getId());
- s.setNamePath(parent.getNamePath()+"/"+s.getName());
- s.setIdPath(parent.getIdPath()+s.getId()+"/");
- shopMapper.updateById(s);
+ s.setNamePath(namePath);
+ s.setIdPath(idPath);
+ if(!(Constants.equalsLong(parent.getId(),shop.getParentId())
+ && StringUtils.equals(idPath,shop.getIdPath())
+ &&StringUtils.equals(namePath,shop.getNamePath())) ){
+ shopMapper.updateById(s);
+ }
}
if(shop.getChildList()!=null && shop.getChildList().size()>0){
updateNamePath(s,shop.getChildList());
--
Gitblit v1.9.3