| | |
| | | @Override |
| | | public List<CodeClassifyVO> listChildrenClassify(String codeClassifyOid, boolean allLevel, String fieldInPath, boolean enable) { |
| | | if(allLevel){ |
| | | List<CodeClassify> classifyDOS = codeClassifyMapper.selectAllLevelChildHasPath(codeClassifyOid); |
| | | List<CodeClassify> classifyDOS = codeClassifyMapper.selectAllLevelChildHasPath(codeClassifyOid,fieldInPath); |
| | | if(!CollectionUtils.isEmpty(classifyDOS)){ |
| | | classifyDOS = classifyDOS.stream().filter(s->FRAMEWORK_DATA_ENABLED.equalsIgnoreCase(s.getLcStatus())).collect(Collectors.toList()); |
| | | } |
| | |
| | | Map<String/**路径**/,String/**主键**/> oidPathMap = new HashMap<>(); |
| | | |
| | | //我们需要查询所有已经存在的分类,主要是路径,用来判断分类的数据 |
| | | List<CodeClassify> existClassifyDOs = codeClassifyMapper.selectAllLevelChildHasPath(""); |
| | | List<CodeClassify> existClassifyDOs = codeClassifyMapper.selectAllLevelChildHasPath("",null); |
| | | Map<String/**路径**/, CodeClassify/**已经存在的数据**/> pathDOMap = Optional.ofNullable(existClassifyDOs).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(s -> { |
| | | String path = s.getPath(); |
| | | if(StringUtils.isNotBlank(path) && path.startsWith("#")){ |
| | |
| | | */ |
| | | @Override |
| | | public CodeClassifyVO getObjectByIdPath(String idPath) { |
| | | List<Map<String, Object>> idPathValues = codeClassifyMapper.selectByFieldPath("/" + idPath); |
| | | List<Map<String, Object>> idPathValues = codeClassifyMapper.selectByFieldPath("#" + idPath); |
| | | CodeClassify classifyDO = null; |
| | | if (idPathValues != null){ |
| | | classifyDO = codeClassifyMapper.selectById(idPathValues.get(0).get("oid").toString()); |
| | | classifyDO = codeClassifyMapper.selectByIdRel(idPathValues.get(0).get("OID").toString()); |
| | | } |
| | | return codeClassifyDO2VO(classifyDO); |
| | | } |