|
@@ -3,6 +3,7 @@ package com.usky.dxtop.controller.web;
|
|
|
import com.usky.dxtop.common.annotation.Log;
|
|
|
import com.usky.dxtop.common.constant.UserConstants;
|
|
|
import com.usky.dxtop.common.core.domain.ApiResult;
|
|
|
+import com.usky.dxtop.common.core.domain.TreeSelect;
|
|
|
import com.usky.dxtop.common.enums.BusinessType;
|
|
|
import com.usky.dxtop.common.exception.CustomException;
|
|
|
import com.usky.dxtop.common.utils.SecurityUtils;
|
|
@@ -39,7 +40,7 @@ public class SysDeptController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:dept:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public ApiResult list(SysDept dept)
|
|
|
+ public ApiResult<List<SysDept>> list(SysDept dept)
|
|
|
{
|
|
|
List<SysDept> depts = deptService.selectDeptList(dept);
|
|
|
return ApiResult.success(depts);
|
|
@@ -50,7 +51,7 @@ public class SysDeptController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:dept:list')")
|
|
|
@GetMapping("/list/exclude/{deptId}")
|
|
|
- public ApiResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
|
|
|
+ public ApiResult<List<SysDept>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
|
|
|
{
|
|
|
List<SysDept> depts = deptService.selectDeptList(new SysDept());
|
|
|
Iterator<SysDept> it = depts.iterator();
|
|
@@ -71,7 +72,7 @@ public class SysDeptController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:dept:query')")
|
|
|
@GetMapping(value = "/{deptId}")
|
|
|
- public ApiResult getInfo(@PathVariable Long deptId)
|
|
|
+ public ApiResult<SysDept> getInfo(@PathVariable Long deptId)
|
|
|
{
|
|
|
return ApiResult.success(deptService.selectDeptById(deptId));
|
|
|
}
|
|
@@ -80,7 +81,7 @@ public class SysDeptController extends BaseController
|
|
|
* 获取部门下拉树列表
|
|
|
*/
|
|
|
@GetMapping("/treeselect")
|
|
|
- public ApiResult treeselect(SysDept dept)
|
|
|
+ public ApiResult<List<TreeSelect>> treeselect(SysDept dept)
|
|
|
{
|
|
|
List<SysDept> depts = deptService.selectDeptList(dept);
|
|
|
return ApiResult.success(deptService.buildDeptTreeSelect(depts));
|