db.collection('record').aggregate()
.match({
uid: _.in([1024414, 1024415, 1024416, 1024417, 1024418])
})
.sort({
record_time: -1
})
.group({
_id: '$uid',
record_list: $.push({
uid:'$uid',
master_data:'$master_data',
record_time:'$record_time',
})
})
.project({
record_list:$.slice(['$record_list',6])
})
.end()