文件存储-增加文件上传记录接口,增加定时同步租户文件存储容量信息接口
This commit is contained in:
18
dao/file_dao.go
Normal file
18
dao/file_dao.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"context"
|
||||
"gitee.com/red-future---jilin-g/common/mongo"
|
||||
"oss/consts"
|
||||
"oss/model/entity"
|
||||
)
|
||||
|
||||
var File = &file{}
|
||||
|
||||
type file struct{}
|
||||
|
||||
// Insert 插入
|
||||
func (d *file) Insert(ctx context.Context, entity *entity.File) (err error) {
|
||||
_, err = mongo.Insert(ctx, []interface{}{entity}, consts.FileCollection)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user