use of cn.exrick.manager.pojo.TbContentCategoryExample in project xmall by Exrick.
the class ContentCatServiceImpl method getContentCatList.
@Override
public List<ZTreeNode> getContentCatList(Long parentId) {
TbContentCategoryExample example = new TbContentCategoryExample();
TbContentCategoryExample.Criteria criteria = example.createCriteria();
criteria.andParentIdEqualTo(parentId);
example.setOrderByClause("sort_order");
List<TbContentCategory> catList = tbContentCategoryMapper.selectByExample(example);
List<ZTreeNode> list = new ArrayList<>();
for (int i = 0; i < catList.size(); i++) {
ZTreeNode zTreeNode = DtoUtil.TbContentCategory2ZTreeNode(catList.get(i));
list.add(zTreeNode);
}
return list;
}
Aggregations