track/src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs
2025-02-24 16:20:33 +08:00

38 lines
1.4 KiB
C#

using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Services;
using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
using SJZY.Track.Domain.Dtos.TrackPush;
namespace SJZY.Track.Application.Services.ProvideServices;
/// <summary>
/// 轨迹推送配置服务
/// </summary>
[ApiExplorerSettings(GroupName = "提供接口")]
[Route("/ProviderService")]
public class TrackPushConfigService : ApplicationService, ITrackPushConfigService
{
private readonly ITrackPushConfigRepository _trackPushConfigRepository;
public TrackPushConfigService(ITrackPushConfigRepository trackPushConfigRepository)
{
_trackPushConfigRepository = trackPushConfigRepository;
}
/// <summary>
/// 查询轨迹推送配置关系
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("Track/QueryTrackPullMappings")]
public async Task<UnifyResultDto<List<QueryTrackPullMappingsInfo>>> QueryTrackPullMappingsAsync(
QueryTrackPullMappingsInput input)
{
var vo = ObjectMapper.Map<QueryTrackPullMappingsInput, QueryTrackPullMappingsInputVO>(input);
var result = await _trackPushConfigRepository.QueryTrackPullMappingsAsync(vo);
var output = ObjectMapper.Map<List<QueryTrackPullMappingsInfoVO>, List<QueryTrackPullMappingsInfo>>(result);
return new UnifyResultDto<List<QueryTrackPullMappingsInfo>>(true, output, "操作成功");
}
}