This commit is contained in:
Mrx
2026-03-19 11:07:52 +08:00
parent baa45a8a05
commit faf4b7f6a7
6 changed files with 32 additions and 4 deletions

View File

@@ -34,6 +34,7 @@ type DailyRateLimitConfig struct {
BlockedCountries []string `mapstructure:"blocked_countries"` // 被阻止的国家/地区
EnableProxyCheck bool `mapstructure:"enable_proxy_check"` // 是否检查代理
MaxConcurrent int `mapstructure:"max_concurrent"` // 最大并发请求数
// 路径排除配置
ExcludePaths []string `mapstructure:"exclude_paths"` // 排除频率限制的路径
// 域名排除配置

View File

@@ -637,8 +637,8 @@ func validateEnterpriseName(fl validator.FieldLevel) bool {
hasValidSuffix = true
break
}
// 同时检查括号内的企业类型,如:(个体工商户)、(分公司)
if strings.HasSuffix(trimmedName, ""+suffix+"") {
// 同时检查括号内的企业类型,支持中英文括号,如:(个体工商户)、(个体工商户)、(分公司)、(分公司)
if strings.HasSuffix(trimmedName, ""+suffix+"") || strings.HasSuffix(trimmedName, "("+suffix+")") {
hasValidSuffix = true
break
}
@@ -921,8 +921,8 @@ func ValidateEnterpriseName(enterpriseName string) error {
hasValidSuffix = true
break
}
// 同时检查括号内的企业类型,如:(个体工商户)、(分公司)
if strings.HasSuffix(trimmedName, ""+suffix+"") {
// 同时检查括号内的企业类型,支持中英文括号,如:(个体工商户)、(个体工商户)、(分公司)、(分公司)
if strings.HasSuffix(trimmedName, ""+suffix+"") || strings.HasSuffix(trimmedName, "("+suffix+")") {
hasValidSuffix = true
break
}