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

Method IsExistByMd5

models/DocumentModel.go:253–257  ·  view source on GitHub ↗

根据md5判断文档是否存在 @param md5str 文档的md5 @return Id 文档存储表的id

(md5str string)

Source from the content-addressed store, hash-verified

251//@param md5str 文档的md5
252//@return Id 文档存储表的id
253func (this *Document) IsExistByMd5(md5str string) (Id int) {
254 var ds DocumentStore
255 orm.NewOrm().QueryTable(GetTableDocumentStore()).Filter("Md5", md5str).One(&ds)
256 return ds.Id
257}
258
259//文档软删除,即把文档状态标记为-1,操作之后,需要把总文档数量、用户文档数量-1,同时把文档id移入回收站
260func (this *Document) SoftDel(uid int, isAdmin bool, ids ...interface{}) (err error) {

Callers 2

DocExistMethod · 0.80
DocumentProcessFunction · 0.80

Calls 2

GetTableDocumentStoreFunction · 0.85
OneMethod · 0.80

Tested by

no test coverage detected