using Entities.DTO; using TechHelper.Client.HttpRepository; using System.Net.Http.Json; namespace TechHelper.Client.Services { public class StudentSubmissionDetailService : IStudentSubmissionDetailService { private readonly HttpClient _httpClient; public StudentSubmissionDetailService(HttpClient httpClient) { _httpClient = httpClient; } public async Task GetSubmissionDetailAsync(Guid submissionId) { var response = await _httpClient.GetAsync($"api/student-submission-detail/{submissionId}"); if (response.IsSuccessStatusCode) { return await response.Content.ReadFromJsonAsync(); } throw new HttpRequestException($"获取学生提交详细信息失败: {response.StatusCode}"); } } }