All checks were successful
Build and Deploy / deploy (push) Successful in 1m1s
新增 warehouseOpenApi(Token/入库/件重尺/红外图),并在 fk_user 支持 IsEnabled 禁用登录。 Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using Fake.Rbac.Application.Dtos.User;
|
|
using Oms.Application.Dtos.Rbac;
|
|
|
|
namespace Oms.Application.Rbac;
|
|
|
|
internal static class OmsUserProfileMapper
|
|
{
|
|
public static OmsUserDetailDto ToDetailDto(UserDto user, UserProfileData? profile)
|
|
{
|
|
var detail = new OmsUserDetailDto
|
|
{
|
|
Id = user.Id,
|
|
CreatedAt = user.CreatedAt,
|
|
CreatedBy = user.CreatedBy,
|
|
UpdatedAt = user.UpdatedAt,
|
|
UpdatedBy = user.UpdatedBy,
|
|
Name = user.Name,
|
|
Account = user.Account,
|
|
Email = user.Email,
|
|
Avatar = user.Avatar,
|
|
OrganizationId = user.OrganizationId,
|
|
OrganizationName = user.OrganizationName,
|
|
Roles = user.Roles,
|
|
};
|
|
|
|
if (profile == null)
|
|
{
|
|
return detail;
|
|
}
|
|
|
|
detail.Phone = profile.Phone;
|
|
detail.EmployeeNo = profile.EmployeeNo;
|
|
detail.WechatId = profile.WechatId;
|
|
detail.WechatQrCode = profile.WechatQrCode;
|
|
detail.WecomKfUrl = profile.WecomKfUrl;
|
|
detail.IsEnabled = profile.IsEnabled;
|
|
return detail;
|
|
}
|
|
}
|