树形父级接口修改
This commit is contained in:
+2
-3
@@ -28,7 +28,6 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
@@ -100,8 +99,8 @@ public class SysCategoryController {
|
||||
@AutoLog(value = "标签内容-查询字典配置的父级名称")
|
||||
@ApiOperation(value = "标签内容-查询字典配置的父级名称", notes = "标签内容-查询字典配置的父级名称")
|
||||
@GetMapping(value = "/queryPid")
|
||||
public Result<List<SysCategory>> queryPid() {
|
||||
List<SysCategory> list = sysCategoryService.queryPid();
|
||||
public Result<List<SysCategory>> queryPid(SysCategory sysCategory) {
|
||||
List<SysCategory> list = sysCategoryService.queryPid(sysCategory);
|
||||
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
+1
-1
@@ -90,5 +90,5 @@ public interface ISysCategoryService extends IService<SysCategory> {
|
||||
|
||||
void setEditOrderNum(SysCategory sysCategory);
|
||||
|
||||
List<SysCategory> queryPid();
|
||||
List<SysCategory> queryPid(SysCategory sysCategory);
|
||||
}
|
||||
|
||||
+4
-2
@@ -387,9 +387,11 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysCategory> queryPid() {
|
||||
public List<SysCategory> queryPid(SysCategory sysCategory) {
|
||||
QueryWrapper<SysCategory> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("pid",0);
|
||||
queryWrapper.eq("sys_dict_id",sysCategory.getSysDictId())
|
||||
.eq("pid",0)
|
||||
.orderByDesc("sort_order");
|
||||
List<SysCategory> list = list(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user