首页 > 编程知识 正文

springboot怎么实现一个start,mysql实现递归查询

时间:2023-05-05 20:42:03 阅读:157503 作者:1053

自己传递到service----map(idsql、rssql、prior ) idSQL查询id rssql查询结果集并调用以下方法

@param ids查询的开始

publicstaticlistgettree (ArrayList ids,

列表全部RES,String pos ) {

List res=new ArrayList (;

if(up ).equals (pos ) ) }

res=tocreattreeup(ids,allres,RES );

() ) ) ) )。

if(down ).equals ) (pos ) }

res=tocreattreedown(ids,allres,RES );

() ) ) ) )。

返回结果;

() ) ) ) )。

privatestaticlisttocreattreeup (阵列ids,

List allres,List res ) {

ArrayList idss=new ArrayList (;

字符串: ids (for ) {

映射映射3360全部结果(for ) {

if(id.equals(map.get(id ).toString ) ) )

IDSS.add(map.get(PID ).toString ) );

RES.add(map );

() ) ) ) )。

() ) ) ) )。

() ) ) ) )。

if(IDSS.size )!=0}{

ids=idss;

res=tocreattreeup(ids,allres,RES );

() ) ) ) )。

返回结果;

() ) ) ) )。

privatestaticlisttocreattreedown (阵列ids,

List allres,List res ) {

ArrayList idss=new ArrayList (;

字符串: ids (for ) {

映射映射3360全部结果(for ) {

if(id.equals(map.get(id ).toString ) ) )

RES.add(map );

() ) ) ) )。

if (id.equals (map.get (' PID '.tostring ) ) )

IDSS.add(map.get(id ) ).toString );

() ) ) ) )。

() ) ) ) )。

() ) ) ) )。

if(IDSS.size )!=0}{

ids=idss;

res=tocreattreedown(ids,allres,RES );

() ) ) ) )。

返回结果;

() ) ) ) )。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。