docs: add Chinese XML summaries for Channel/Order/RBAC Swagger APIs
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
944b7f2c80
commit
71fbbf54c0
@ -24,6 +24,9 @@ public class IssueTemplateService : ApplicationService
|
||||
private DataPermRepository DataPermRepository =>
|
||||
LazyServiceProvider.GetRequiredService<DataPermRepository>();
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询问题模板列表。
|
||||
/// </summary>
|
||||
[HttpGet("/channel/issue-template/list")]
|
||||
public async Task<OmsPageResult<IssueTemplateOutput>> GetListAsync([FromQuery] IssueTemplateListInput input)
|
||||
{
|
||||
@ -41,6 +44,9 @@ public class IssueTemplateService : ApplicationService
|
||||
return new OmsPageResult<IssueTemplateOutput> { Items = items, Total = total };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取问题模板详情。
|
||||
/// </summary>
|
||||
[HttpGet("/channel/issue-template/detail")]
|
||||
public async Task<IssueTemplateOutput> GetDetailAsync([FromQuery] int id)
|
||||
{
|
||||
@ -49,6 +55,9 @@ public class IssueTemplateService : ApplicationService
|
||||
return MapOutput(entity, orgNameMap);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建问题模板。
|
||||
/// </summary>
|
||||
[HttpPost("/channel/issue-template/create")]
|
||||
public async Task CreateAsync(IssueTemplateSaveInput input)
|
||||
{
|
||||
@ -65,6 +74,9 @@ public class IssueTemplateService : ApplicationService
|
||||
await IssueTemplateRepository.InsertAsync(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新问题模板。
|
||||
/// </summary>
|
||||
[HttpPost("/channel/issue-template/update")]
|
||||
public async Task UpdateAsync(IssueTemplateSaveInput input)
|
||||
{
|
||||
@ -79,6 +91,9 @@ public class IssueTemplateService : ApplicationService
|
||||
await IssueTemplateRepository.UpdateAsync(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除问题模板。
|
||||
/// </summary>
|
||||
[HttpPost("/channel/issue-template/delete")]
|
||||
public async Task DeleteAsync(IdInput input)
|
||||
{
|
||||
@ -86,6 +101,9 @@ public class IssueTemplateService : ApplicationService
|
||||
await IssueTemplateRepository.DeleteAsync(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启用或禁用问题模板。
|
||||
/// </summary>
|
||||
[HttpPost("/channel/issue-template/toggleStatus")]
|
||||
public async Task ToggleStatusAsync(ToggleStatusInput input)
|
||||
{
|
||||
@ -94,6 +112,9 @@ public class IssueTemplateService : ApplicationService
|
||||
await IssueTemplateRepository.UpdateAsync(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取启用中的问题模板选项(按问题类型)。
|
||||
/// </summary>
|
||||
[HttpGet("/channel/issue-template/options")]
|
||||
public async Task<OmsItemsResult<IssueTemplateOptionOutput>> GetOptionsAsync(
|
||||
[FromQuery] string? organizationId = null,
|
||||
|
||||
@ -94,38 +94,65 @@ public partial class OrderService
|
||||
return BatchJobCoordinator.CreateAndEnqueueAsync(input, CurrentUser.GetId<int>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量支付订单。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/pay")]
|
||||
public Task<OrderBatchJobOutput> BatchPayAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.Pay, input);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量预报订单。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/pre-declare")]
|
||||
public Task<OrderBatchJobOutput> BatchPreDeclareAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.PreDeclare, input);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量拦截订单。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/intercept")]
|
||||
public Task<OrderBatchJobOutput> BatchInterceptAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.Intercept, input);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量取消拦截。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/cancel-intercept")]
|
||||
public Task<OrderBatchJobOutput> BatchCancelInterceptAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.CancelIntercept, input);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量删除订单。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/delete")]
|
||||
public Task<OrderBatchJobOutput> BatchDeleteAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.Delete, input);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量打印面单。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/print")]
|
||||
public Task<OrderBatchJobOutput> BatchPrintAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.Print, input);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量标记问题件。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/mark-problematic")]
|
||||
public Task<OrderBatchJobOutput> BatchMarkProblematicAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.MarkProblematic, input);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量标记已认领。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/mark-claimed")]
|
||||
public Task<OrderBatchJobOutput> BatchMarkClaimedAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.MarkClaimed, input);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量更新处理状态。
|
||||
/// </summary>
|
||||
[HttpPost("/order/batch/handle-status-update")]
|
||||
public Task<OrderBatchJobOutput> BatchHandleStatusUpdateAsync([FromBody] OrderBatchJobCreateInput input) =>
|
||||
EnqueueOrderBatchAsync(OrderBatchActionCodes.HandleStatusUpdate, input);
|
||||
|
||||
@ -26,6 +26,9 @@ public class PlatformStoreService : ApplicationService
|
||||
LazyServiceProvider.GetRequiredService<IPlatformShopConfigProvider>();
|
||||
private IConfiguration Configuration => LazyServiceProvider.GetRequiredService<IConfiguration>();
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询平台店铺授权列表。
|
||||
/// </summary>
|
||||
[HttpPost("/order/platform-store/list")]
|
||||
public async Task<OmsPageResult<PlatformStoreOutput>> GetListAsync(PlatformStorePageInput input)
|
||||
{
|
||||
@ -177,6 +180,9 @@ public class PlatformStoreService : ApplicationService
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存平台店铺信息。
|
||||
/// </summary>
|
||||
[HttpPost("/order/platform-store/save")]
|
||||
public async Task<PlatformStoreOutput> SaveAsync(PlatformStoreSaveInput input)
|
||||
{
|
||||
@ -230,6 +236,9 @@ public class PlatformStoreService : ApplicationService
|
||||
return MapOutput(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除平台店铺授权。
|
||||
/// </summary>
|
||||
[HttpPost("/order/platform-store/delete")]
|
||||
public async Task DeleteAsync(PlatformStoreIdsInput input)
|
||||
{
|
||||
|
||||
@ -17,6 +17,9 @@ namespace Oms.Application.Services.Rbac;
|
||||
[ApiExplorerSettings(GroupName = "RBAC-User")]
|
||||
public class OmsUserService(UserService userService, UserProfileRepository profileRepository) : ApplicationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取用户详情(含扩展资料)。
|
||||
/// </summary>
|
||||
[HttpGet("/rbac/user/get")]
|
||||
public async Task<OmsUserDetailDto> GetAsync([FromQuery] Guid id, CancellationToken cancellationToken = default)
|
||||
{
|
||||
@ -25,6 +28,9 @@ public class OmsUserService(UserService userService, UserProfileRepository profi
|
||||
return OmsUserProfileMapper.ToDetailDto(user, profile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询用户列表(含扩展资料)。
|
||||
/// </summary>
|
||||
[HttpGet("/rbac/user/get-list")]
|
||||
public async Task<PagedResultDto<OmsUserDetailDto>> GetListAsync(
|
||||
[FromQuery] UserPagedRequestDto input,
|
||||
@ -59,12 +65,18 @@ public class OmsUserService(UserService userService, UserProfileRepository profi
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按角色查询用户简要列表。
|
||||
/// </summary>
|
||||
[HttpGet("/rbac/user/get-users-by-role")]
|
||||
public Task<List<UserSimpleDto>> GetUsersByRoleAsync(
|
||||
[FromQuery] Guid roleId,
|
||||
CancellationToken cancellationToken = default) =>
|
||||
userService.GetUsersByRoleAsync(roleId, cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// 创建用户并保存扩展资料。
|
||||
/// </summary>
|
||||
[HttpPost("/rbac/user/create")]
|
||||
public async Task<OmsUserDetailDto> CreateAsync(
|
||||
[FromBody] OmsUserCreateInput input,
|
||||
@ -97,6 +109,9 @@ public class OmsUserService(UserService userService, UserProfileRepository profi
|
||||
return OmsUserProfileMapper.ToDetailDto(user, profile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新用户及扩展资料。
|
||||
/// </summary>
|
||||
[HttpPut("/rbac/user/update")]
|
||||
public async Task<OmsUserDetailDto> UpdateAsync(
|
||||
[FromQuery] Guid id,
|
||||
@ -128,6 +143,9 @@ public class OmsUserService(UserService userService, UserProfileRepository profi
|
||||
return OmsUserProfileMapper.ToDetailDto(user, profile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户密码。
|
||||
/// </summary>
|
||||
[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);
|
||||
|
||||
/// <summary>
|
||||
/// 更新用户头像。
|
||||
/// </summary>
|
||||
[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);
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户。
|
||||
/// </summary>
|
||||
[HttpDelete("/rbac/user/delete")]
|
||||
public Task DeleteAsync([FromQuery] Guid id, CancellationToken cancellationToken = default) =>
|
||||
userService.DeleteAsync(id, cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除用户。
|
||||
/// </summary>
|
||||
[HttpDelete("/rbac/user/delete-batch")]
|
||||
public Task DeleteBatchAsync([FromQuery] List<Guid> ids, CancellationToken cancellationToken = default) =>
|
||||
userService.DeleteBatchAsync(ids, cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// 为用户分配角色。
|
||||
/// </summary>
|
||||
[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);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户已分配角色。
|
||||
/// </summary>
|
||||
[HttpGet("/rbac/user/get-user-roles")]
|
||||
public Task<List<RoleDto>> GetUserRolesAsync(
|
||||
[FromQuery] Guid userId,
|
||||
CancellationToken cancellationToken = default) =>
|
||||
userService.GetUserRolesAsync(userId, cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户权限码列表。
|
||||
/// </summary>
|
||||
[HttpGet("/rbac/user/get-user-permissions")]
|
||||
public Task<List<string>> GetUserPermissionsAsync(
|
||||
[FromQuery] Guid userId,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user