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"`
-
-
- }
- 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 Page `json:"tourData"`
-
-
- }
- type UserDynamicPageResponse struct {
- ApiBaseOutputHead ApiBaseOutputHead `json:"apiBaseOutputHead"`
-
-
-
-
- Data UserDynamicPage `json:"tourData"`
-
-
- }
- 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
- }
|