让七月迭代具备可直接部署的配置基线

补齐三套环境配置、测试环境部署门禁与 system_config 初始化,并按当前无企微应用的约束将企微凭据改为明文存储。

Constraint: 当前测试环境尚无企微应用及历史企微密文数据

Rejected: 使用启动环境变量加密企微凭据 | 用户明确要求直接明文保存并移除加密密钥

Confidence: high

Scope-risk: moderate

Directive: 企微真实闭环完成前保持两个旧审批入口开关为 true

Tested: gofmt;git diff --check;bash -n;docker compose config;Gitea workflow YAML 解析;OpenAPI 重新生成

Not-tested: go test;常规 go build;LSP;实际数据库迁移;真实测试环境部署;企微真实联调
This commit is contained in:
2026-07-25 18:18:45 +08:00
parent 73f5125d3d
commit cb26217205
29 changed files with 277 additions and 232 deletions

View File

@@ -178,9 +178,8 @@ type ApprovalConfig struct {
// WeComConfig 企业微信 Adapter 运行配置。
type WeComConfig struct {
BaseURL string `mapstructure:"base_url"` // 企业微信 API 基础地址
Timeout time.Duration `mapstructure:"timeout"` // 外部请求超时时间
CredentialEncryptionKey string `mapstructure:"credential_encryption_key"` // 数据库凭证 AES-256-GCM 加密密钥Base64
BaseURL string `mapstructure:"base_url"` // 企业微信 API 基础地址
Timeout time.Duration `mapstructure:"timeout"` // 外部请求超时时间
}
// PollingConfig 轮询通用配置

View File

@@ -147,4 +147,3 @@ approval:
wecom:
base_url: "https://qyapi.weixin.qq.com"
timeout: "10s"
credential_encryption_key: "" # 启用企微前必填JUNHONG_WECOM_CREDENTIAL_ENCRYPTION_KEY32 字节 Base64

View File

@@ -134,7 +134,6 @@ func bindEnvVariables(v *viper.Viper) {
"approval.legacy_offline_recharge_pay_enabled",
"wecom.base_url",
"wecom.timeout",
"wecom.credential_encryption_key",
"wechat.official_account.app_id",
"wechat.official_account.app_secret",
"wechat.official_account.token",