员工详情返回角色名称
This commit is contained in:
parent
f389516732
commit
cec3fda744
|
|
@ -88,6 +88,6 @@ public class ShopStaff implements Serializable {
|
|||
private Integer isPc;
|
||||
|
||||
@Column(ignore = true)
|
||||
private String roleName;
|
||||
private Long roleId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue