35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
using SJZY.Track.Application.Contract.Dtos.TrackContents;
|
|
using SJZY.Track.Application.Contract.Services;
|
|
using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
|
|
using SJZY.Track.Domain.Dtos.TrackContents;
|
|
|
|
namespace SJZY.Track.Application.Services.ProvideServices;
|
|
|
|
/// <summary>
|
|
/// 轨迹内容服务
|
|
/// </summary>
|
|
[ApiExplorerSettings(GroupName = "提供接口")]
|
|
[Route("/ProviderService")]
|
|
public class TrackContentService : ApplicationService, ITrackContentService
|
|
{
|
|
private readonly ITrackContentRepository _trackContentRepository;
|
|
|
|
public TrackContentService(ITrackContentRepository trackContentRepository)
|
|
{
|
|
_trackContentRepository = trackContentRepository;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据子系统id获取轨迹内容列表
|
|
/// </summary>
|
|
/// <param name="subSystemId"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("Track/GetTrackContents")]
|
|
public async Task<List<TrackContentOutput>> GetTrackContentsAsync(int subSystemId)
|
|
{
|
|
var res = await _trackContentRepository.GetTrackContentBySyetemIdAsync(subSystemId);
|
|
var result = ObjectMapper.Map<List<TrackContentVO>, List<TrackContentOutput>>(res);
|
|
return result;
|
|
}
|
|
}
|