小程序问开发中,Aggregate.geoNear 查询条件中Date不能使用?
const currentDay = new Date(new Date().setHours(0, 0, 0, 0));
.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) 这一查询不能使用,不加这个条件可以正常查询出内容,添加之后当天内容不能查询出来。
