12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- package app
- type Response struct {
- ApiBaseOutputHead ApiBaseOutputHead `json:"apiBaseOutputHead"`
- // 数据集
- Data interface{} `json:"data"`
- }
- type ApiBaseOutputHead struct {
- Code string `json:"code" example:"200"`
- Msg string `json:"msg"`
- }
- type Page struct {
- List interface{} `json:"tourList"`
- Count int `json:"count"`
- PageIndex int `json:"pageIndex"`
- PageSize int `json:"pageSize"`
- //BrowseTotal int64 `json:"browseTotal"` //浏览总数
- //ToGoTotal int64 `json:"toGoTotal"` //意向单总数
- }
- type UserDynamicPage struct {
- List interface{} `json:"tourList"`
- Count int `json:"count"`
- PageIndex int `json:"pageIndex"`
- PageSize int `json:"pageSize"`
- BrowseTotal int64 `json:"browseTotal"` //浏览总数
- ToGoTotal int64 `json:"toGoTotal"` //意向单总数
- }
- type PageResponse struct {
- ApiBaseOutputHead ApiBaseOutputHead `json:"apiBaseOutputHead"`
- //Data interface{} `json:"data"`
- // 代码
- //Code int `json:"code" example:"200"`
- // 数据集
- Data Page `json:"tourData"`
- // 消息
- //Msg string `json:"msg"`
- }
- type UserDynamicPageResponse struct {
- ApiBaseOutputHead ApiBaseOutputHead `json:"apiBaseOutputHead"`
- //Data interface{} `json:"data"`
- // 代码
- //Code int `json:"code" example:"200"`
- // 数据集
- Data UserDynamicPage `json:"tourData"`
- // 消息
- //Msg string `json:"msg"`
- }
- func (res *Response) ReturnOK() *Response {
- res.ApiBaseOutputHead.Code = "200"
- return res
- }
- func (res *Response) ReturnError(code string) *Response {
- res.ApiBaseOutputHead.Code = code
- return res
- }
- func (res *PageResponse) ReturnOK() *PageResponse {
- res.ApiBaseOutputHead.Code = "200"
- return res
- }
- func (res *UserDynamicPageResponse) ReturnOK() *UserDynamicPageResponse {
- res.ApiBaseOutputHead.Code = "200"
- return res
- }
|