-
Notifications
You must be signed in to change notification settings - Fork 9
/
AbnormalContentDto.go
37 lines (32 loc) · 1.05 KB
/
AbnormalContentDto.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
package wdk
import (
"sync"
)
// AbnormalContentDto 结构体
type AbnormalContentDto struct {
// 操作描述
OperateDesc string `json:"operate_desc,omitempty" xml:"operate_desc,omitempty"`
// 处理结果
OperateResult string `json:"operate_result,omitempty" xml:"operate_result,omitempty"`
// 处理数量
AbnormalProcessQuantity string `json:"abnormal_process_quantity,omitempty" xml:"abnormal_process_quantity,omitempty"`
// 上报数量
AbnormalQuantity string `json:"abnormal_quantity,omitempty" xml:"abnormal_quantity,omitempty"`
}
var poolAbnormalContentDto = sync.Pool{
New: func() any {
return new(AbnormalContentDto)
},
}
// GetAbnormalContentDto() 从对象池中获取AbnormalContentDto
func GetAbnormalContentDto() *AbnormalContentDto {
return poolAbnormalContentDto.Get().(*AbnormalContentDto)
}
// ReleaseAbnormalContentDto 释放AbnormalContentDto
func ReleaseAbnormalContentDto(v *AbnormalContentDto) {
v.OperateDesc = ""
v.OperateResult = ""
v.AbnormalProcessQuantity = ""
v.AbnormalQuantity = ""
poolAbnormalContentDto.Put(v)
}