mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 19:46:57 +08:00
office
This commit is contained in:
parent
99f6752590
commit
1923d0b809
@ -3,8 +3,6 @@ package db
|
|||||||
import (
|
import (
|
||||||
"Open_IM/pkg/common/config"
|
"Open_IM/pkg/common/config"
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
|
||||||
|
|
||||||
//"Open_IM/pkg/common/log"
|
//"Open_IM/pkg/common/log"
|
||||||
"Open_IM/pkg/utils"
|
"Open_IM/pkg/utils"
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -74,15 +72,7 @@ func init() {
|
|||||||
|
|
||||||
cSendLogModels := []mongo.IndexModel{
|
cSendLogModels := []mongo.IndexModel{
|
||||||
{
|
{
|
||||||
Keys: bsonx.Doc{
|
Keys: bson.M{"send_id": -1, "send_time": -1},
|
||||||
{
|
|
||||||
Key: "send_id",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Key: "send_time",
|
|
||||||
Value: bsonx.Int32(-1),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
result, err := dataBase.Collection(cSendLog).Indexes().CreateMany(context.Background(), cSendLogModels, opts)
|
result, err := dataBase.Collection(cSendLog).Indexes().CreateMany(context.Background(), cSendLogModels, opts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user