diff --git a/.gitignore b/.gitignore index b782b8c4d..988d5f855 100644 --- a/.gitignore +++ b/.gitignore @@ -64,4 +64,4 @@ application-preview.yml node_modules ### test -docker-compose-test.yml \ No newline at end of file +*-aitest* \ No newline at end of file diff --git a/db/0pigxx_boot.sql b/db/0pigxx_boot.sql index 52284f886..81c47f44f 100644 --- a/db/0pigxx_boot.sql +++ b/db/0pigxx_boot.sql @@ -1368,6 +1368,23 @@ BEGIN; INSERT INTO `sys_user_dept` (`user_id`, `dept_id`, `tenant_id`) VALUES (1, 1, 1); COMMIT; +-- ---------------------------- +-- Table structure for sys_tenant_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_tenant_user`; +CREATE TABLE `sys_tenant_user` ( + `tenant_id` bigint NOT NULL COMMENT '租户ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + PRIMARY KEY (`tenant_id`,`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='租户用户表'; + +-- ---------------------------- +-- Records of sys_tenant_user +-- ---------------------------- +BEGIN; +INSERT INTO `sys_tenant_user` (`tenant_id`, `user_id`) VALUES (1, 1); +COMMIT; + -- ---------------------------- -- Table structure for sys_message -- ---------------------------- diff --git a/db/2pigxx.sql b/db/2pigxx.sql index 0a4baf1ba..43e261dd3 100644 --- a/db/2pigxx.sql +++ b/db/2pigxx.sql @@ -1418,4 +1418,20 @@ BEGIN; INSERT INTO `sys_user_dept` (`user_id`, `dept_id`, `tenant_id`) VALUES (1, 1, 1); COMMIT; +-- ---------------------------- +-- Table structure for sys_tenant_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_tenant_user`; +CREATE TABLE `sys_tenant_user` ( + `tenant_id` bigint NOT NULL COMMENT '租户ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + PRIMARY KEY (`tenant_id`,`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='租户用户表'; + +-- ---------------------------- +-- Records of sys_tenant_user +-- ---------------------------- +BEGIN; +INSERT INTO `sys_tenant_user` (`tenant_id`, `user_id`) VALUES (1, 1); +COMMIT; SET FOREIGN_KEY_CHECKS = 1; diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysTenantServiceImpl.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysTenantServiceImpl.java index 6e0e1d057..1f6c987f4 100755 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysTenantServiceImpl.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysTenantServiceImpl.java @@ -51,7 +51,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.lang.reflect.Field; -import java.time.LocalDateTime; import java.util.*; /** @@ -159,12 +158,6 @@ public class SysTenantServiceImpl extends ServiceImpl