mongo.go重构
This commit is contained in:
@@ -2,21 +2,15 @@ package dao
|
||||
|
||||
import (
|
||||
"context"
|
||||
"gitee.com/red-future---jilin-g/common/mongo"
|
||||
"oss/consts"
|
||||
"oss/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/mongo"
|
||||
)
|
||||
|
||||
var File = &file{
|
||||
NoCache: false,
|
||||
}
|
||||
var File = &file{}
|
||||
|
||||
type file struct {
|
||||
NoCache bool
|
||||
}
|
||||
|
||||
func (d *file) SetNoCache() {
|
||||
File.NoCache = true
|
||||
}
|
||||
|
||||
// Insert 插入
|
||||
|
||||
@@ -10,16 +10,9 @@ import (
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
)
|
||||
|
||||
var TenantOssTotal = &tenantOssTotal{
|
||||
NoCache: false,
|
||||
}
|
||||
var TenantOssTotal = &tenantOssTotal{}
|
||||
|
||||
type tenantOssTotal struct {
|
||||
NoCache bool
|
||||
}
|
||||
|
||||
func (d *tenantOssTotal) SetNoCache() {
|
||||
TenantOssTotal.NoCache = true
|
||||
}
|
||||
|
||||
// Insert 插入
|
||||
|
||||
Reference in New Issue
Block a user