Compare commits
2 Commits
2c4c96cfa4
...
4ec7e8d409
Author | SHA1 | Date |
---|---|---|
perry | 4ec7e8d409 | |
perry | 266f6bec1c |
|
@ -63,8 +63,18 @@ public class DeptController {
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@Operation(summary = "获取部门列表")
|
@Operation(summary = "获取部门列表")
|
||||||
@PreAuthorize("@ss.hasPermission('system:dept:query')")
|
@PreAuthorize("@ss.hasPermission('system:dept:query')")
|
||||||
@TenantIgnore
|
|
||||||
public CommonResult<List<DeptRespVO>> getDeptList(DeptListReqVO reqVO) {
|
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())){
|
if(!TenantContextHolder.ID_SYSTEM.equals(SecurityFrameworkUtils.getLoginUser().getTenantId())){
|
||||||
reqVO.setTenantId(SecurityFrameworkUtils.getLoginUser().getTenantId());
|
reqVO.setTenantId(SecurityFrameworkUtils.getLoginUser().getTenantId());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue