Showing
4 changed files
with
8 additions
and
2 deletions
@@ -37,4 +37,6 @@ public class TenantDTO extends BaseDTO { | @@ -37,4 +37,6 @@ public class TenantDTO extends BaseDTO { | ||
37 | @JsonSerialize(using = LocalDateTimeSerializer.class) | 37 | @JsonSerialize(using = LocalDateTimeSerializer.class) |
38 | @ApiModelProperty("租户到期时间") | 38 | @ApiModelProperty("租户到期时间") |
39 | private LocalDateTime tenantExpireTime; | 39 | private LocalDateTime tenantExpireTime; |
40 | + @ApiModelProperty(value = "租户配置",required = true) | ||
41 | + private String tenantProfileId; | ||
40 | } | 42 | } |
@@ -14,7 +14,6 @@ public class Tenant extends AuditRelatedEntity { | @@ -14,7 +14,6 @@ public class Tenant extends AuditRelatedEntity { | ||
14 | 14 | ||
15 | private static final long serialVersionUID = 4848421848961008112L; | 15 | private static final long serialVersionUID = 4848421848961008112L; |
16 | private String name; | 16 | private String name; |
17 | - | ||
18 | 17 | ||
19 | private String icon; | 18 | private String icon; |
20 | 19 | ||
@@ -28,4 +27,7 @@ public class Tenant extends AuditRelatedEntity { | @@ -28,4 +27,7 @@ public class Tenant extends AuditRelatedEntity { | ||
28 | 27 | ||
29 | /** TB的租户ID */ | 28 | /** TB的租户ID */ |
30 | private String tenantId; | 29 | private String tenantId; |
30 | + | ||
31 | + /** 租户配置ID */ | ||
32 | + private String tenantProfileId; | ||
31 | } | 33 | } |
@@ -47,6 +47,7 @@ public class YtTenantServiceImpl extends AbstractBaseService<TenantMapper, Tenan | @@ -47,6 +47,7 @@ public class YtTenantServiceImpl extends AbstractBaseService<TenantMapper, Tenan | ||
47 | TenantDTO tenantDTO = new TenantDTO(); | 47 | TenantDTO tenantDTO = new TenantDTO(); |
48 | BeanUtils.copyProperties(tenantReqDTO, tenantDTO); | 48 | BeanUtils.copyProperties(tenantReqDTO, tenantDTO); |
49 | Tenant tenant = tenantDTO.getEntity(Tenant.class); | 49 | Tenant tenant = tenantDTO.getEntity(Tenant.class); |
50 | + tenant.setTenantProfileId(tenantReqDTO.getTenantProfileId().getId().toString()); | ||
50 | baseMapper.insert(tenant); | 51 | baseMapper.insert(tenant); |
51 | tenant.copyToDTO(tenantDTO); | 52 | tenant.copyToDTO(tenantDTO); |
52 | saveTenantMapping(tenantDTO.getTenantId(), tenantReqDTO.getRoleIds()); | 53 | saveTenantMapping(tenantDTO.getTenantId(), tenantReqDTO.getRoleIds()); |
@@ -12,11 +12,12 @@ | @@ -12,11 +12,12 @@ | ||
12 | <result property="tenantExpireTime" column="tenant_expire_time"/> | 12 | <result property="tenantExpireTime" column="tenant_expire_time"/> |
13 | <result property="createTime" column="create_time"/> | 13 | <result property="createTime" column="create_time"/> |
14 | <result property="icon" column="icon"/> | 14 | <result property="icon" column="icon"/> |
15 | + <result property="tenantProfileId" column="tenant_profile_id"/> | ||
15 | </resultMap> | 16 | </resultMap> |
16 | 17 | ||
17 | <sql id="column"> | 18 | <sql id="column"> |
18 | id | 19 | id |
19 | - , tenant_id,name, enabled, description, default_config, tenant_expire_time, create_time,icon | 20 | + , tenant_id,name, enabled, description, default_config, tenant_expire_time, create_time,icon,tenant_profile_id |
20 | </sql> | 21 | </sql> |
21 | <select id="getTenantIdsByTenantIds" resultType="java.lang.String"> | 22 | <select id="getTenantIdsByTenantIds" resultType="java.lang.String"> |
22 | SELECT tenant_id FROM sys_tenant WHERE id IN | 23 | SELECT tenant_id FROM sys_tenant WHERE id IN |