员工详情返回角账密

This commit is contained in:
张松 2025-02-20 10:17:44 +08:00
parent cec3fda744
commit ea0f9091b3
2 changed files with 8 additions and 0 deletions

View File

@ -89,5 +89,10 @@ public class ShopStaff implements Serializable {
@Column(ignore = true)
private Long roleId;
@Column(ignore = true)
private String accountName;
@Column(ignore = true)
private String accountPwd;
}

View File

@ -137,6 +137,9 @@ public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff
SysUsersRoles sysUsersRoles = sysUsersRolesService.getOne(new QueryWrapper().eq(SysUsersRoles::getUserId, shopStaff.getId()));
shopStaff.setRoleId(sysUsersRoles.getRoleId());
SysUser sysUser = sysUserService.getById(shopStaff.getId());
shopStaff.setAccountName(StrUtil.subAfter(sysUser.getAccount(), "@", true));
shopStaff.setAccountPwd("*******");
return shopStaff;
}
}