mongo.go重构

This commit is contained in:
2025-12-30 11:07:41 +08:00
parent 83d136f73e
commit afe5d80f65
4 changed files with 8 additions and 19 deletions

View File

@@ -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 插入

View File

@@ -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 插入