go mongo 根据时间删除
//timeStr 是参数 yyyy-mm-dd hh:ff:mm toDate, _ := time.Parse("2006-01-02 15:04:05", timeStr)
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
filter = bson.M{"ts": bson.M{"$lt": toDate}, "used": bson.M{"$ne": 1}}
deleteResult, _ := mongodb.Conn().Collection(tableName).DeleteMany(ctx, filter)