多租户:登录界面,根据 host 域名获取对应的租户编号

This commit is contained in:
YunaiV
2023-11-06 21:24:45 +08:00
parent ac0f9a020a
commit 0837f9adbc
20 changed files with 190 additions and 83 deletions

View File

@@ -157,7 +157,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
o.setContactMobile("15601691300");
o.setPackageId(100L);
o.setStatus(randomCommonStatus());
o.setDomain("https://www.iocoder.cn");
o.setWebsite("https://www.iocoder.cn");
o.setUsername("yunai");
o.setPassword("yuanma");
});
@@ -185,7 +185,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
TenantUpdateReqVO reqVO = randomPojo(TenantUpdateReqVO.class, o -> {
o.setId(dbTenant.getId()); // 设置更新的 ID
o.setStatus(randomCommonStatus());
o.setDomain(randomString());
o.setWebsite(randomString());
});
// mock 套餐

View File

@@ -411,7 +411,7 @@ CREATE TABLE IF NOT EXISTS "system_tenant" (
"contact_name" varchar(255) NOT NULL,
"contact_mobile" varchar(255),
"status" tinyint NOT NULL,
"domain" varchar(63) DEFAULT '',
"website" varchar(63) DEFAULT '',
"package_id" bigint NOT NULL,
"expire_time" timestamp NOT NULL,
"account_count" int NOT NULL,