查找数据类型
db.getCollection(‘users’).find({lastLearnTime:{$type:1}}).count()
修改数据类型为int
db.getCollection(‘users’).find({lastLearnTime:{$type:1}}).forEach(function(obj) {
obj.lastLearnTime = new NumberInt(obj.lastLearnTime);
db.getCollection(‘users’).save(obj);
});