f
This commit is contained in:
@@ -155,13 +155,13 @@ func (t *TianYanChaService) CallAPI(ctx context.Context, apiCode string, params
|
|||||||
|
|
||||||
// 检查天眼查业务状态码
|
// 检查天眼查业务状态码
|
||||||
if tianYanChaResp.ErrorCode != 0 {
|
if tianYanChaResp.ErrorCode != 0 {
|
||||||
// 特殊处理:ErrorCode 300000 表示查询为空,返回成功但数据为空
|
// 特殊处理:ErrorCode 300000 表示查询为空,返回成功但数据为空数组
|
||||||
if tianYanChaResp.ErrorCode == 300000 {
|
if tianYanChaResp.ErrorCode == 300000 {
|
||||||
return &APIResponse{
|
return &APIResponse{
|
||||||
Success: true,
|
Success: true,
|
||||||
Code: 0,
|
Code: 0,
|
||||||
Message: "",
|
Message: "",
|
||||||
Data: nil,
|
Data: []interface{}{}, // 返回空数组而不是nil
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user