@Test public void testQuery() { Role dto = new Role(); QueryResult<Role> result = roleService.query(0, 10, dto); assertNotNull(result.getList()); }
@Override public QueryResult<Role> query(int page, int size, Role model) { QueryResult<Role> result = super.query(page, size, model); for (Role role : result.getList()) { List<Menu> menus = role.getMenus(); menus = TreeEntityUtil.flatData(menus); role.setMenus(menus); } return result; }
RoleService extends AbstractRoleService { @Override public QueryResult<Role> query(int page, int size, Role model) { QueryResult<Role> result = super.query(page, size, model); for (Role role : result.getList()) { List<Menu> menus = role.getMenus(); menus = TreeEntityUtil.flatData(menus); role.setMenus(menus); } return result; } }
RoleService extends AbstractRoleService { @Override public QueryResult<Role> query(int page, int size, Role model) { QueryResult<Role> result = super.query(page, size, model); for (Role role : result.getList()) { List<Menu> menus = role.getMenus(); menus = TreeEntityUtil.flatData(menus); role.setMenus(menus); } return result; }  }
RoleService extends AbstractRoleService { @Override public QueryResult<Role> query(int page, int size, Role model) { QueryResult<Role> result = super.query(page, size, model); for (Role role : result.getList()) { List<Menu> menus = role.getMenus(); menus = TreeEntityUtil.flatData(menus); role.setMenus(menus); } return result; }  Role setPermissions(String id, String[] permissions); @Override QueryResult<Role> query(int page, int size, Role model); List<Menu> noPermissions(String roleId); }
RoleService extends AbstractRoleService { @Override public QueryResult<Role> query(int page, int size, Role model) { QueryResult<Role> result = super.query(page, size, model); for (Role role : result.getList()) { List<Menu> menus = role.getMenus(); menus = TreeEntityUtil.flatData(menus); role.setMenus(menus); } return result; }  Role setPermissions(String id, String[] permissions); @Override QueryResult<Role> query(int page, int size, Role model); List<Menu> noPermissions(String roleId);  }