
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 30s
- 添加学生提交管理服务 (StudentSubmissionService, StudentSubmissionDetailService) - 新增学生提交相关控制器 (StudentSubmissionController, StudentSubmissionDetailController) - 添加学生提交数据传输对象 (StudentSubmissionDetailDto, StudentSubmissionSummaryDto) - 新增学生提交相关页面组件 (StudentExamView, ExamDetailView, StudentCard等) - 添加学生提交信息卡片组件 (SubmissionInfoCard, TeacherSubmissionInfoCard) - 更新数据库迁移文件以支持提交系统
27 lines
901 B
C#
27 lines
901 B
C#
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<StudentSubmissionDetailDto> GetSubmissionDetailAsync(Guid submissionId)
|
|
{
|
|
var response = await _httpClient.GetAsync($"api/student-submission-detail/{submissionId}");
|
|
if (response.IsSuccessStatusCode)
|
|
{
|
|
return await response.Content.ReadFromJsonAsync<StudentSubmissionDetailDto>();
|
|
}
|
|
throw new HttpRequestException($"获取学生提交详细信息失败: {response.StatusCode}");
|
|
}
|
|
}
|
|
}
|