正在显示
1 个修改的文件
包含
5 行增加
和
4 行删除
@@ -13,7 +13,7 @@ import ( | @@ -13,7 +13,7 @@ import ( | ||
13 | ) | 13 | ) |
14 | 14 | ||
15 | const ( | 15 | const ( |
16 | - ResponseOk int = 0 | 16 | + ResponseOk string = "0" |
17 | ) | 17 | ) |
18 | 18 | ||
19 | const ( | 19 | const ( |
@@ -75,12 +75,13 @@ func (client BusinessAdminClient) Call(param IBusinessAdminParam) ([]byte, error | @@ -75,12 +75,13 @@ func (client BusinessAdminClient) Call(param IBusinessAdminParam) ([]byte, error | ||
75 | } | 75 | } |
76 | 76 | ||
77 | type CommResponse struct { | 77 | type CommResponse struct { |
78 | - Code int `json:"code"` | ||
79 | - Msg string `json:"msg"` | 78 | + Code interface{} `json:"code"` //这个值可能是数字,也可能是字符串 |
79 | + Msg string `json:"msg"` | ||
80 | } | 80 | } |
81 | 81 | ||
82 | func (resp CommResponse) IsOK() bool { | 82 | func (resp CommResponse) IsOK() bool { |
83 | - if resp.Code != ResponseOk { | 83 | + code := fmt.Sprint(resp.Code) |
84 | + if code != ResponseOk { | ||
84 | return false | 85 | return false |
85 | } | 86 | } |
86 | return true | 87 | return true |
-
请 注册 或 登录 后发表评论