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 SubmitReplyAsync( ReplyParams model, IReplyService replyService) { return await replyService.ReplyAsync(model); } private static async Task>> ListAsync( [AsParameters] RequestIdParams model, IReplyService replyService ) { return await replyService.GetRepliesAsync(model); } private static async Task>> OrderSearchAsync( [AsParameters] RequestSearchWithStatusParams model, IRequestService requestService ) { return await requestService.RequestOrderSearchAsync(model); } }