小程序问开发中,Aggregate.geoNear 查询条件中Date不能使用?
[代码][代码] const currentDay = new Date(new Date().setHours(0, 0, 0, 0)); [代码]const { list = [] } = await employmentsCollection.aggregate()[代码] [代码] [代码][代码].geoNear({[代码][代码] [代码][代码]distanceField: [代码][代码]'distance'[代码][代码],[代码][代码] [代码][代码]spherical: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]near: db.Geo.Point(location.longitude, location.latitude),[代码][代码] [代码][代码]minDistance: 0,[代码][代码] [代码][代码]maxDistance: 10000,[代码][代码] [代码][代码]key: [代码][代码]'location'[代码][代码],[代码][代码] [代码][代码]includeLocs: [代码][代码]'location'[代码][代码],[代码][代码] [代码][代码]query: {[代码][代码] [代码][代码]createAt: _.gte(currentDay),[代码][代码] [代码][代码]completeAt: _.eq([代码][代码]null[代码][代码]),[代码][代码] [代码][代码]deleteAt: _.eq([代码][代码]null[代码][代码]),[代码][代码] [代码][代码]},[代码][代码] [代码][代码]}).end();[代码]createAt: _.gte(currentDay) 这一查询不能使用,不加这个条件可以正常查询出内容,添加之后当天内容不能查询出来。