public void batchUpdate(List<String> phoneList,String userId) {
Map<String, List<String>> map = new HashMap<String, List<String>>();
map.put("$in", phoneList);
DBObject queryValue = new BasicDBObject();
queryValue.put("phone", map);
queryValue.put("userId", userId);
DBObject updatedValue=new BasicDBObject();
updatedValue.put("sign", "true");
DBObject updateSetValue=new BasicDBObject("$set",updatedValue);
this.defaultMongoExt().getDbCollection().update(
queryValue, updateSetValue, false, true);
Map<String, List<String>> map = new HashMap<String, List<String>>();
map.put("$in", phoneList);
DBObject queryValue = new BasicDBObject();
queryValue.put("phone", map);
queryValue.put("userId", userId);
DBObject updatedValue=new BasicDBObject();
updatedValue.put("sign", "true");
DBObject updateSetValue=new BasicDBObject("$set",updatedValue);
this.defaultMongoExt().getDbCollection().update(
queryValue, updateSetValue, false, true);
}
public void batchDeleteByIds(List<String> ids) {
Map<String, List<String>> map = new HashMap<String, List<String>>();
map.put("$in", ids);
DBObject dbObject = new BasicDBObject();
dbObject.put("id", map);
defaultMongoExt().getDbCollection().remove(dbObject);
}