feat(system): 增加测试账号数字段支持代理场景
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.tenantbalance.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.tenantbalance.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@@ -25,4 +26,7 @@ public class TenantBalancePageReqVO extends PageParam {
|
|||||||
@Schema(description = "更新时间")
|
@Schema(description = "更新时间")
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
@Schema(description = "测试账号数")
|
||||||
|
@ExcelProperty("测试账号数")
|
||||||
|
private Integer testAccountNum;
|
||||||
}
|
}
|
||||||
@@ -28,4 +28,7 @@ public class TenantBalanceRespVO {
|
|||||||
@ExcelProperty("代理名称")
|
@ExcelProperty("代理名称")
|
||||||
private String tenantName;
|
private String tenantName;
|
||||||
|
|
||||||
|
@Schema(description = "测试账号数")
|
||||||
|
@ExcelProperty("测试账号数")
|
||||||
|
private Integer testAccountNum;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.tenantbalance.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.tenantbalance.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -26,4 +27,7 @@ public class TenantBalanceSaveReqVO {
|
|||||||
@NotNull(message = "更新时间不能为空")
|
@NotNull(message = "更新时间不能为空")
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
@Schema(description = "测试账号数")
|
||||||
|
@ExcelProperty("测试账号数")
|
||||||
|
private Integer testAccountNum;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.system.dal.dataobject.tenantbalance;
|
package cn.iocoder.yudao.module.system.dal.dataobject.tenantbalance;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -34,5 +36,5 @@ public class TenantBalanceDO{
|
|||||||
*/
|
*/
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
private Integer testAccountNum;
|
||||||
}
|
}
|
||||||
@@ -169,6 +169,10 @@ public class TenantServiceImpl implements TenantService {
|
|||||||
// 设置新租户的父租户ID为当前租户ID(建立层级关系)
|
// 设置新租户的父租户ID为当前租户ID(建立层级关系)
|
||||||
tenant.setParentId(currentTenantId);
|
tenant.setParentId(currentTenantId);
|
||||||
|
|
||||||
|
if (tenant.getTenantType().equals(TenantEnum.AGENCY.getTenantType())) {
|
||||||
|
tenant.setStatus(CommonStatusEnum.DISABLE.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
tenantMapper.insert(tenant);
|
tenantMapper.insert(tenant);
|
||||||
// 扣除开通费用,
|
// 扣除开通费用,
|
||||||
if (balanceService.consumption(createReqVO.getPackageId(), tenant.getId(), createReqVO.getRemark())) {
|
if (balanceService.consumption(createReqVO.getPackageId(), tenant.getId(), createReqVO.getRemark())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user