| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.mzl.flower.base.Node; |
| | | import com.mzl.flower.base.cache.CategoryPriceCacheClient; |
| | | import com.mzl.flower.config.exception.ValidationException; |
| | | import com.mzl.flower.config.security.SecurityUtils; |
| | |
| | | public List<FlowerCategoryTreeDTO> selectCategoryTree(FlowerCategoryQueryDTO dto) { |
| | | List<FlowerCategoryTreeDTO> treeList = categoryMapper.selectTreeList(dto); |
| | | treeList = (List<FlowerCategoryTreeDTO>) TreeBuilderUtil.buildListToTree(treeList); |
| | | if(treeList != null && treeList.size() > 0){ |
| | | for(FlowerCategoryTreeDTO t : treeList){ |
| | | List<Node> cLs = t.getChildren(); |
| | | String ll = t.getLevelLimit(); |
| | | if(cLs != null && cLs.size() > 0){ |
| | | for(Node c : cLs){ |
| | | FlowerCategoryTreeDTO cc = (FlowerCategoryTreeDTO)c; |
| | | cc.setLevelLimit(ll); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return treeList; |
| | | } |
| | | |