fix yuanshanService
This commit is contained in:
parent
115a67f537
commit
c6517ff90b
2
.gitignore
vendored
2
.gitignore
vendored
@ -17,4 +17,4 @@ data/*
|
||||
.vscode
|
||||
.vscode/
|
||||
|
||||
|
||||
/tmp/
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user