From c6517ff90b7d5d9a649de954a29c7f5fc4e25d93 Mon Sep 17 00:00:00 2001 From: liangzai <2440983361@qq.com> Date: Thu, 20 Mar 2025 13:39:31 +0800 Subject: [PATCH] fix yuanshanService --- .gitignore | 2 +- app/user/cmd/api/internal/service/yushanService.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e935659..3f91ef1 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,4 @@ data/* .vscode .vscode/ - +/tmp/ diff --git a/app/user/cmd/api/internal/service/yushanService.go b/app/user/cmd/api/internal/service/yushanService.go index 912f7f7..fc4f23f 100644 --- a/app/user/cmd/api/internal/service/yushanService.go +++ b/app/user/cmd/api/internal/service/yushanService.go @@ -9,12 +9,13 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/tidwall/gjson" "io" "net/http" "qnc-server/app/user/cmd/api/internal/config" "strings" "time" + + "github.com/tidwall/gjson" ) type YushanService struct { @@ -98,7 +99,7 @@ func (y *YushanService) request(prodID string, params map[string]interface{}) ([ if retCode == "100000" { // retcode 为 100000,表示查询为空 return nil, fmt.Errorf("羽山请求查空: %s", string(respData)) - } else if retCode == "000000" { + } else if retCode == "000000" || retCode == "000001" || retCode == "000002" || retCode == "000003" { // retcode 为 000000,表示有数据,返回 retdata retData := gjson.GetBytes(respData, "retdata") if !retData.Exists() {