MCPcopy Create free account
hub / github.com/TruthHun/DocHub / List

Method List

models/PagesModel.go:29–37  ·  view source on GitHub ↗

查询单页列表

(listRows int, status ...int)

Source from the content-addressed store, hash-verified

27
28//查询单页列表
29func (this *Pages) List(listRows int, status ...int) (pages []Pages, rows int64, err error) {
30 qs := orm.NewOrm().QueryTable(GetTablePages())
31 if len(status) > 0 {
32 qs = qs.Filter("Status", status[0])
33 }
34 cols := []string{"Name", "Alias", "Title", "Keywords", "Description", "Id", "TimeCreate", "Sort", "Vcnt", "Status"}
35 rows, err = qs.OrderBy("sort").Limit(listRows).All(&pages, cols...)
36 return
37}
38
39//查询单页内容
40func (this *Pages) One(alias string) (page Pages, err error) {

Callers

nothing calls this directly

Calls 2

GetTablePagesFunction · 0.85
AllMethod · 0.80

Tested by

no test coverage detected