更新代码

This commit is contained in:
chfei committed 2026-11-13 19:19:33 +08:00
1 parent 127fc22de5
commit 45829fa267
26 files changed
+139 -90

No files matched your search

@@ -0,0 +1,12 @@
using Riok.Mapperly.Abstractions;
using Store.Management.Framework.ViewModels;
using Store.Management.Models;
namespace Store.Management.Framework.Mappers;
[Mapper]
public static partial class UserMapper
{
public static partial UserItemViewModel ToItemViewModel(UserInfo user);
public static partial IReadOnlyList<UserItemViewModel> ToItemViewModels(IReadOnlyList<UserInfo> users);
}
@@ -1,7 +1,8 @@
using Store.Management.Models;
using MAX.Core.DependencyInjection;
using Store.Management.Api;
using Store.Management.Api.Models;
using Store.Management.Api.Users;
using Store.Management.Api.Models;
namespace Store.Management.Framework.Services;
@@ -14,6 +14,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Store.Management.Models\Store.Management.Models.csproj" />
<PackageReference Include="Riok.Mapperly" Version="4.3.1" PrivateAssets="all" />
<PackageReference Include="HandyControl" Version="3.6.2.1" />
<PackageReference Include="MAX.Common.WPF" Version="1.4.23" />
<ProjectReference Include="..\Store.Management.Api\Store.Management.Api.csproj" />
@@ -0,0 +1,26 @@
using Store.Management.Models;
namespace Store.Management.Framework.ViewModels;
public sealed class UserItemViewModel
{
public int Id { get; init; }
public string UserName { get; init; } = "";
public string? NickName { get; init; }
public string? Mobile { get; init; }
public string? CompanyName { get; init; }
public string? Notes { get; init; }
public string? ParentUserName { get; init; }
public int GroupId { get; init; }
public UserGroup? Group => GroupId is >= byte.MinValue and <= byte.MaxValue ? (UserGroup)GroupId : null;
public UserAdminLevel? SaLevel { get; init; }
public string? OemId { get; init; }
public string? Authority { get; init; }
public int ShopPointsPerMonth { get; init; }
public decimal? PostagePerOrder { get; init; }
public decimal? RefundPostagePerOrder { get; init; }
public decimal? GiftOemAmountPerOrder { get; init; }
public decimal? SyncLogisticsPerOrder { get; init; }
public decimal Points { get; init; }
public decimal? Balance { get; init; }
}