【发布时间】:2020-12-07 23:07:20
【问题描述】:
我创建了一个集合,其有效期存储在云 Firestore 中。我想获取所有将在未来 10 天内过期的产品。我想将此通知给用户。请帮忙。
Products(collection)---(docId)---(name)Product1--expireDate(Timestamp)--
--(docId)---- (name)Product2---expiryDate(Timestamp).
不确定是否正确
Firebase.firestore().collection("product").where('expiryDate' == new Date()+10)
提前致谢。
【问题讨论】:
-
请编辑问题以显示您编写的任何未按预期方式工作的代码。如果您显示实际数据而不仅仅是文档层次结构也会很有帮助。
标签: typescript firebase ionic-framework google-cloud-firestore