jiangping
2024-07-12 7e90b706ce34a759ea20de5e00896e66a8fca0aa
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());