refactor: 清理 YAML 支付配置遗留代码,重命名 Card* 常量为 Asset*,新增支付配置相关错误码

- 删除 PaymentConfig 结构体和 WechatConfig.Payment 字段(YAML 方案已废弃)
- 删除 wechat.payment 配置节和 NewPaymentApp() 函数
- 删除 validateWechatConfig 中所有 wechatCfg.Payment.* 校验代码
- pkg/constants/wallet.go: Card* 前缀统一重命名为 Asset*,旧名保留废弃别名
- pkg/constants/redis.go: 新增 RedisWechatConfigActiveKey()
- pkg/errors/codes.go: 新增错误码 1170-1175
- go.mod: 新增 golang.org/x/text 依赖(富友支付 GBK 编解码)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-03-16 23:28:29 +08:00
parent 7f18765911
commit b0da71bd25
9 changed files with 115 additions and 152 deletions

View File

@@ -313,3 +313,14 @@ func RedisDeviceRefreshCooldownKey(deviceID uint) string {
func RedisPollingQueueProtectKey() string {
return "polling:queue:protect"
}
// ========================================
// 微信配置相关 Redis Key
// ========================================
// RedisWechatConfigActiveKey 生效支付配置缓存键
// 用途缓存当前激活的微信参数配置JSON 或 "none" 空标记)
// 过期时间5 分钟(有配置)/ 1 分钟(空标记)
func RedisWechatConfigActiveKey() string {
return "wechat:config:active"
}