-- 更新CAS配置为正确的校方认证服务器地址
USE ry;

-- 更新CAS服务器地址
INSERT INTO sys_config (config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark) 
VALUES ('CAS服务器地址', 'cas.server.url', 'https://rsso.gxsdxy.cn', 'Y', 'admin', NOW(), 'admin', NOW(), 'CAS单点登录服务器地址')
ON DUPLICATE KEY UPDATE 
config_value = 'https://rsso.gxsdxy.cn', 
update_by = 'admin', 
update_time = NOW();

-- 更新CAS客户端服务地址
INSERT INTO sys_config (config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark) 
VALUES ('CAS客户端服务地址', 'cas.client.service', 'https://pasd.gxsdxy.cn/cas/login', 'Y', 'admin', NOW(), 'admin', NOW(), 'CAS客户端服务地址')
ON DUPLICATE KEY UPDATE 
config_value = 'https://pasd.gxsdxy.cn/cas/login', 
update_by = 'admin', 
update_time = NOW();

-- 更新CAS登录页面地址
INSERT INTO sys_config (config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark) 
VALUES ('CAS登录页面地址', 'cas.login.url', 'https://rsso.gxsdxy.cn/login', 'Y', 'admin', NOW(), 'admin', NOW(), 'CAS登录页面地址')
ON DUPLICATE KEY UPDATE 
config_value = 'https://rsso.gxsdxy.cn/login', 
update_by = 'admin', 
update_time = NOW();

-- 更新CAS登出地址
INSERT INTO sys_config (config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark)
VALUES ('CAS登出地址', 'cas.logout.url', 'https://rsso.gxsdxy.cn/logout', 'Y', 'admin', NOW(), 'admin', NOW(), 'CAS登出地址')
ON DUPLICATE KEY UPDATE 
config_value = 'https://rsso.gxsdxy.cn/logout', 
update_by = 'admin', 
update_time = NOW();

-- 更新CAS票据验证地址
INSERT INTO sys_config (config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark) 
VALUES ('CAS票据验证地址', 'cas.validate.url', 'https://rsso.gxsdxy.cn/p3/serviceValidate', 'Y', 'admin', NOW(), 'admin', NOW(), 'CAS票据验证地址')
ON DUPLICATE KEY UPDATE 
config_value = 'https://rsso.gxsdxy.cn/p3/serviceValidate', 
update_by = 'admin', 
update_time = NOW();

-- 查询插入的配置
SELECT * FROM sys_config WHERE config_key LIKE 'cas.%';