更新配置

This commit is contained in:
zg
2026-07-16 00:04:27 +08:00
parent b6facb0857
commit 730af827ad
21 changed files with 34 additions and 34 deletions

View File

@@ -31,7 +31,7 @@ cur.execute("INSERT INTO sys_user (id, username, password, real_name, email, pho
test_sid = uid()
gw_sid = uid()
cur.execute("INSERT INTO sys_system (id,system_code,system_name,front_url,backend_url,gateway_url,status,description) VALUES (%s,%s,%s,%s,%s,%s,%s,%s)",
(test_sid, 'test', '测试系统', 'http://127.0.0.1:5001', 'http://127.0.0.1:9000', 'http://127.0.0.1:9000/test', 1, '测试用业务系统'))
(test_sid, 'test', '测试系统', 'http://127.0.0.1:5001', 'http://127.0.0.1:32000', 'http://127.0.0.1:9000/test', 1, '测试用业务系统'))
cur.execute("INSERT INTO sys_system (id,system_code,system_name,front_url,backend_url,gateway_url,icon,sort_order,status,description,doc_token) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
(gw_sid, 'gateway', '网关管理平台', 'http://127.0.0.1:5001', 'http://127.0.0.1:9000', 'http://127.0.0.1:9000/gateway', '', 0, 1, '统一登录网关管理后台', 'gateway1234567890'))

View File

@@ -7,7 +7,7 @@ ALTER TABLE sys_system MODIFY doc_token VARCHAR(128) DEFAULT NULL;
-- 去重约束
ALTER TABLE sys_system ADD UNIQUE KEY uk_gateway_url (gateway_url);
-- 更新现有数据: 给每个系统一个不同的 gateway_url
UPDATE sys_system SET gateway_url = CONCAT('http://127.0.0.1:9000/', system_code) WHERE gateway_url = '';
UPDATE sys_system SET gateway_url = CONCAT('http://127.0.0.1:32000/', system_code) WHERE gateway_url = '';
-- 2. sys_file: 重建为新结构(文件二进制存入数据库)
DROP TABLE IF EXISTS sys_file;

View File

@@ -7,11 +7,11 @@ VALUES (REPLACE(UUID(),'-',''), 'admin', '$2b$10$ffAZHF6lmUuNV6OJITADXeduD5mMTS0
-- 测试系统
INSERT INTO sys_system (id, system_code, system_name, front_url, backend_url, gateway_url, status, description)
VALUES (REPLACE(UUID(),'-',''), 'test', '测试系统', 'http://127.0.0.1:5001', 'http://127.0.0.1:9000', 'http://127.0.0.1:9000/test', 1, '测试用业务系统');
VALUES (REPLACE(UUID(),'-',''), 'test', '测试系统', 'http://127.0.0.1:5001', 'http://127.0.0.1:32000', 'http://127.0.0.1:32000/test', 1, '测试用业务系统');
-- Gateway 系统
INSERT INTO sys_system (id, system_code, system_name, front_url, backend_url, gateway_url, icon, sort_order, status, description, doc_token)
VALUES (REPLACE(UUID(),'-',''), 'gateway', '网关管理平台', 'http://127.0.0.1:5001', 'http://127.0.0.1:9000', 'http://127.0.0.1:9000/gateway', '', 0, 1, '统一登录网关管理后台', 'gateway1234567890');
VALUES (REPLACE(UUID(),'-',''), 'gateway', '网关管理平台', 'http://127.0.0.1:5001', 'http://127.0.0.1:32000', 'http://127.0.0.1:32000/gateway', '', 0, 1, '统一登录网关管理后台', 'gateway1234567890');
-- 查询已插入的ID
SELECT id INTO @uid FROM sys_user WHERE username='admin';