回收站文档列表
(p, listRows int)
| 106 | |
| 107 | //回收站文档列表 |
| 108 | func (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(¶ms) |
| 125 | } |
| 126 | return |
| 127 | } |
| 128 | |
| 129 | //将文档移入回收站(软删除) |
| 130 | //@param uid 操作人,即将文档移入回收站的人 |
no test coverage detected