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

Method RecycleList

models/RecycleModel.go:108–127  ·  view source on GitHub ↗

回收站文档列表

(p, listRows int)

Source from the content-addressed store, hash-verified

106
107//回收站文档列表
108func (this *DocumentRecycle) RecycleList(p, listRows int) (params []orm.Params, rows int64, err error) {
109 var sql string
110 tables := []string{GetTableDocumentRecycle() + " dr", GetTableDocument() + " d", GetTableDocumentInfo() + " di", GetTableUser() + " u", GetTableDocumentStore() + " ds"}
111 on := []map[string]string{
112 {"dr.Id": "d.Id"},
113 {"d.Id": "di.Id"},
114 {"u.Id": "di.Uid"},
115 {"di.DsId": "ds.Id"},
116 }
117 fields := map[string][]string{
118 "dr": {"Date", "Self"},
119 "d": {"Title", "Filename", "Id"},
120 "ds": {"Md5", "Ext", "ExtCate", "Page", "Size"},
121 "u": {"Username", "Id Uid"},
122 }
123 if sql, err = LeftJoinSqlBuild(tables, on, fields, p, listRows, []string{"dr.Date desc"}, nil, "dr.Id>0"); err == nil {
124 rows, err = orm.NewOrm().Raw(sql).Values(&params)
125 }
126 return
127}
128
129//将文档移入回收站(软删除)
130//@param uid 操作人,即将文档移入回收站的人

Callers 1

RecycleMethod · 0.80

Calls 6

GetTableDocumentRecycleFunction · 0.85
GetTableDocumentFunction · 0.85
GetTableDocumentInfoFunction · 0.85
GetTableUserFunction · 0.85
GetTableDocumentStoreFunction · 0.85
LeftJoinSqlBuildFunction · 0.85

Tested by

no test coverage detected