这是因为JavaScript编号始终是64位浮点.您可以使用Mongo驱动程序的Long(https://mongodb.github.io/node-mongodb-native/api-bson-generated/long.html)来解决此问题.
var Long = require('mongodb').Long; var current_millies = new Date().getTime(); var data = { myId : uniqueId, timestamp : Long.fromNumber(current_millies), userData : applicationData }