@Test public void tree() throws Exception { System.out.println(JSON.toJSON(deptService.tree())); }
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; }
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; } }
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; }  }
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; }  List<ZTreeNode> tree(); List<Dept> query(String condition); void deleteDept(Long deptId); List<DeptNode> queryAllNode(); void deptSetPids(Dept dept); }
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; }  List<ZTreeNode> tree(); List<Dept> query(String condition); void deleteDept(Long deptId); List<DeptNode> queryAllNode(); void deptSetPids(Dept dept);  }