pull/232/head
wangchuxiao 3 years ago
parent 131746f94e
commit 99f6752590

@ -206,7 +206,7 @@ func init() {
//if err != nil { //if err != nil {
// fmt.Println("mongodb create cTagModel2 failed", result, err.Error()) // fmt.Println("mongodb create cTagModel2 failed", result, err.Error())
//} //}
result, err = dataBase.Collection(cTag).Indexes().CreateOne(context.Background(), mongo.IndexModel{ _, err = dataBase.Collection(cTag).Indexes().CreateOne(context.Background(), mongo.IndexModel{
Keys: bson.D{ Keys: bson.D{
{Key: "user_id"}, {Key: "user_id"},
{Key: "create_time", Value: -1}, {Key: "create_time", Value: -1},

Loading…
Cancel
Save