fix yuanshanService

This commit is contained in:
liangzai 2025-03-20 13:39:31 +08:00
parent 115a67f537
commit c6517ff90b
2 changed files with 4 additions and 3 deletions

2
.gitignore vendored
View File

@ -17,4 +17,4 @@ data/*
.vscode
.vscode/
/tmp/

View File

@ -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() {