use of com.besscroft.aurora.mall.admin.domain.param.ResourceParam in project aurora-mall by besscroft.
the class ResourceServiceImpl method getAllResourceTree.
@Override
public List<ResourceParam> getAllResourceTree() {
List<ResourceParam> list = new ArrayList<>();
List<AuthResourceSort> resourceSorts = authResourceSortMapper.selectList(new QueryWrapper<>());
resourceSorts.forEach(r -> {
ResourceParam resourceParam = new ResourceParam();
QueryWrapper<AuthResource> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("category_id", r.getId());
List<AuthResource> resources = this.baseMapper.selectList(queryWrapper);
resourceParam.setName(r.getCategoryName());
resourceParam.setDisabled(true);
resourceParam.setChildren(resources);
list.add(resourceParam);
});
return list;
}
Aggregations