小程提示删除不必要的await是什么原因?
但是程序是需要等待查询结果的,如果删了await后就查不到这个数据了。
其他函数里await是没问题的,不应该是async awiat问题
var sum1 = await db.collection('goods').aggregate().match({
checked: true,
deliver_sum0: _.gt(0)
})
.group({
_id: null,
totalPrice: $.sum('$price')
})
.end()