mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 15:35:06 +08:00
1. 管理后台,增加租户管理
2. 修复大量因为租户报错的单元测试
This commit is contained in:
@ -90,3 +90,6 @@ yudao:
|
||||
base-package: cn.iocoder.yudao.adminserver
|
||||
core-service:
|
||||
base-package: cn.iocoder.yudao.coreservice
|
||||
pay:
|
||||
pay-notify-url: http://niubi.natapp1.cc/api/pay/order/notify
|
||||
refund-notify-url: http://niubi.natapp1.cc/api/pay/refund/notify
|
||||
|
@ -42,7 +42,10 @@ public class SysUserSessionCoreServiceTest extends BaseDbAndRedisUnitTest {
|
||||
// 准备参数
|
||||
String userIp = randomString();
|
||||
String userAgent = randomString();
|
||||
LoginUser loginUser = randomPojo(LoginUser.class, o -> o.setUserType(randomEle(UserTypeEnum.values()).getValue()));
|
||||
LoginUser loginUser = randomPojo(LoginUser.class, o -> {
|
||||
o.setUserType(randomEle(UserTypeEnum.values()).getValue());
|
||||
o.setTenantId(0L); // 租户设置为 0,因为暂未启用多租户组件
|
||||
});
|
||||
// mock 方法
|
||||
when(securityProperties.getSessionTimeout()).thenReturn(Duration.ofDays(1));
|
||||
|
||||
|
@ -9,6 +9,7 @@ CREATE TABLE IF NOT EXISTS "inf_file" (
|
||||
"updater" varchar(64) DEFAULT '',
|
||||
"update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||
"tenant_id" bigint not null default '0',
|
||||
PRIMARY KEY ("id")
|
||||
) COMMENT '文件表';
|
||||
|
||||
@ -27,6 +28,7 @@ CREATE TABLE IF NOT EXISTS `sys_user_session` (
|
||||
`updater` varchar(64) DEFAULT '' ,
|
||||
"update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||
"tenant_id" bigint not null default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT '用户在线 Session';
|
||||
|
||||
@ -67,6 +69,7 @@ CREATE TABLE IF NOT EXISTS "inf_api_access_log" (
|
||||
"updater" varchar(64) default '',
|
||||
"update_time" timestamp not null default current_timestamp,
|
||||
"deleted" bit not null default false,
|
||||
"tenant_id" bigint not null default '0',
|
||||
primary key ("id")
|
||||
) COMMENT 'API 访问日志表';
|
||||
|
||||
@ -98,6 +101,7 @@ CREATE TABLE IF NOT EXISTS "inf_api_error_log" (
|
||||
"updater" varchar(64) default '',
|
||||
"update_time" timestamp not null default current_timestamp,
|
||||
"deleted" bit not null default false,
|
||||
"tenant_id" bigint not null default '0',
|
||||
primary key ("id")
|
||||
) COMMENT '系统异常日志';
|
||||
|
||||
@ -151,6 +155,7 @@ CREATE TABLE IF NOT EXISTS "sys_sms_log" (
|
||||
"updater" varchar(64) DEFAULT '',
|
||||
"update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||
"tenant_id" bigint not null default '0',
|
||||
PRIMARY KEY ("id")
|
||||
) COMMENT '短信日志';
|
||||
|
||||
@ -169,5 +174,6 @@ CREATE TABLE IF NOT EXISTS `sys_login_log` (
|
||||
`updater` varchar(64) DEFAULT '',
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`deleted` bit(1) NOT NULL DEFAULT '0',
|
||||
"tenant_id" bigint not null default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT ='系统访问记录';
|
||||
|
Reference in New Issue
Block a user