七月迭代短暂完结,还有很多后端的关键东西没有弄,这是一版赶时间做的东西
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
This commit is contained in:
@@ -30,6 +30,8 @@ type Config struct {
|
||||
PollingAutoTrigger PollingAutoTriggerConfig `mapstructure:"polling_auto_trigger"`
|
||||
Polling PollingConfig `mapstructure:"polling"`
|
||||
Worker WorkerConfig `mapstructure:"worker"`
|
||||
WeCom WeComConfig `mapstructure:"wecom"`
|
||||
Approval ApprovalConfig `mapstructure:"approval"`
|
||||
}
|
||||
|
||||
// ServerConfig HTTP 服务器配置
|
||||
@@ -168,6 +170,19 @@ type WorkerConfig struct {
|
||||
InstanceName string `mapstructure:"instance_name"` // Worker 实例名称,用于多实例日志区分
|
||||
}
|
||||
|
||||
// ApprovalConfig 审批新旧入口切换配置。
|
||||
type ApprovalConfig struct {
|
||||
LegacyRefundManualEnabled bool `mapstructure:"legacy_refund_manual_enabled"` // 是否保留退款人工通过与拒绝入口
|
||||
LegacyOfflineRechargePayEnabled bool `mapstructure:"legacy_offline_recharge_pay_enabled"` // 是否保留线下充值人工确认入口
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
|
||||
// PollingConfig 轮询通用配置
|
||||
type PollingConfig struct {
|
||||
// VerboseLog 开启后,所有轮询 handler 在成功获取上游数据时以 Info 级别输出详细日志
|
||||
|
||||
@@ -137,3 +137,14 @@ polling_auto_trigger:
|
||||
worker:
|
||||
role: "all"
|
||||
instance_name: ""
|
||||
|
||||
# 审批新旧入口切换配置
|
||||
approval:
|
||||
legacy_refund_manual_enabled: true
|
||||
legacy_offline_recharge_pay_enabled: true
|
||||
|
||||
# 企业微信 Adapter 配置
|
||||
wecom:
|
||||
base_url: "https://qyapi.weixin.qq.com"
|
||||
timeout: "10s"
|
||||
credential_encryption_key: "" # 启用企微前必填:JUNHONG_WECOM_CREDENTIAL_ENCRYPTION_KEY(32 字节 Base64)
|
||||
|
||||
@@ -130,6 +130,11 @@ func bindEnvVariables(v *viper.Viper) {
|
||||
"polling_auto_trigger.auto_trigger_system_user_id",
|
||||
"worker.role",
|
||||
"worker.instance_name",
|
||||
"approval.legacy_refund_manual_enabled",
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user