This commit is contained in:
2026-03-25 14:55:34 +08:00
commit 2c44b3a4b2
131 changed files with 7453 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
using StopShopping.Services;
using StopShopping.Services.Models.Req;
using StopShopping.Services.Models.Resp;
namespace StopShopping.Api.Routes;
public static class Reply
{
public static RouteGroupBuilder MapReply(this RouteGroupBuilder routes)
{
routes.MapPost("/reply/post", SubmitReplyAsync)
.WithTags(OpenApiTags..ToString());
routes.MapGet("/reply/list", ListAsync)
.WithTags(OpenApiTags..ToString());
routes.MapGet("/reply/orders", OrderSearchAsync)
.WithTags(OpenApiTags..ToString());
return routes;
}
private static async Task<ApiResponse> SubmitReplyAsync(
ReplyParams model,
IReplyService replyService)
{
return await replyService.ReplyAsync(model);
}
private static async Task<ApiResponse<List<Services.Models.Resp.Reply>>> ListAsync(
[AsParameters] RequestIdParams model,
IReplyService replyService
)
{
return await replyService.GetRepliesAsync(model);
}
private static async Task<ApiResponse<PagedResult<Services.Models.Resp.Request>>> OrderSearchAsync(
[AsParameters] RequestSearchWithStatusParams model,
IRequestService requestService
)
{
return await requestService.RequestOrderSearchAsync(model);
}
}