jeecgboot / jeecgboot/JeecgBoot

分页树形表格使用查询条件一直查询根节点问题,queryTreeListNoPage

Open
#9,799 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
47.8k
Forks
16.2k
PR merge metrics
No merged PRs in 30d

Description

##### 版本号:3.9.3

##### 分支:main

##### 问题描述:
模板code-template-online->default->tree->service->impl->${entityName}ServiceImpl.javai生成的代码中在queryTreeListNoPage方法存在问题;
使用条件查询前端传入 name=*xxx*,控制器拿到后经判断是否传入参数后再传入queryTreeListNoPage方法,此方法一直执行的是查询子节点的根节点,并没有将查询到匹配的结果进行不分页返回。而是将查询的根节点进行多次匹配,除第一次使用递归查询子节点的根节点成功,后续匹配都是重复。mapList中只有一个根节点,返回结果错误。不符合查询所有数据,无分页。

##### 错误截图:

Image

#### 友情提示:
- 未按格式要求发帖、描述过于简单的,会被直接删掉;
- 描述问题请图文并茂,方便我们理解并快速定位问题;
- 如果使用的不是master,请说明你使用的分支;

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the code-generation template `code-template-online-default-tree-service-impl-${entityName}ServiceImpl.java` and inspect `queryTreeListNoPage`. Reproduce the issue by passing `name=*xxx*` through the controller, then compare the returned unpaged results with the matching records rather than repeated root-node data. Done means the generated method returns all matching tree data for the query condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.