Compare commits

...

2 Commits

Author SHA1 Message Date
perry 4ec7e8d409 Merge remote-tracking branch 'origin/master' 2023-06-01 13:14:08 +08:00
perry 266f6bec1c 所有部门 2023-06-01 13:13:10 +08:00
1 changed files with 11 additions and 1 deletions

View File

@ -63,8 +63,18 @@ public class DeptController {
@GetMapping("/list")
@Operation(summary = "获取部门列表")
@PreAuthorize("@ss.hasPermission('system:dept:query')")
@TenantIgnore
public CommonResult<List<DeptRespVO>> getDeptList(DeptListReqVO reqVO) {
reqVO.setTenantId(SecurityFrameworkUtils.getLoginUser().getTenantId());
List<DeptDO> list = deptService.getDeptList(reqVO);
list.sort(Comparator.comparing(DeptDO::getSort));
return success(DeptConvert.INSTANCE.convertList(list));
}
@GetMapping("/list-all")
@Operation(summary = "获取平台所有部门列表")
@PreAuthorize("@ss.hasPermission('system:dept:query')")
@TenantIgnore
public CommonResult<List<DeptRespVO>> getDeptListAll(DeptListReqVO reqVO) {
if(!TenantContextHolder.ID_SYSTEM.equals(SecurityFrameworkUtils.getLoginUser().getTenantId())){
reqVO.setTenantId(SecurityFrameworkUtils.getLoginUser().getTenantId());
}