使用Map将List转化为树形结构避免递归

 public Map<String, Object>  subjectQuery(String str) {
   
        //读出数据
        List<BaseSubjectQueryVo> entityList  = sysSubjectClassMapper.subjectQuery(str);
        //初始化
        Map<String, BaseSubjectQueryVo >entityMap 

你可能感兴趣的:(树形DP,map,arraylist)