mark下
自增id并获取
# ids: {"type":"wei_id", "id":0}
db.ids.findAndModify({"update":{"$inc":{"id":1}}, "query":{"type":"wei_id"}, "new":"true"})
mark下
自增id并获取
# ids: {"type":"wei_id", "id":0}
db.ids.findAndModify({"update":{"$inc":{"id":1}}, "query":{"type":"wei_id"}, "new":"true"})
转载于:https://my.oschina.net/1123581321/blog/295883