fix
This commit is contained in:
parent
c422f493f4
commit
02c41a5069
|
@ -256,11 +256,11 @@ func (l *GetCloudListLogic) GetCloudList(req *types.GetCloudListReq, userinfo *a
|
||||||
TransitBoxes: transitBoxes,
|
TransitBoxes: transitBoxes,
|
||||||
MinTakeNum: 3,
|
MinTakeNum: 3,
|
||||||
ListData: listDataRsp,
|
ListData: listDataRsp,
|
||||||
Pagnation: types.Pagnation{
|
Meta: types.Meta{
|
||||||
TotalCount: total,
|
TotalCount: total,
|
||||||
TotalPage: int64(math.Ceil(float64(total) / float64(req.PageSize))),
|
PageCount: int64(math.Ceil(float64(total) / float64(req.PageSize))),
|
||||||
CurPage: req.Page,
|
CurrentPage: req.Page,
|
||||||
PageSize: req.PageSize,
|
PerPage: req.PageSize,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ type GetCloudListRsp struct {
|
||||||
TransitBoxes int64 `json:"transit_boxes"`
|
TransitBoxes int64 `json:"transit_boxes"`
|
||||||
MinTakeNum int64 `json:"minTakeNum"`
|
MinTakeNum int64 `json:"minTakeNum"`
|
||||||
ListData []ListDataItem `json:"listData"`
|
ListData []ListDataItem `json:"listData"`
|
||||||
Pagnation Pagnation `json:"pagnation"`
|
Meta Meta `json:"_meta"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListDataItem struct {
|
type ListDataItem struct {
|
||||||
|
@ -85,11 +85,11 @@ type Auth struct {
|
||||||
RefreshAfter int64 `json:"refreshAfter"`
|
RefreshAfter int64 `json:"refreshAfter"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Pagnation struct {
|
type Meta struct {
|
||||||
TotalCount int64 `json:"total_count"`
|
TotalCount int64 `json:"totalCount"`
|
||||||
TotalPage int64 `json:"total_page"`
|
PageCount int64 `json:"pageCount"`
|
||||||
CurPage int `json:"cur_page"`
|
CurrentPage int `json:"currentPage"`
|
||||||
PageSize int `json:"page_size"`
|
PerPage int `json:"perPage"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set 设置Response的Code和Message值
|
// Set 设置Response的Code和Message值
|
||||||
|
|
|
@ -26,10 +26,9 @@ type Auth {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 统一分页
|
// 统一分页
|
||||||
type Pagnation{
|
type Meta struct {
|
||||||
TotalCount int64 `json:"total_count"`
|
TotalCount int64 `json:"totalCount"`
|
||||||
TotalPage int64 `json:"total_page"`
|
PageCount int64 `json:"pageCount"`
|
||||||
CurPage int `json:"cur_page"`
|
CurrentPage int `json:"currentPage"`
|
||||||
PageSize int `json:"page_size"`
|
PerPage int `json:"perPage"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ type GetCloudListRsp {
|
||||||
TransitBoxes int64 `json:"transit_boxes"`
|
TransitBoxes int64 `json:"transit_boxes"`
|
||||||
MinTakeNum int64 `json:"minTakeNum"`
|
MinTakeNum int64 `json:"minTakeNum"`
|
||||||
ListData []ListDataItem `json:"listData"`
|
ListData []ListDataItem `json:"listData"`
|
||||||
Pagnation Pagnation `json:"pagnation"`
|
Meta Meta `json:"_meta"`
|
||||||
}
|
}
|
||||||
type ListDataItem {
|
type ListDataItem {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user