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);
}
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);
}
Aggregations