This commit is contained in:
2026-01-07 13:05:27 +08:00
5 changed files with 10 additions and 10 deletions

View File

@@ -158,16 +158,16 @@ ocr:
secret_key: "your-baidu-secret-key" secret_key: "your-baidu-secret-key"
ratelimit: ratelimit:
requests: 5000 requests: 7500
window: 60s window: 70s
# 每日请求限制配置 # 每日请求限制配置
daily_ratelimit: daily_ratelimit:
max_requests_per_day: 200 # 每日最大请求次数 max_requests_per_day: 300 # 每日最大请求次数
max_requests_per_ip: 10 # 每个IP每日最大请求次数 max_requests_per_ip: 15 # 每个IP每日最大请求次数
key_prefix: "daily_limit" # Redis键前缀 key_prefix: "daily_limit" # Redis键前缀
ttl: 24h # 键过期时间 ttl: 24h # 键过期时间
max_concurrent: 5 # 最大并发请求数 max_concurrent: 8 # 最大并发请求数
# 安全配置 # 安全配置
enable_ip_whitelist: false # 是否启用IP白名单 enable_ip_whitelist: false # 是否启用IP白名单

View File

@@ -343,9 +343,9 @@ type QCXGGJ3AReq struct {
type QCXGP00WReq struct { type QCXGP00WReq struct {
VinCode string `json:"vin_code" validate:"required"` VinCode string `json:"vin_code" validate:"required"`
PlateNo string `json:"plate_no" validate:"required"` PlateNo string `json:"plate_no" validate:"omitempty"`
ReturnURL string `json:"return_url" validate:"required,validReturnURL"` ReturnURL string `json:"return_url" validate:"required,validReturnURL"`
VlPhotoData string `json:"vlphoto_data" validate:"required,validBase64Image"` VlPhotoData string `json:"vlphoto_data" validate:"omitempty,validBase64Image"`
} }
type QCXG4D2EReq struct { type QCXG4D2EReq struct {

View File

@@ -29,7 +29,7 @@ func ProcessIVYZ1J7HRequest(ctx context.Context, params []byte, deps *processors
} }
// 调用极光API // 调用极光API
respBytes, err := deps.JiguangService.CallAPI(ctx, "labor-arbitration-information", "labor-arbitration-information", reqData) respBytes, err := deps.JiguangService.CallAPI(ctx, "vehicle-driving-license-v2", "vehicle/driving-license-v2", reqData)
if err != nil { if err != nil {
// 根据错误类型返回相应的错误 // 根据错误类型返回相应的错误
if errors.Is(err, jiguang.ErrNotFound) { if errors.Is(err, jiguang.ErrNotFound) {

View File

@@ -23,7 +23,7 @@ func ProcessQCXG4I1ZRequest(ctx context.Context, params []byte, deps *processors
// 构建请求参数 // 构建请求参数
reqData := map[string]interface{}{ reqData := map[string]interface{}{
"vim": paramsDto.VinCode, "vin": paramsDto.VinCode,
} }
// 调用极光API // 调用极光API

View File

@@ -222,7 +222,7 @@ func (j *JiguangService) CallAPI(ctx context.Context, apiCode string, apiPath st
} }
// 检查业务状态码 // 检查业务状态码
if jiguangResp.Code != 0 { if jiguangResp.Code != 0 && jiguangResp.Code != 200 {
// 创建极光错误 // 创建极光错误
jiguangErr := NewJiguangErrorFromCode(jiguangResp.Code) jiguangErr := NewJiguangErrorFromCode(jiguangResp.Code)
if jiguangErr.Message == fmt.Sprintf("未知错误码: %d", jiguangResp.Code) && jiguangResp.Msg != "" { if jiguangErr.Message == fmt.Sprintf("未知错误码: %d", jiguangResp.Code) && jiguangResp.Msg != "" {