员工详情返回角色名称

This commit is contained in:
张松 2025-02-20 10:05:48 +08:00
parent f389516732
commit cec3fda744
2 changed files with 2 additions and 3 deletions

View File

@ -88,6 +88,6 @@ public class ShopStaff implements Serializable {
private Integer isPc;
@Column(ignore = true)
private String roleName;
private Long roleId;
}

View File

@ -136,8 +136,7 @@ public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff
}
SysUsersRoles sysUsersRoles = sysUsersRolesService.getOne(new QueryWrapper().eq(SysUsersRoles::getUserId, shopStaff.getId()));
SysRole role = sysRoleService.getById(sysUsersRoles.getRoleId());
shopStaff.setRoleName(role.getName());
shopStaff.setRoleId(sysUsersRoles.getRoleId());
return shopStaff;
}
}