The aggregate statement executed by mongo client can find out the data, but mongoose is an empty array. What is the situation?
const mongoose = require('mongoose') let ObjectIds = mongoose.Types.ObjectId {$match: {"extra.integralId": new ObjectIds(query._id)}}
You need to construct an ObjectId to query it