From 71fbbf54c08b929d30b706cb10cb2505c55671e4 Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Fri, 24 Jul 2026 11:29:21 +0800 Subject: [PATCH] docs: add Chinese XML summaries for Channel/Order/RBAC Swagger APIs Co-authored-by: Cursor --- .../Services/Channels/IssueTemplateService.cs | 21 +++++++++++ .../Services/Orders/OrderService.BatchJob.cs | 27 ++++++++++++++ .../Services/Orders/PlatformStoreService.cs | 9 +++++ .../Services/Rbac/OmsUserService.cs | 36 +++++++++++++++++++ 4 files changed, 93 insertions(+) diff --git a/src/Oms.Application/Services/Channels/IssueTemplateService.cs b/src/Oms.Application/Services/Channels/IssueTemplateService.cs index c59ccce..07d4d57 100644 --- a/src/Oms.Application/Services/Channels/IssueTemplateService.cs +++ b/src/Oms.Application/Services/Channels/IssueTemplateService.cs @@ -24,6 +24,9 @@ public class IssueTemplateService : ApplicationService private DataPermRepository DataPermRepository => LazyServiceProvider.GetRequiredService(); + /// + /// 分页查询问题模板列表。 + /// [HttpGet("/channel/issue-template/list")] public async Task> GetListAsync([FromQuery] IssueTemplateListInput input) { @@ -41,6 +44,9 @@ public class IssueTemplateService : ApplicationService return new OmsPageResult { Items = items, Total = total }; } + /// + /// 获取问题模板详情。 + /// [HttpGet("/channel/issue-template/detail")] public async Task GetDetailAsync([FromQuery] int id) { @@ -49,6 +55,9 @@ public class IssueTemplateService : ApplicationService return MapOutput(entity, orgNameMap); } + /// + /// 创建问题模板。 + /// [HttpPost("/channel/issue-template/create")] public async Task CreateAsync(IssueTemplateSaveInput input) { @@ -65,6 +74,9 @@ public class IssueTemplateService : ApplicationService await IssueTemplateRepository.InsertAsync(entity); } + /// + /// 更新问题模板。 + /// [HttpPost("/channel/issue-template/update")] public async Task UpdateAsync(IssueTemplateSaveInput input) { @@ -79,6 +91,9 @@ public class IssueTemplateService : ApplicationService await IssueTemplateRepository.UpdateAsync(entity); } + /// + /// 删除问题模板。 + /// [HttpPost("/channel/issue-template/delete")] public async Task DeleteAsync(IdInput input) { @@ -86,6 +101,9 @@ public class IssueTemplateService : ApplicationService await IssueTemplateRepository.DeleteAsync(entity); } + /// + /// 启用或禁用问题模板。 + /// [HttpPost("/channel/issue-template/toggleStatus")] public async Task ToggleStatusAsync(ToggleStatusInput input) { @@ -94,6 +112,9 @@ public class IssueTemplateService : ApplicationService await IssueTemplateRepository.UpdateAsync(entity); } + /// + /// 获取启用中的问题模板选项(按问题类型)。 + /// [HttpGet("/channel/issue-template/options")] public async Task> GetOptionsAsync( [FromQuery] string? organizationId = null, diff --git a/src/Oms.Application/Services/Orders/OrderService.BatchJob.cs b/src/Oms.Application/Services/Orders/OrderService.BatchJob.cs index 992e100..f46c14c 100644 --- a/src/Oms.Application/Services/Orders/OrderService.BatchJob.cs +++ b/src/Oms.Application/Services/Orders/OrderService.BatchJob.cs @@ -94,38 +94,65 @@ public partial class OrderService return BatchJobCoordinator.CreateAndEnqueueAsync(input, CurrentUser.GetId()); } + /// + /// 异步批量支付订单。 + /// [HttpPost("/order/batch/pay")] public Task BatchPayAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.Pay, input); + /// + /// 异步批量预报订单。 + /// [HttpPost("/order/batch/pre-declare")] public Task BatchPreDeclareAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.PreDeclare, input); + /// + /// 异步批量拦截订单。 + /// [HttpPost("/order/batch/intercept")] public Task BatchInterceptAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.Intercept, input); + /// + /// 异步批量取消拦截。 + /// [HttpPost("/order/batch/cancel-intercept")] public Task BatchCancelInterceptAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.CancelIntercept, input); + /// + /// 异步批量删除订单。 + /// [HttpPost("/order/batch/delete")] public Task BatchDeleteAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.Delete, input); + /// + /// 异步批量打印面单。 + /// [HttpPost("/order/batch/print")] public Task BatchPrintAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.Print, input); + /// + /// 异步批量标记问题件。 + /// [HttpPost("/order/batch/mark-problematic")] public Task BatchMarkProblematicAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.MarkProblematic, input); + /// + /// 异步批量标记已认领。 + /// [HttpPost("/order/batch/mark-claimed")] public Task BatchMarkClaimedAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.MarkClaimed, input); + /// + /// 异步批量更新处理状态。 + /// [HttpPost("/order/batch/handle-status-update")] public Task BatchHandleStatusUpdateAsync([FromBody] OrderBatchJobCreateInput input) => EnqueueOrderBatchAsync(OrderBatchActionCodes.HandleStatusUpdate, input); diff --git a/src/Oms.Application/Services/Orders/PlatformStoreService.cs b/src/Oms.Application/Services/Orders/PlatformStoreService.cs index c7ce7c4..0711d52 100644 --- a/src/Oms.Application/Services/Orders/PlatformStoreService.cs +++ b/src/Oms.Application/Services/Orders/PlatformStoreService.cs @@ -26,6 +26,9 @@ public class PlatformStoreService : ApplicationService LazyServiceProvider.GetRequiredService(); private IConfiguration Configuration => LazyServiceProvider.GetRequiredService(); + /// + /// 分页查询平台店铺授权列表。 + /// [HttpPost("/order/platform-store/list")] public async Task> GetListAsync(PlatformStorePageInput input) { @@ -177,6 +180,9 @@ public class PlatformStoreService : ApplicationService }; } + /// + /// 保存平台店铺信息。 + /// [HttpPost("/order/platform-store/save")] public async Task SaveAsync(PlatformStoreSaveInput input) { @@ -230,6 +236,9 @@ public class PlatformStoreService : ApplicationService return MapOutput(entity); } + /// + /// 删除平台店铺授权。 + /// [HttpPost("/order/platform-store/delete")] public async Task DeleteAsync(PlatformStoreIdsInput input) { diff --git a/src/Oms.Application/Services/Rbac/OmsUserService.cs b/src/Oms.Application/Services/Rbac/OmsUserService.cs index f7751eb..cbf4c37 100644 --- a/src/Oms.Application/Services/Rbac/OmsUserService.cs +++ b/src/Oms.Application/Services/Rbac/OmsUserService.cs @@ -17,6 +17,9 @@ namespace Oms.Application.Services.Rbac; [ApiExplorerSettings(GroupName = "RBAC-User")] public class OmsUserService(UserService userService, UserProfileRepository profileRepository) : ApplicationService { + /// + /// 获取用户详情(含扩展资料)。 + /// [HttpGet("/rbac/user/get")] public async Task GetAsync([FromQuery] Guid id, CancellationToken cancellationToken = default) { @@ -25,6 +28,9 @@ public class OmsUserService(UserService userService, UserProfileRepository profi return OmsUserProfileMapper.ToDetailDto(user, profile); } + /// + /// 分页查询用户列表(含扩展资料)。 + /// [HttpGet("/rbac/user/get-list")] public async Task> GetListAsync( [FromQuery] UserPagedRequestDto input, @@ -59,12 +65,18 @@ public class OmsUserService(UserService userService, UserProfileRepository profi }; } + /// + /// 按角色查询用户简要列表。 + /// [HttpGet("/rbac/user/get-users-by-role")] public Task> GetUsersByRoleAsync( [FromQuery] Guid roleId, CancellationToken cancellationToken = default) => userService.GetUsersByRoleAsync(roleId, cancellationToken); + /// + /// 创建用户并保存扩展资料。 + /// [HttpPost("/rbac/user/create")] public async Task CreateAsync( [FromBody] OmsUserCreateInput input, @@ -97,6 +109,9 @@ public class OmsUserService(UserService userService, UserProfileRepository profi return OmsUserProfileMapper.ToDetailDto(user, profile); } + /// + /// 更新用户及扩展资料。 + /// [HttpPut("/rbac/user/update")] public async Task UpdateAsync( [FromQuery] Guid id, @@ -128,6 +143,9 @@ public class OmsUserService(UserService userService, UserProfileRepository profi return OmsUserProfileMapper.ToDetailDto(user, profile); } + /// + /// 修改用户密码。 + /// [HttpPut("/rbac/user/update-password")] public Task UpdatePasswordAsync( [FromQuery] Guid id, @@ -135,6 +153,9 @@ public class OmsUserService(UserService userService, UserProfileRepository profi CancellationToken cancellationToken = default) => userService.UpdatePasswordAsync(id, input, cancellationToken); + /// + /// 更新用户头像。 + /// [HttpPut("/rbac/user/update-avatar")] public Task UpdateAvatarAsync( [FromQuery] Guid id, @@ -142,14 +163,23 @@ public class OmsUserService(UserService userService, UserProfileRepository profi CancellationToken cancellationToken = default) => userService.UpdateAvatarAsync(id, avatarUrl, cancellationToken); + /// + /// 删除用户。 + /// [HttpDelete("/rbac/user/delete")] public Task DeleteAsync([FromQuery] Guid id, CancellationToken cancellationToken = default) => userService.DeleteAsync(id, cancellationToken); + /// + /// 批量删除用户。 + /// [HttpDelete("/rbac/user/delete-batch")] public Task DeleteBatchAsync([FromQuery] List ids, CancellationToken cancellationToken = default) => userService.DeleteBatchAsync(ids, cancellationToken); + /// + /// 为用户分配角色。 + /// [HttpPost("/rbac/user/assign-roles")] public Task AssignRolesAsync( [FromQuery] Guid userId, @@ -157,12 +187,18 @@ public class OmsUserService(UserService userService, UserProfileRepository profi CancellationToken cancellationToken = default) => userService.AssignRolesAsync(userId, roleIds, cancellationToken); + /// + /// 获取用户已分配角色。 + /// [HttpGet("/rbac/user/get-user-roles")] public Task> GetUserRolesAsync( [FromQuery] Guid userId, CancellationToken cancellationToken = default) => userService.GetUserRolesAsync(userId, cancellationToken); + /// + /// 获取用户权限码列表。 + /// [HttpGet("/rbac/user/get-user-permissions")] public Task> GetUserPermissionsAsync( [FromQuery] Guid userId,