|
|
@@ -38,23 +38,24 @@ CREATE TABLE IF NOT EXISTS `sessions` (
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户会话表';
|
|
|
|
|
|
-- 插入默认配置数据(纵表结构)
|
|
|
-INSERT INTO `system_config` (`config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`) VALUES
|
|
|
-('heartbeat_interval_seconds', '30', 'int', '心跳间隔秒数(默认30秒)', 1, 1),
|
|
|
-('key_overlap_minutes', '30', 'int', '新旧密钥共存分钟数', 1, 1),
|
|
|
-('key_expire_minutes', '60', 'int', '密钥过期分钟数(从创建时间算起)', 1, 1),
|
|
|
-('max_heartbeat_failures', '10', 'int', '最大心跳失败次数,超过后暂停检测', 1, 1),
|
|
|
-('max_network_failures', '15', 'int', '网络异常最大失败次数,超过后登出', 1, 1),
|
|
|
-('prevent_duplicate_login', '1', 'bool', '是否防止重复登录:0-否,1-是', 1, 1),
|
|
|
-('timestamp_tolerance_seconds', '300', 'int', '时间戳容忍秒数(前后5分钟)', 1, 1),
|
|
|
-('session_extend_enabled', '1', 'bool', '是否启用心跳延长session:0-否,1-是', 1, 1),
|
|
|
-('session_extend_threshold_hours', '4', 'int', 'session延长阈值(小时),距离过期小于此值时延长', 1, 1),
|
|
|
-('session_extend_hours', '2', 'int', '每次心跳延长的小时数', 1, 1),
|
|
|
-('api_timeout_seconds', '30', 'int', 'API请求超时秒数', 1, 1),
|
|
|
-('client_heartbeat_interval_seconds', '30', 'int', '客户端心跳间隔秒数', 1, 1)
|
|
|
-ON DUPLICATE KEY UPDATE
|
|
|
- `config_value` = VALUES(`config_value`),
|
|
|
- `config_type` = VALUES(`config_type`),
|
|
|
- `description` = VALUES(`description`),
|
|
|
- `is_system` = VALUES(`is_system`),
|
|
|
- `is_editable` = VALUES(`is_editable`),
|
|
|
- `updated_at` = NOW();
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (1, 'heartbeat_interval_seconds', '30', 'int', '心跳间隔秒数(默认30秒)', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (2, 'key_overlap_minutes', '30', 'int', '新旧密钥共存分钟数', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (3, 'key_expire_minutes', '60', 'int', '密钥过期分钟数(从创建时间算起)', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (4, 'max_heartbeat_failures', '10', 'int', '最大心跳失败次数,超过后暂停检测', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (5, 'max_network_failures', '15', 'int', '网络异常最大失败次数,超过后登出', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (6, 'prevent_duplicate_login', '1', 'bool', '是否防止重复登录:0-否,1-是', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (7, 'timestamp_tolerance_seconds', '30', 'int', '时间戳容忍秒数(前后5分钟)', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-07 23:47:41');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (8, 'session_extend_enabled', '1', 'bool', '是否启用心跳延长session:0-否,1-是', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (9, 'session_extend_threshold_hours', '4', 'int', 'session延长阈值(小时),距离过期小于此值时延长', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (10, 'session_extend_hours', '2', 'int', '每次心跳延长的小时数', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (11, 'api_timeout_seconds', '30', 'int', 'API请求超时秒数', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (12, 'client_heartbeat_interval_seconds', '30', 'int', '客户端心跳间隔秒数', 1, 1, 0, '2026-01-06 17:21:40', '2026-01-06 17:21:40');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (13, 'sweep_batch_size', '10', 'int', '扫货批量大小', 1, 1, 0, '2026-01-06 20:09:54', '2026-01-06 20:09:54');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (14, 'sweep_purchase_interval', '30', 'int', '扫货购买间隔秒数', 1, 1, 0, '2026-01-06 20:09:54', '2026-01-06 20:09:54');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (15, 'sweep_max_purchases', '100', 'int', '扫货最大购买数量', 1, 1, 0, '2026-01-06 20:09:54', '2026-01-06 20:09:54');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (16, 'page_size', '10', 'int', '分页每页显示数量', 1, 1, 0, '2026-01-06 20:09:54', '2026-01-06 20:09:54');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (17, 'steam_auth_countdown_seconds', '30', 'int', 'Steam验证倒计时秒数', 1, 1, 0, '2026-01-06 20:11:16', '2026-01-06 20:11:16');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (19, 'init_key_expire_days', '1', 'int', '初始化密钥过期天数(应用启动时创建的密钥)', 1, 1, 0, '2026-01-08 09:52:03', '2026-01-08 09:52:31');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (20, 'key_rotation_check_interval_minutes', '5', 'int', '密钥轮换检查间隔分钟数', 1, 1, 0, '2026-01-08 09:57:32', '2026-01-08 09:57:48');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (21, 'session_cleanup_interval_hours', '2', 'int', 'Session清理间隔小时数', 1, 1, 0, '2026-01-08 09:58:57', '2026-01-08 09:59:22');
|
|
|
+INSERT INTO `buff`.`system_config` (`id`, `config_key`, `config_value`, `config_type`, `description`, `is_system`, `is_editable`, `is_deleted`, `created_at`, `updated_at`) VALUES (22, 'heartbeat_cleanup_interval_hours', '1', 'int', '心跳缓存清理间隔小时数', 1, 1, 0, '2026-01-08 09:58:57', '2026-01-08 09:59:22');
|