-
Notifications
You must be signed in to change notification settings - Fork 9
/
ThirdPartyClientDataParams.go
52 lines (47 loc) · 1.79 KB
/
ThirdPartyClientDataParams.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 user
import (
"sync"
)
// ThirdPartyClientDataParams 结构体
type ThirdPartyClientDataParams struct {
// 扩展字段,这里可支持扩展,但是需要报备
Ext string `json:"ext,omitempty" xml:"ext,omitempty"`
// 数据生成时间
GenerationTime string `json:"generation_time,omitempty" xml:"generation_time,omitempty"`
// 电话
Phone string `json:"phone,omitempty" xml:"phone,omitempty"`
// 录入信息
RecordContents string `json:"record_contents,omitempty" xml:"record_contents,omitempty"`
// 外部数据记录唯一id
RecordId string `json:"record_id,omitempty" xml:"record_id,omitempty"`
// 录入人
Recorder string `json:"recorder,omitempty" xml:"recorder,omitempty"`
// 服务代码
ServiceCode string `json:"service_code,omitempty" xml:"service_code,omitempty"`
// 服务类型:电话 PHONE, 预约上门APPOINTMENT_TO_DOOR, 未预约上门 NO_APPOINTMENT_TO_DOOR, 培训服务 TRAIN, 在线拜访 VISIT_ONLINE, 其他 OTHER;
ServiceType string `json:"service_type,omitempty" xml:"service_type,omitempty"`
// 客户数据
Client *Client `json:"client,omitempty" xml:"client,omitempty"`
}
var poolThirdPartyClientDataParams = sync.Pool{
New: func() any {
return new(ThirdPartyClientDataParams)
},
}
// GetThirdPartyClientDataParams() 从对象池中获取ThirdPartyClientDataParams
func GetThirdPartyClientDataParams() *ThirdPartyClientDataParams {
return poolThirdPartyClientDataParams.Get().(*ThirdPartyClientDataParams)
}
// ReleaseThirdPartyClientDataParams 释放ThirdPartyClientDataParams
func ReleaseThirdPartyClientDataParams(v *ThirdPartyClientDataParams) {
v.Ext = ""
v.GenerationTime = ""
v.Phone = ""
v.RecordContents = ""
v.RecordId = ""
v.Recorder = ""
v.ServiceCode = ""
v.ServiceType = ""
v.Client = nil
poolThirdPartyClientDataParams.Put(v)
}