就在刚刚,云开发语法是不是改了什么东西?
发布于 5 年前 作者 tangming 3686 次浏览 来自 问答

const countResult = await db.collection(dataBaseType)

.where({ status: status, shopId: myShopId, _openid: myOpenId })

.count()

在原来的云函数中,如果 shopId == null , 等价于下面的。相当于没有shopId这个查询条件,查询对象有没有shopId都可以。

const countResult = await db.collection(dataBaseType)

.where({ status: status,   _openid: myOpenId })

.count()

可以就在刚刚,你们变更了规则,如果shopId == null,查询的对象的shopId也必须为null。

这个语法变更,导致很多之前已经上线的小程序查询不到正确的数据。

1 回复

这里没有变更哦,是不是undefined和null都在使用呢

回到顶部