-
Notifications
You must be signed in to change notification settings - Fork 9
/
RechargeRuleOpenInfo.go
79 lines (74 loc) · 3.07 KB
/
RechargeRuleOpenInfo.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package alsc
import (
"sync"
)
// RechargeRuleOpenInfo 结构体
type RechargeRuleOpenInfo struct {
// 规则明细列表
ListRechargeRuleDetailInfoList []RechargeRuleDetailOpenInfo `json:"list_recharge_rule_detail_info_list,omitempty" xml:"list_recharge_rule_detail_info_list>recharge_rule_detail_open_info,omitempty"`
// 规则明细列表
ListRechargeRuleDetailInfos []RechargeRuleDetailOpenInfo `json:"list_recharge_rule_detail_infos,omitempty" xml:"list_recharge_rule_detail_infos>recharge_rule_detail_open_info,omitempty"`
// 卡类型
CardType string `json:"card_type,omitempty" xml:"card_type,omitempty"`
// 创建人
CreateBy string `json:"create_by,omitempty" xml:"create_by,omitempty"`
// 扣减顺序:0-比例、1-先实储后赠送、2-先增储后实储
DeductionOrder string `json:"deduction_order,omitempty" xml:"deduction_order,omitempty"`
// 满赠类型:0-按金额(默认),1-按百分比、
GiftType string `json:"gift_type,omitempty" xml:"gift_type,omitempty"`
// 创建时间
GmtCreate string `json:"gmt_create,omitempty" xml:"gmt_create,omitempty"`
// 修改时间
GmtModified string `json:"gmt_modified,omitempty" xml:"gmt_modified,omitempty"`
// 规则id
RuleId string `json:"rule_id,omitempty" xml:"rule_id,omitempty"`
// 规则名称
RuleName string `json:"rule_name,omitempty" xml:"rule_name,omitempty"`
// 门店id
ShopId string `json:"shop_id,omitempty" xml:"shop_id,omitempty"`
// 修改人
UpdateBy string `json:"update_by,omitempty" xml:"update_by,omitempty"`
// 外部门店ID
OutShopId string `json:"out_shop_id,omitempty" xml:"out_shop_id,omitempty"`
// 扩展信息
ExtInfo *Extinfo `json:"ext_info,omitempty" xml:"ext_info,omitempty"`
// 免密额度:-1表示不限额,单位为分,默认200_00L
PayNoPwdCredit int64 `json:"pay_no_pwd_credit,omitempty" xml:"pay_no_pwd_credit,omitempty"`
// 逻辑删除标志
Deleted bool `json:"deleted,omitempty" xml:"deleted,omitempty"`
// 满赠开关:false-关,true-开,默认关闭
FullGiftSwitch bool `json:"full_gift_switch,omitempty" xml:"full_gift_switch,omitempty"`
// 免密开关:0-关闭(默认),1-开启
PayNoPwdSwitch bool `json:"pay_no_pwd_switch,omitempty" xml:"pay_no_pwd_switch,omitempty"`
}
var poolRechargeRuleOpenInfo = sync.Pool{
New: func() any {
return new(RechargeRuleOpenInfo)
},
}
// GetRechargeRuleOpenInfo() 从对象池中获取RechargeRuleOpenInfo
func GetRechargeRuleOpenInfo() *RechargeRuleOpenInfo {
return poolRechargeRuleOpenInfo.Get().(*RechargeRuleOpenInfo)
}
// ReleaseRechargeRuleOpenInfo 释放RechargeRuleOpenInfo
func ReleaseRechargeRuleOpenInfo(v *RechargeRuleOpenInfo) {
v.ListRechargeRuleDetailInfoList = v.ListRechargeRuleDetailInfoList[:0]
v.ListRechargeRuleDetailInfos = v.ListRechargeRuleDetailInfos[:0]
v.CardType = ""
v.CreateBy = ""
v.DeductionOrder = ""
v.GiftType = ""
v.GmtCreate = ""
v.GmtModified = ""
v.RuleId = ""
v.RuleName = ""
v.ShopId = ""
v.UpdateBy = ""
v.OutShopId = ""
v.ExtInfo = nil
v.PayNoPwdCredit = 0
v.Deleted = false
v.FullGiftSwitch = false
v.PayNoPwdSwitch = false
poolRechargeRuleOpenInfo.Put(v)
}