云开发 服务端 中的两个API: command.lt和command.gt有BUG。结果不符实际?
发布于 6 年前 作者 ayuan 7963 次浏览 来自 官方Issues

--------------------执行代码的日志-----------------    

日志IDRequest ID: c4116e4b-fc4c-11e9-b4f7-525400235f2a

----------------云函数的执行代码---------------

----------------被查询的数据----------

可简化数据为:__
__

[

    { id: 1, gameId: '1001', isPass: "true", numberTime: 2, time: 1 },

    { id: 2, gameId: '1001',isPass: "true" ,numberTime: 2, time: 1 },

    { id: 3, gameId: '1001', isPass: "true",numberTime: 2, time: 2 },

    { id: 4, gameId: '1001', isPass: "true",numberTime: 2, time: 4 },

    { id: 5, gameId: '1001', isPass: "true", numberTime: 2, time: 4 },

]

----------------看重点在这------------------------

const numberTime = await db.collection(event.table).where({

gameId: ‘1001’,

isPass: “true”,

numberTime: 2,

time: _.lt(2)

}).count();

应该返回为条数为2,但是查询的结果为:3.

回到顶部