测试报告导出修改
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using Model;
|
||||
using Model.Entity;
|
||||
using ORM;
|
||||
using Service.Interface;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Service.Implement
|
||||
{
|
||||
public class TestCheckRecordService : BaseService<TestCheckRecordEntity>, ITestCheckRecordService
|
||||
{
|
||||
public TestCheckRecordService(SqlSugarRepository<TestCheckRecordEntity> repository) : base(repository)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据 TestRoundId 查询该次运行的所有测试项判断记录(按创建时间升序)
|
||||
/// </summary>
|
||||
public async Task<Result<List<TestCheckRecordEntity>>> GetByTestRoundIdAsync(Guid testRoundId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var list = await _repository.Entities
|
||||
.Where(x => x.TestRoundId == testRoundId)
|
||||
.OrderBy(x => x.CreateTime)
|
||||
.ToListAsync();
|
||||
|
||||
return Result<List<TestCheckRecordEntity>>.Success(list);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Result<List<TestCheckRecordEntity>>.Error("根据 TestRoundId 查询测试项判断记录失败", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Model;
|
||||
using Model.Entity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Service.Interface
|
||||
{
|
||||
/// <summary>
|
||||
/// 测试项判断记录服务:运行时记录测试项范围内每一次 OKExpression 判断,导出测试报告时查询。
|
||||
/// </summary>
|
||||
public interface ITestCheckRecordService : IBaseService<TestCheckRecordEntity>
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据 TestRoundId 查询该次运行的所有测试项判断记录(按创建时间升序)
|
||||
/// </summary>
|
||||
Task<Result<List<TestCheckRecordEntity>>> GetByTestRoundIdAsync(Guid testRoundId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user