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