From c4c8e9989b34652341fc11ec4b12d869d5cfef46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Sat, 19 Jul 2025 10:24:08 +0800 Subject: [PATCH] xx --- database.md | 52 ------------------ gateway/.idea/workspace.xml | 11 ++-- gateway/target/classes/application.properties | 15 +++++ .../tuoheng/gateway/GatewayApplication.class | Bin 0 -> 748 bytes .../gateway/config/SecurityConfig.class | Bin 0 -> 3453 bytes oidc/src/main/resources/static/login.html | 5 ++ .../target/classes/application.properties | 1 + .../resourceservice/HelloController.class | Bin 0 -> 1223 bytes .../ResourceServiceApplication.class | Bin 0 -> 788 bytes .../target/classes/application.properties | 1 + .../resourceservice/HelloController.class | Bin 0 -> 1223 bytes .../ResourceServiceApplication.class | Bin 0 -> 788 bytes 12 files changed, 26 insertions(+), 59 deletions(-) create mode 100644 gateway/target/classes/application.properties create mode 100644 gateway/target/classes/com/tuoheng/gateway/GatewayApplication.class create mode 100644 gateway/target/classes/com/tuoheng/gateway/config/SecurityConfig.class create mode 100644 resourceservice/target/classes/application.properties create mode 100644 resourceservice/target/classes/com/tuoheng/resourceservice/HelloController.class create mode 100644 resourceservice/target/classes/com/tuoheng/resourceservice/ResourceServiceApplication.class create mode 100644 resourceserviceb/target/classes/application.properties create mode 100644 resourceserviceb/target/classes/com/tuoheng/resourceservice/HelloController.class create mode 100644 resourceserviceb/target/classes/com/tuoheng/resourceservice/ResourceServiceApplication.class diff --git a/database.md b/database.md index 5de1a7d..327e189 100644 --- a/database.md +++ b/database.md @@ -65,55 +65,3 @@ > 主键:id > 外键:tenant_id 关联 tenants.id,subsystem_id 关联 subsystems.id - -## 二、子系统(如订单、支付等)表结构 - -### 1. 业务用户表(users 和 统一认证网关(主工程) 用的不是一个数据库,表名可以重复) -| 字段名 | 类型 | 说明 | -| -------------- | -------------- | -------------------------- | -| id | BIGINT | 主键,自增 | -| user_id | BIGINT | 关联统一认证网关 users 表的 id 字段,外键->users.id | -| username | VARCHAR(50) | 业务系统内用户名 | -| ... | ... | 业务相关字段(如地址、类型等)| -| create_time | TIMESTAMP | 创建时间 | -| update_time | TIMESTAMP | 更新时间 | - -> 主键:id -> 外键:user_id 关联统一认证网关 users.id(users 表为统一认证主工程的用户表) - ---- - -**主外键关系说明:** -- users.tenant_id → tenants.id -- users.subsystem_id → subsystems.id -- tenant_subsystem_permissions.tenant_id → tenants.id -- tenant_subsystem_permissions.subsystem_id → subsystems.id -- 子系统业务用户表 user_id → 统一认证 users.id -- 业务数据表 user_id → 统一认证 users.id - - --- 插入租户 -INSERT INTO tenants (id, tenant_code, tenant_name, description, status, create_time, update_time) -VALUES (1, 'test-tenant', '测试租户', '测试用租户', 'ACTIVE', NOW(), NOW()); - --- 插入用户 -INSERT INTO users ( - id, username, password, user_type, tenant_id, subsystem_id, email, phone, real_name, status, create_time, update_time -) VALUES ( - 1, - 'testuser', - '$2a$10$wH6Qw6Qw6Qw6Qw6Qw6Qw6uQw6Qw6Qw6Qw6Qw6Qw6Qw6Qw6Qw6Qw6', -- 密码123456的BCrypt加密 - 'TENANT', - 1, - NULL, - 'testuser@example.com', - '13800000000', - '测试用户', - 'ACTIVE', - NOW(), - NOW() -); - -租户ID:1 或 租户名:test-tenant -用户名:testuser -密码:123456 diff --git a/gateway/.idea/workspace.xml b/gateway/.idea/workspace.xml index 353192a..fc978c1 100644 --- a/gateway/.idea/workspace.xml +++ b/gateway/.idea/workspace.xml @@ -4,12 +4,7 @@