general

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataListByPageRes

type DataListByPageRes struct {
	Total       int         `json:"total"`       //总数
	CurrentPage int         `json:"currentPage"` //当前页码
	Data        interface{} `json:"data"`        //数据
}

DataListByPageRes 分页查询返回结果

func ListByPage

func ListByPage(ctx context.Context, dataModel *gdb.Model, req *SelectReq, vagueField []string) (res DataListByPageRes, err error)

ListByPage 列表查询

type SelectReq

type SelectReq struct {
	Param          map[string]interface{} `p:"param"`          //搜索哪些字段的数据
	KeyWords       string                 `p:"keyWords"`       //关键字搜索
	Year           string                 `p:"year"`           //提取哪一年的数据
	DateRange      []string               `p:"dateRange"`      //提取指定日期范围的数据
	Accurate       string                 `p:"accurate"`       //数据精确类型(m:月,d:天,h:小时)
	AccurateRanges string                 `p:"accurateRanges"` //当accurate精确类型为d的时候,可以指定月份,当accurate为h的时候,可以指定某日的值
	PageNum        int                    `p:"pageNum"`        //当前页码
	PageSize       int                    `p:"pageSize"`       //每页数
}

SelectReq 查询请求参数

Jump to

Keyboard shortcuts

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