| | |
| | | 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()); |