page

package
v0.0.0-...-7e3dfe9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToCase

func CamelToCase(name string) string

func CheckPageRows

func CheckPageRows(currentStr, rowCountStr string) (current, rowCount int)

CheckPageRows 获取页数和行数

Types

type Buffer

type Buffer struct {
	*bytes.Buffer
}

Buffer 内嵌bytes.Buffer,支持连写

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Append

func (b *Buffer) Append(i interface{}) *Buffer

type PageBean

type PageBean struct {

	/** 当前页  */
	Page int `json:"page"`

	/** 当前页的行数 */
	PageSize int `json:"pageSize"`

	/** 总记录数 */
	Total int64 `json:"total"`

	/** 每行的数据 */
	Rows interface{} `json:"rows"`
}

PageBean 全局分页对象

type PageInfo

type PageInfo struct {

	/** 当前页 */
	Current int

	/** 每页显示的最大行数 */
	RowCount int

	/** 表名 仅限于指定表名去查询 */
	TableName string

	/** 查询 and 条件参数 */
	AndParams map[string]interface{}

	/** 查询 or 条件参数 */
	OrParams map[string]interface{}

	/** 排序 */
	OrderStr string
}

func PageParam

func PageParam(c *gin.Context) *PageInfo

PageParam 获取url查询参数

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL