MCPcopy Index your code
hub / github.com/TruthHun/DocHub / Lists

Method Lists

models/ReportModel.go:32–48  ·  view source on GitHub ↗

获取未删除的举报数据列表

(p, listRows int)

Source from the content-addressed store, hash-verified

30
31//获取未删除的举报数据列表
32func (this *Report) Lists(p, listRows int) (params []orm.Params, rows int64, err error) {
33 var sql string
34 tables := []string{GetTableReport() + " r", GetTableUser() + " u", GetTableDocument() + " d"}
35 on := []map[string]string{
36 {"r.Did": "d.Id"},
37 {"r.Uid": "u.Id"},
38 }
39 fields := map[string][]string{
40 "r": {"*"},
41 "d": {"Title"},
42 "u": {"Username"},
43 }
44 if sql, err = LeftJoinSqlBuild(tables, on, fields, p, listRows, []string{"r.Status asc", "r.Id desc"}, nil, "r.Status>-1"); err == nil {
45 rows, err = orm.NewOrm().Raw(sql).Values(&params)
46 }
47 return
48}

Callers 1

GetMethod · 0.80

Calls 4

GetTableReportFunction · 0.85
GetTableUserFunction · 0.85
GetTableDocumentFunction · 0.85
LeftJoinSqlBuildFunction · 0.85

Tested by

no test coverage detected