Search in sources :

Example 1 with ClusterTenantVO

use of com.dtstack.taier.develop.vo.console.ClusterTenantVO in project Taier by DTStack.

the class TenantService method pageQuery.

public PageResult<List<ClusterTenantVO>> pageQuery(Long clusterId, String tenantName, int pageSize, int currentPage) {
    PageQuery query = new PageQuery(currentPage, pageSize, "gmt_modified", Sort.DESC.name());
    int count = clusterTenantMapper.generalCount(clusterId, tenantName);
    if (count == 0) {
        return PageResult.EMPTY_PAGE_RESULT;
    }
    List<ClusterTenant> clusterTenants = clusterTenantMapper.generalQuery(query, clusterId, tenantName);
    List<ClusterTenantVO> clusterTenantVOS = fillQueue(clusterTenants);
    return new PageResult(clusterTenantVOS, count, query);
}
Also used : ClusterTenantVO(com.dtstack.taier.develop.vo.console.ClusterTenantVO) PageQuery(com.dtstack.taier.dao.pager.PageQuery) ClusterTenant(com.dtstack.taier.dao.domain.ClusterTenant) PageResult(com.dtstack.taier.dao.pager.PageResult)

Aggregations

ClusterTenant (com.dtstack.taier.dao.domain.ClusterTenant)1 PageQuery (com.dtstack.taier.dao.pager.PageQuery)1 PageResult (com.dtstack.taier.dao.pager.PageResult)1 ClusterTenantVO (com.dtstack.taier.develop.vo.console.ClusterTenantVO)1