Documentation ¶ Index ¶ Constants func TotalPage(totalCount int, pageSize int) int type Param type ParamJoin type ParamJoinItem type Response func Data(r *ghttp.Request, param *Param, pointStruct interface{}) (pageRe *Response, err error) Constants ¶ View Source const DefaultPageSize = 10 DefaultPageSize 默认分页大小 Variables ¶ This section is empty. Functions ¶ func TotalPage ¶ func TotalPage(totalCount int, pageSize int) int TotalPage 总页数 Types ¶ type Param ¶ type Param struct { Page int PageSize int TableName string Where string WhereParams g.Slice Join ParamJoin OrderBy string Field string } type ParamJoin ¶ type ParamJoin []*ParamJoinItem type ParamJoinItem ¶ type ParamJoinItem struct { JoinType string JoinTable string On string } type Response ¶ type Response struct { ListData interface{} `json:"list_data"` TotalCount int `json:"total_count"` Page int `json:"page"` PageSize int `json:"page_size"` TotalPage int `json:"total_page"` PageCount int `json:"page_count"` } func Data ¶ func Data(r *ghttp.Request, param *Param, pointStruct interface{}) (pageRe *Response, err error) Data 以model形式返回分页形式数据 Source Files ¶ View all Source files model.go page.go Click to show internal directories. Click to hide internal directories.