你好楼主,请问问题解决了吗
App跳转小程序has_no_permission?我的app已经在微信开发平台注册并通过审核,从我的APP跳转到小程序提示“has_no_permission”。
02-27{ "group": "a", "name": "stu1", "score": 84 } { "group": "a", "name": "stu2", "score": 96 } { "group": "b", "name": "stu3", "score": 80 } { "group": "b", "name": "stu4", "score": 100 } const $ = db.command.aggregate db .collection('students') .aggregate() .group({ _id: '$group', students: $.push({ name: '$name', score: '$score' }) }) .end() 输出结果如下: { "_id": "b", "students": [{ "name": "stu3", "score": 80 }, { "name": "stu4", "score": 100 }] } { "_id": "a", "students": [{ "name": "stu1", "score": 84 }, { "name": "stu2", "score": 96 }] } 参考文档:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-sdk-api/database/command/aggregate/AggregateCommand.push.html
云开发 数据库,如何合并数组中的2个重复结果?"goods": [ { "_id": "e2297d935ec3342c00d9125250f266421f", "num": 1 }, { "_id": "37e26adb5ec39b120102ae453b7ad2921", "num": 1 }, { "_id": "37e26adb5ec39b120102ae453b7ad2921", "gName": "可口可乐 300ml 12瓶装", "price": 0.01, "originalPrice": "80", "description": "炎炎下入,快乐肥宅水等你来喝", "classifyId": "aa9f906d5ec1f1b900fc5bdb2d680388", "photos": [ "cloud://minorder-3f3365.6d69-minorder-3f3365-1257961996/photo/1589872751534953931.png", "cloud://minorder-3f3365.6d69-minorder-3f3365-1257961996/photo/1589877511535131244.png", "cloud://minorder-3f3365.6d69-minorder-3f3365-1257961996/photo/1589871751535152226.png" ], "_openid": "oKvsO0fqd22twirFCM12Tk1cVHnT0w", "today": true }, { "_id": "e2297d935ec3342c00d915250f266421f", "classifyId": "5e847ab25ec384be0142adf92b765f7d", "photos": [ "cloud://minorder-3f3365.6d69-minorder-3f3365-1257961996/photo/1589852117867166934.png", "cloud://minorder-3f3365.6d69-minorder-3f3365-1257961996/photo/1589285117867360109.png", "cloud://minorder-3f3365.6d69-minorder-3f3365-1257961996/photo/1589285117867441021.png" ], "_openid": "oKvsO0fqd2t2wirFCM2Tk1cVHnT0w", "gName": "山西苹果 丑的更好吃", "price": 0.01, "originalPrice": "16", "description": "12月份最新鲜的苹果,只有30斤,卖了就没有了。", "today": true } ] 云开发,是否有办法,把重复的id对象合并,上面是4个结果,需要合并成2个结果
2020-07-20