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,
|
||||
MinTakeNum: 3,
|
||||
ListData: listDataRsp,
|
||||
Pagnation: types.Pagnation{
|
||||
TotalCount: total,
|
||||
TotalPage: int64(math.Ceil(float64(total) / float64(req.PageSize))),
|
||||
CurPage: req.Page,
|
||||
PageSize: req.PageSize,
|
||||
Meta: types.Meta{
|
||||
TotalCount: total,
|
||||
PageCount: int64(math.Ceil(float64(total) / float64(req.PageSize))),
|
||||
CurrentPage: req.Page,
|
||||
PerPage: req.PageSize,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ type GetCloudListRsp struct {
|
|||
TransitBoxes int64 `json:"transit_boxes"`
|
||||
MinTakeNum int64 `json:"minTakeNum"`
|
||||
ListData []ListDataItem `json:"listData"`
|
||||
Pagnation Pagnation `json:"pagnation"`
|
||||
Meta Meta `json:"_meta"`
|
||||
}
|
||||
|
||||
type ListDataItem struct {
|
||||
|
@ -85,11 +85,11 @@ type Auth struct {
|
|||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type Pagnation struct {
|
||||
TotalCount int64 `json:"total_count"`
|
||||
TotalPage int64 `json:"total_page"`
|
||||
CurPage int `json:"cur_page"`
|
||||
PageSize int `json:"page_size"`
|
||||
type Meta struct {
|
||||
TotalCount int64 `json:"totalCount"`
|
||||
PageCount int64 `json:"pageCount"`
|
||||
CurrentPage int `json:"currentPage"`
|
||||
PerPage int `json:"perPage"`
|
||||
}
|
||||
|
||||
// Set 设置Response的Code和Message值
|
||||
|
|
|
@ -26,10 +26,9 @@ type Auth {
|
|||
}
|
||||
|
||||
// 统一分页
|
||||
type Pagnation{
|
||||
TotalCount int64 `json:"total_count"`
|
||||
TotalPage int64 `json:"total_page"`
|
||||
CurPage int `json:"cur_page"`
|
||||
PageSize int `json:"page_size"`
|
||||
}
|
||||
|
||||
type Meta struct {
|
||||
TotalCount int64 `json:"totalCount"`
|
||||
PageCount int64 `json:"pageCount"`
|
||||
CurrentPage int `json:"currentPage"`
|
||||
PerPage int `json:"perPage"`
|
||||
}
|
|
@ -43,7 +43,7 @@ type GetCloudListRsp {
|
|||
TransitBoxes int64 `json:"transit_boxes"`
|
||||
MinTakeNum int64 `json:"minTakeNum"`
|
||||
ListData []ListDataItem `json:"listData"`
|
||||
Pagnation Pagnation `json:"pagnation"`
|
||||
Meta Meta `json:"_meta"`
|
||||
}
|
||||
type ListDataItem {
|
||||
Id int64 `json:"id"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user