feat(agent): 增加租户密钥列表展示租户代理平台利润

- 在 AgentController 中添加 ITenantPlatformService 依赖- 在查询租户密钥列表时,为每个租户获取其代理平台列表
- 在 AgentTenantSecretKeyDTO 中添加 tenantPlatforms 字段,用于存储代理平台信息
main-cf
shi 2025-03-24 17:36:42 +08:00
parent 173d40de55
commit b043fa6c2d
2 changed files with 14 additions and 1 deletions

View File

@ -53,7 +53,8 @@ public class AgentController extends BaseController {
@Resource
private ITenantGameQuotaService tenantGameQuotaService;
@Resource
private ITenantPlatformService tenantPlatformService;
/**
@ -74,6 +75,9 @@ public class AgentController extends BaseController {
for (TenantSecretKey row : (List<TenantSecretKey>) dataTable.getRows()) {
AgentTenantSecretKeyDTO agentTenantSecretKeyDTO = new AgentTenantSecretKeyDTO();
BeanUtils.copyProperties(row, agentTenantSecretKeyDTO);
agentTenantSecretKeyDTO.setTenantPlatforms(tenantPlatformService.selectTenantPlatformList(TenantPlatform.builder()
.tenantId(row.getId())
.build()));
list.add(agentTenantSecretKeyDTO);
}
dataTable.setRows(list);
@ -98,6 +102,7 @@ public class AgentController extends BaseController {
TenantPlatform tenantPlatform = new TenantPlatform();
BeanUtils.copyProperties(tenantAgentPlatform, tenantPlatform);
tenantPlatforms.add(tenantPlatform);
}

View File

@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ff.base.annotation.Excel;
import com.ff.base.core.domain.BaseEntity;
import com.ff.base.system.domain.TenantPlatform;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -12,6 +13,7 @@ import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import java.math.BigDecimal;
import java.util.List;
/**
* ff_tenant_secret_key
@ -91,4 +93,10 @@ public class AgentTenantSecretKeyDTO extends BaseEntity
private BigDecimal depositRatio;
/**
*
*/
private List<TenantPlatform> tenantPlatforms;
}