!856 update 优化代码,简化类型检查

* update 优化代码,简化类型检查
This commit is contained in:
AprilWind
2026-06-10 06:38:46 +00:00
committed by 疯狂的狮子Li
parent fc43e368b7
commit 0b37392a8f
12 changed files with 44 additions and 29 deletions
@@ -54,7 +54,7 @@ public class SysDeptController extends BaseController {
*/
@SaCheckPermission("system:dept:list")
@GetMapping("/list/exclude/{deptId}")
public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId") Long deptId) {
List<SysDeptVo> depts = deptService.selectDeptList(new SysDeptBo());
depts.removeIf(d -> d.getDeptId().equals(deptId)
|| StringUtils.splitList(d.getAncestors()).contains(Convert.toStr(deptId)));