class DeptService extends BaseService<Dept,Long,DeptRepository> {

    public List<ZTreeNode> tree() {
        List<Object[]> list = deptRepository.tree();
        List<ZTreeNode> nodes = new ArrayList<>();
        for(Object[] obj:list){
            ZTreeNode node = transfer(obj);
            nodes.add(node);
        }
        return nodes;
    }

}