Files
hzdyjs/用户信息同步统一身份认证/data.conf
T
“wuzhen”andCursor 334bd8742e feat: 新增统一身份认证用户数据定时同步脚本
将校园系统部门、教职工、学生数据同步到认证中间库6张标准表,支持 MySQL 本地测试与 Oracle 生产目标库配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 10:01:16 +08:00

42 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ===========================================
# 统一身份认证用户数据同步 - 研发环境配置
# ===========================================
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# ---------- 源库(校园管理系统,只读) ----------
SOURCE_DB_TYPE="mysql"
SOURCE_DB_HOST="47.99.164.66"
SOURCE_DB_PORT="3306"
SOURCE_DB_NAME="hzdyjs_xg"
SOURCE_DB_USER="root"
SOURCE_DB_PASS="hn02le.34lkdLKD"
# ---------- 目标库(认证中间库,读写) ----------
# 研发环境:与源库同库,仅新增中间表
TARGET_DB_TYPE="mysql"
TARGET_DB_HOST="47.99.164.66"
TARGET_DB_PORT="3306"
TARGET_DB_NAME="hzdyjs_xg"
TARGET_DB_USER="root"
TARGET_DB_PASS="hn02le.34lkdLKD"
# ---------- 同步策略 ----------
# 同步模式:full=全量,incremental=增量(按 update_time)
SYNC_MODE="full"
# 循环间隔(秒),默认 3600 = 1 小时
CYCLE_INTERVAL=3600
# 单次批量大小
BATCH_SIZE=500
# 失败重试
MAX_RETRY=3
RETRY_DELAY=5
# ---------- 日志与锁 ----------
LOG_DIR="${SCRIPT_DIR}/logs"
LOCK_FILE="${SCRIPT_DIR}/sync_user_to_sso.lock"
STATE_FILE="${SCRIPT_DIR}/.sync_state"
# ---------- 业务系统标识(写入错误日志) ----------
YWXTMC="校园管理系统"