| | |
| | | @Override |
| | | public List<SvyLibScriptCategoryVO> selectSvyLibScriptCategoryList(SvyLibScriptCategory svyLibScriptCategory) { |
| | | List<SvyLibScriptCategory> svyLibScriptCategories = svyLibScriptCategoryMapper.selectSvyLibScriptCategoryList(svyLibScriptCategory); |
| | | //将pid为空的,过滤掉 |
| | | svyLibScriptCategories = svyLibScriptCategories.stream().filter(assort -> assort.getPid() == null).collect(Collectors.toList()); |
| | | // //将pid为空的,过滤掉 |
| | | // svyLibScriptCategories = svyLibScriptCategories.stream().filter(assort -> assort.getPid() != null).collect(Collectors.toList()); |
| | | |
| | | List<SvyLibScriptCategoryVO> SvyLibScriptCategoryVO = DtoConversionUtils.sourceToTarget(svyLibScriptCategories, SvyLibScriptCategoryVO.class); |
| | | //遍历查出来的数据,通过 id=pid 获取他们的子数据 |
| | | for (SvyLibScriptCategoryVO svyLibScriptCategoryVO : SvyLibScriptCategoryVO) { |
| | | if (svyLibScriptCategoryVO.getPid() != null) { |
| | | continue; |
| | | } |
| | | // if (svyLibScriptCategoryVO.getPid() != null) { |
| | | // continue; |
| | | // } |
| | | SvyLibScriptCategory svyLibScriptCategory1 = new SvyLibScriptCategory(); |
| | | svyLibScriptCategory1.setPid(svyLibScriptCategoryVO.getId()); |
| | | List<SvyLibScriptCategory> svyLibScriptCategories1 = svyLibScriptCategoryMapper.selectSvyLibScriptCategoryList(svyLibScriptCategory1); |