feat(agent): 增加租户密钥列表展示租户代理平台利润
- 在 AgentController 中添加 ITenantPlatformService 依赖- 在查询租户密钥列表时,为每个租户获取其代理平台列表 - 在 AgentTenantSecretKeyDTO 中添加 tenantPlatforms 字段,用于存储代理平台信息main-cf
parent
173d40de55
commit
b043fa6c2d
|
@ -53,7 +53,8 @@ public class AgentController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantGameQuotaService tenantGameQuotaService;
|
private ITenantGameQuotaService tenantGameQuotaService;
|
||||||
|
@Resource
|
||||||
|
private ITenantPlatformService tenantPlatformService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,6 +75,9 @@ public class AgentController extends BaseController {
|
||||||
for (TenantSecretKey row : (List<TenantSecretKey>) dataTable.getRows()) {
|
for (TenantSecretKey row : (List<TenantSecretKey>) dataTable.getRows()) {
|
||||||
AgentTenantSecretKeyDTO agentTenantSecretKeyDTO = new AgentTenantSecretKeyDTO();
|
AgentTenantSecretKeyDTO agentTenantSecretKeyDTO = new AgentTenantSecretKeyDTO();
|
||||||
BeanUtils.copyProperties(row, agentTenantSecretKeyDTO);
|
BeanUtils.copyProperties(row, agentTenantSecretKeyDTO);
|
||||||
|
agentTenantSecretKeyDTO.setTenantPlatforms(tenantPlatformService.selectTenantPlatformList(TenantPlatform.builder()
|
||||||
|
.tenantId(row.getId())
|
||||||
|
.build()));
|
||||||
list.add(agentTenantSecretKeyDTO);
|
list.add(agentTenantSecretKeyDTO);
|
||||||
}
|
}
|
||||||
dataTable.setRows(list);
|
dataTable.setRows(list);
|
||||||
|
@ -98,6 +102,7 @@ public class AgentController extends BaseController {
|
||||||
TenantPlatform tenantPlatform = new TenantPlatform();
|
TenantPlatform tenantPlatform = new TenantPlatform();
|
||||||
BeanUtils.copyProperties(tenantAgentPlatform, tenantPlatform);
|
BeanUtils.copyProperties(tenantAgentPlatform, tenantPlatform);
|
||||||
tenantPlatforms.add(tenantPlatform);
|
tenantPlatforms.add(tenantPlatform);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.ff.base.annotation.Excel;
|
import com.ff.base.annotation.Excel;
|
||||||
import com.ff.base.core.domain.BaseEntity;
|
import com.ff.base.core.domain.BaseEntity;
|
||||||
|
import com.ff.base.system.domain.TenantPlatform;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -12,6 +13,7 @@ import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户租户密钥对象 ff_tenant_secret_key
|
* 用户租户密钥对象 ff_tenant_secret_key
|
||||||
|
@ -91,4 +93,10 @@ public class AgentTenantSecretKeyDTO extends BaseEntity
|
||||||
private BigDecimal depositRatio;
|
private BigDecimal depositRatio;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户代理平台利润
|
||||||
|
*/
|
||||||
|
private List<TenantPlatform> tenantPlatforms;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue