如何使用hql获取树的叶节点?

rqenqsqc  于 2021-05-31  发布在  Hadoop
关注(0)|答案(0)|浏览(196)

表tbl\u config columns如下所示:

id   shopid category_define
1    123    [{"categoryId":390,"categoryLevel":1,"children":[{"categoryId":2416,"categoryLevel":2,"children":[{"categoryId":1844,"categoryLevel":3,"id":2412,"isLeaf":true,"parentId":2416},{"categoryId":421,"categoryLevel":3,"children":[{"categoryId":109,"categoryLevel":4,"id":2114,"isLeaf":true,"parentId":2416}],"id":2411,"isLeaf":false,"parentId":2416}],"id":2701,"isLeaf":false,"parentId":390},{"categoryId":2417,"categoryLevel":2,"children":[{"categoryId":394,"categoryLevel":3,"id":2150,"isLeaf":true,"parentId":2417}],"id":2702,"isLeaf":false,"parentId":390}],"id":2113,"isLeaf":false,"parentId":0}]

category\u define是树对象的json字符串。如何使用hql获取树的所有叶节点categoryid?叶节点是哪个 "isLeaf":true .
我想得到叶节点的分类像:24122114394
谢谢。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题