Search in sources :

Example 1 with ClusterTenant

use of com.dtstack.taier.dao.domain.ClusterTenant in project Taier by DTStack.

the class TenantService method addClusterTenant.

private void addClusterTenant(Long tenantId, Long clusterId) {
    ClusterTenant et = new ClusterTenant();
    et.setTenantId(tenantId);
    et.setClusterId(clusterId);
    clusterTenantMapper.insert(et);
}
Also used : ClusterTenant(com.dtstack.taier.dao.domain.ClusterTenant)

Example 2 with ClusterTenant

use of com.dtstack.taier.dao.domain.ClusterTenant 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)2 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