APIJSON
APIJSON copied to clipboard
使用apijion实现先jion后分组的问题咨询
构建的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 } } ]
如果 team 字段在 table2 中也有,则 table2 中 @column 里加上 team

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

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