服务端http查询db, 使用orderBy报错
通过接口查询数据:
POST https://api.weixin.qq.com/tcb/databasequery?access_token=ACCESS_TOKEN
请求:
Array ( [query] => db.collection( 'user' ).where({coin: db.command.gt(150)}).field({_id: true,coin: true,point: true,nickName: true,}).orderBy( 'coin' , 'desc' ).orderBy( 'point' , 'asc' ).skip(0).limit(10).get() ) |
返回:
Array ( [errcode] => 0 [errmsg] => Query sort entered in the request is illegal. Please check your request, but if the problem persists, contact us. hint: [ kFMC401202028]) |
移除orderBy之后可以正常返回查询数据,orderBy的字段也在集合中