wangpengfei
2023-07-26 af995cb29d795b453266a880501a8e94e24c591f
fix
add pageInfo, keyword to serverContract return list
2个文件已修改
24 ■■■■■ 已修改文件
model/response/response.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serverContract.go 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/response/response.go
@@ -343,4 +343,4 @@
    CurrencyResponse struct {
        List []*model.Currency `json:"list"`
    }
)
)
model/serverContract.go
@@ -30,7 +30,12 @@
    ServiceContractSearch struct {
        ServiceContract
        Orm *gorm.DB
        Orm      *gorm.DB
        Keyword  string
        OrderBy  string
        PageNum  int
        PageSize int
    }
)
@@ -86,3 +91,18 @@
    slf.Id = id
    return slf
}
func (slf *ServiceContractSearch) SetKeyword(keyword string) *ServiceContractSearch {
    slf.Keyword = keyword
    return slf
}
func (slf *ServiceContractSearch) SetPage(page, size int) *ServiceContractSearch {
    slf.PageNum, slf.PageSize = page, size
    return slf
}
func (slf *ServiceContractSearch) SetOrder(order string) *ServiceContractSearch {
    slf.OrderBy = order
    return slf
}