-
Notifications
You must be signed in to change notification settings - Fork 9
/
AuthApplyDo.go
52 lines (47 loc) · 1.5 KB
/
AuthApplyDo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package nazca
import (
"sync"
)
// AuthApplyDo 结构体
type AuthApplyDo struct {
// 企业名称
EnterpriseName string `json:"enterprise_name,omitempty" xml:"enterprise_name,omitempty"`
// 营业执照号
License string `json:"license,omitempty" xml:"license,omitempty"`
// 组织机构代码
Organization string `json:"organization,omitempty" xml:"organization,omitempty"`
// 客户在1688的唯一标识
PlatformUserId string `json:"platform_user_id,omitempty" xml:"platform_user_id,omitempty"`
// 页面跳转同步通知URL
ReturnUrl string `json:"return_url,omitempty" xml:"return_url,omitempty"`
// 认证状态
Status string `json:"status,omitempty" xml:"status,omitempty"`
// 统一社会信用代码
ThreeCertNumber string `json:"three_cert_number,omitempty" xml:"three_cert_number,omitempty"`
// 证件类型 1:旧版三证 2:新版三证合一
Type int64 `json:"type,omitempty" xml:"type,omitempty"`
// 是否认证
Autherized bool `json:"autherized,omitempty" xml:"autherized,omitempty"`
}
var poolAuthApplyDo = sync.Pool{
New: func() any {
return new(AuthApplyDo)
},
}
// GetAuthApplyDo() 从对象池中获取AuthApplyDo
func GetAuthApplyDo() *AuthApplyDo {
return poolAuthApplyDo.Get().(*AuthApplyDo)
}
// ReleaseAuthApplyDo 释放AuthApplyDo
func ReleaseAuthApplyDo(v *AuthApplyDo) {
v.EnterpriseName = ""
v.License = ""
v.Organization = ""
v.PlatformUserId = ""
v.ReturnUrl = ""
v.Status = ""
v.ThreeCertNumber = ""
v.Type = 0
v.Autherized = false
poolAuthApplyDo.Put(v)
}