-
Notifications
You must be signed in to change notification settings - Fork 9
/
ProductImgRegionDto.go
37 lines (32 loc) · 1.14 KB
/
ProductImgRegionDto.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 aecreatives
import (
"sync"
)
// ProductImgRegionDto 结构体
type ProductImgRegionDto struct {
// 图片识别的坐标 pos_top_left_x
PosTopLeftX string `json:"pos_top_left_x,omitempty" xml:"pos_top_left_x,omitempty"`
// 图片识别的坐标 pos_top_left_y
PosTopLeftY string `json:"pos_top_left_y,omitempty" xml:"pos_top_left_y,omitempty"`
// 图片识别的坐标 pos_bottom_right_x
PosBottomRightX string `json:"pos_bottom_right_x,omitempty" xml:"pos_bottom_right_x,omitempty"`
// 图片识别的坐标 pos_bottom_right_y
PosBottomRightY string `json:"pos_bottom_right_y,omitempty" xml:"pos_bottom_right_y,omitempty"`
}
var poolProductImgRegionDto = sync.Pool{
New: func() any {
return new(ProductImgRegionDto)
},
}
// GetProductImgRegionDto() 从对象池中获取ProductImgRegionDto
func GetProductImgRegionDto() *ProductImgRegionDto {
return poolProductImgRegionDto.Get().(*ProductImgRegionDto)
}
// ReleaseProductImgRegionDto 释放ProductImgRegionDto
func ReleaseProductImgRegionDto(v *ProductImgRegionDto) {
v.PosTopLeftX = ""
v.PosTopLeftY = ""
v.PosBottomRightX = ""
v.PosBottomRightY = ""
poolProductImgRegionDto.Put(v)
}