APIJSON icon indicating copy to clipboard operation
APIJSON copied to clipboard

使用apijion实现先jion后分组的问题咨询

Open healthybaobao opened this issue 4 years ago • 1 comments

构建的apijson的请求格式: { "[]": { "join":"&/table1/id@", "table2": { "@column": "sum(hours):total" }, "table1": { "id@": "/table2/father_id", "@column": "team", --------这里添加了一个jion后展示的列,但是返回结果一直没有team只有sum(hours)? "@group": "team" } } }

返回结果(没有team展示出来,我请求参数哪里有问题?请多指教,多谢啦): "[]": [ { "table1": { "total": 75 } }, { "table1": { "total": 40 } }, { "table1": { "total": 30 } } ]

healthybaobao avatar Jun 02 '21 09:06 healthybaobao

如果 team 字段在 table2 中也有,则 table2 中 @column 里加上 team image

如果没有,把 table1 和 table2 顺序反过来 image

原因: https://github.com/Tencent/APIJSON/blob/master/Document.md#3.2 image

TommyLemon avatar Jun 02 '21 09:06 TommyLemon