mongodb db.getCollection('user').findAndModify({update:{$inc:{'level':1}},query:{"name":"hello"}});
或者这样子:
db.ids .findAndModify({update:{$inc:{'id':1}}, query:{"name":"user"}, new:true});