Mongodb 使用arrayfilter
db.runCommand({ "update" : "ShortBatchOrder", "updates" : [{ "q" : { "_id" : "xxxxxxxx") }, "u" : { "$set":{"data.$[data].isDelete" : "1"} }, "upsert" : true, "arrayFilters" : [{ "data.orderCode" : { "$in" : ["xxxxxxx"] } }] }] })
db.getCollection('batchorder').update({"_id":"xxxxxxxxxxxx","data.ordernum":"111"},{"$set":{"data.$[data].hberror":"testssss"}},{ "arrayFilters": [{ "data.ordernum": "111" }], "multi": true })