|
@@ -0,0 +1,80 @@
|
|
1
|
+package bwfapiao
|
|
2
|
+
|
|
3
|
+// 定义响应结构体
|
|
4
|
+type UnifiedLoginResponse struct {
|
|
5
|
+ Success bool `json:"success"` // 接口调用成功或失败的标志
|
|
6
|
+ Method string `json:"method"` // 接口的唯一标识
|
|
7
|
+ RequestId string `json:"requestId"` // 请求唯一标识
|
|
8
|
+ Response *LoginResponseData `json:"response,omitempty"` // 业务响应信息
|
|
9
|
+ ErrorResponse *ErrorResponse `json:"errorResponse,omitempty"` // 错误响应信息
|
|
10
|
+}
|
|
11
|
+
|
|
12
|
+type LoginResponseData struct {
|
|
13
|
+ DigitAccount string `json:"digitAccount"` // 数电账号
|
|
14
|
+ LoginType string `json:"loginType"` // 登录方式
|
|
15
|
+ BatchNo string `json:"batchNo"` // 批次号 (操作类型为2时返回)
|
|
16
|
+ Status string `json:"status"` // 状态: 1-成功, 2-进行中, 3-失败
|
|
17
|
+ StatusMessage string `json:"statusMessage"` // 状态描述
|
|
18
|
+ QRCode string `json:"qrCode"` // 二维码 (操作类型为2,状态为1时返回)
|
|
19
|
+ QRCodeId string `json:"qrCodeId"` // 二维码字符串
|
|
20
|
+ EndTime string `json:"endTime"` // 二维码/短信有效期截止时间
|
|
21
|
+}
|
|
22
|
+
|
|
23
|
+type ErrorResponse struct {
|
|
24
|
+ Code int `json:"code"` // 错误码 (开放平台错误码)
|
|
25
|
+ Message string `json:"message"` // 错误信息 (开放平台错误信息)
|
|
26
|
+ SubCode string `json:"subCode"` // 业务端返回错误码
|
|
27
|
+ SubMessage string `json:"subMessage"` // 业务端返回错误信息
|
|
28
|
+}
|
|
29
|
+
|
|
30
|
+type SEinvoicebasicGetLoginResultResponse struct {
|
|
31
|
+ Success bool `json:"success"` // 接口调用是否成功
|
|
32
|
+ Method string `json:"method"` // 接口的唯一标识
|
|
33
|
+ RequestID string `json:"requestId"` // 请求唯一标识
|
|
34
|
+ Response LoginResponse `json:"response"` // 业务响应数据
|
|
35
|
+ ErrorResponse ErrorResponse `json:"errorResponse"` // 错误响应信息
|
|
36
|
+}
|
|
37
|
+
|
|
38
|
+// 登录状态的业务数据
|
|
39
|
+type LoginResponse struct {
|
|
40
|
+ DigitAccount string `json:"digitAccount"` // 数电账号(电子税局实名手机号)
|
|
41
|
+ LoginStatus string `json:"loginStatus"` // 登录状态 (0-未登录, 1-已登录, 2-登录中)
|
|
42
|
+ LoginType string `json:"loginType"` // 登录方式 (0-账号密码, 1-短信验证码, 2-税务APP扫码, 3-个税APP扫码)
|
|
43
|
+}
|
|
44
|
+
|
|
45
|
+type GetCertifyQrcodeResponse struct {
|
|
46
|
+ Success bool `json:"success"`
|
|
47
|
+ Response GetCertifyQrcodeData `json:"response"`
|
|
48
|
+ ErrorResponse GetCertifyQrcodeError `json:"error_response"`
|
|
49
|
+}
|
|
50
|
+
|
|
51
|
+type GetCertifyQrcodeData struct {
|
|
52
|
+ QRCode string `json:"qrCode"` // 二维码链接
|
|
53
|
+ ExpireTime string `json:"expireTime"` // 有效期截止时间
|
|
54
|
+}
|
|
55
|
+
|
|
56
|
+type GetCertifyQrcodeError struct {
|
|
57
|
+ Code int `json:"code"`
|
|
58
|
+ Message string `json:"message"`
|
|
59
|
+}
|
|
60
|
+
|
|
61
|
+type GetQrcodeCertifyResultResponse struct {
|
|
62
|
+ Success bool `json:"success"`
|
|
63
|
+ Response QrcodeCertifyResultData `json:"response"`
|
|
64
|
+ ErrorResponse QrcodeCertifyResultError `json:"error_response"`
|
|
65
|
+}
|
|
66
|
+
|
|
67
|
+type QrcodeCertifyResultData struct {
|
|
68
|
+ TaxNo string `json:"taxNo"` // 税号
|
|
69
|
+ DigitAccount string `json:"digitAccount"` // 数电账号
|
|
70
|
+ AuthId string `json:"authId"` // 认证编号
|
|
71
|
+ CertificationStatus string `json:"certificationStatus"` // 认证状态
|
|
72
|
+ CertStatusMessage string `json:"certStatusMessage"` // 状态描述
|
|
73
|
+}
|
|
74
|
+
|
|
75
|
+type QrcodeCertifyResultError struct {
|
|
76
|
+ Code int `json:"code"` // 错误码
|
|
77
|
+ Message string `json:"message"` // 错误信息
|
|
78
|
+ SubCode string `json:"subCode"` // 子错误码
|
|
79
|
+ SubMessage string `json:"subMessage"` // 子错误信息
|
|
80
|
+}
|