获取用户deptId

This commit is contained in:
hongchao 2026-01-07 15:28:37 +08:00
parent d767bc22b6
commit aaaa60c517
3 changed files with 4 additions and 4 deletions

View File

@ -335,8 +335,8 @@ public class TypeController extends BaseController {
*/
@ApiOperation(value = "获取用户部门id")
@GetMapping("/getUserDeptId")
public AjaxResult getUserDeptId(SysUser user) {
Long deptId = typeService.getUserDeptId(user);
public AjaxResult getUserDeptId() {
Long deptId = typeService.getUserDeptId();
return AjaxResult.success(deptId);
}
}

View File

@ -172,5 +172,5 @@ public interface ITypeService {
*/
List<Type> equipmentTypeLease(Long typeId, String typeName);
Long getUserDeptId(SysUser user);
Long getUserDeptId();
}

View File

@ -1022,7 +1022,7 @@ public class TypeServiceImpl implements ITypeService {
* @return
*/
@Override
public Long getUserDeptId(SysUser user) {
public Long getUserDeptId() {
Long userId = SecurityUtils.getLoginUser().getUserid();
SysUser sysUser = typeMapper.getUserDeptId(userId);
if (sysUser != null) {