func UpdateByQField(collection *mgo.Collection, q interface{}, field string, value interface{}) bool { _, err := collection.UpdateAll(q, bson.M{"$set": bson.M{field: value}}) return Err(err) }
// 查询条件和值 func UpdateByQMap(collection *mgo.Collection, q interface{}, v interface{}) bool { _, err := collection.UpdateAll(q, bson.M{"$set": v}) return Err(err) }
func UpdateAll(collection *mgo.Collection, query interface{}, i interface{}) bool { _, err := collection.UpdateAll(query, i) return Err(err) }