fix(realname): 增加身份证唯一性校验,防止同一证件重复实名

This commit is contained in:
yml2213
2026-10-29 12:06:53 +08:00
parent 86fbc05e9b
commit 2029c1f4fb
16 changed files with 538 additions and 53 deletions
+3
View File
@@ -56,6 +56,8 @@ type RealnameConfig struct {
Provider string
CloudMarketURL string
CloudMarketAppCode string
// IDHashKey 用于计算身份证号盲索引;留空时回退到 FIELD_ENCRYPTION_KEY。
IDHashKey string
}
type LogConfig struct {
@@ -129,6 +131,7 @@ func Load() Config {
Provider: getEnv("REALNAME_PROVIDER", "mock"),
CloudMarketURL: getEnv("REALNAME_CLOUDMARKET_URL", "https://eid.shumaidata.com/eid/check"),
CloudMarketAppCode: getEnv("REALNAME_CLOUDMARKET_APPCODE", ""),
IDHashKey: getEnv("REALNAME_ID_HASH_KEY", ""),
},
Log: LogConfig{
Level: getEnv("LOG_LEVEL", "info"),