完成 轨迹拉取配置内容详情 接口
This commit is contained in:
parent
249a77851b
commit
90e59e27ea
@ -57,4 +57,15 @@ public class TrackPullService : ApplicationService, ITransientDependency
|
|||||||
{
|
{
|
||||||
return await _trackPullConfigRepository.GetDetailAsync(id);
|
return await _trackPullConfigRepository.GetDetailAsync(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹拉取配置内容详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("GetContentDetail")]
|
||||||
|
public async Task<GetTrackPullContentDetailOutputVO> GetContentDetailAsync(int id)
|
||||||
|
{
|
||||||
|
return await _trackPullConfigRepository.GetContentDetailAsync(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -25,4 +25,11 @@ public interface ITrackPullConfigRepository : IBasicRepository<TrackPullConfigEn
|
|||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<GetTrackPullConfigDetailOutputVO> GetDetailAsync(int id);
|
Task<GetTrackPullConfigDetailOutputVO> GetDetailAsync(int id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹拉取配置内容详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<GetTrackPullContentDetailOutputVO> GetContentDetailAsync(int id);
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
namespace SJZY.Track.Domain.Dtos.TrackPull
|
namespace SJZY.Track.Domain.Dtos.TrackPull;
|
||||||
{
|
|
||||||
public class GetTrackPullConfigDetailOutputVO
|
public class GetTrackPullConfigDetailOutputVO
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
@ -79,4 +79,3 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string TrackTimeName { get; set; }
|
public string TrackTimeName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
namespace SJZY.Track.Domain.Dtos.TrackPull;
|
||||||
|
|
||||||
|
public class GetTrackPullContentDetailOutputVO
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容代码
|
||||||
|
/// </summary>
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拉取轨迹内容代码
|
||||||
|
/// </summary>
|
||||||
|
public string TrackContentCodeValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackContentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拉取轨迹内容
|
||||||
|
/// </summary>
|
||||||
|
public string TrackContentValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拉取轨迹关键字(正向)
|
||||||
|
/// </summary>
|
||||||
|
public string TrackKeyword { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拉取轨迹关键字(反向)
|
||||||
|
/// </summary>
|
||||||
|
public string TrackKeywordReverse { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拉取轨迹发生地
|
||||||
|
/// </summary>
|
||||||
|
public int TrackPlaceValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹拉取配置id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackPullConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拉取轨迹状态
|
||||||
|
/// </summary>
|
||||||
|
public string TrackStatusValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拉取轨迹时区
|
||||||
|
/// </summary>
|
||||||
|
public string TrackTimeZone { get; set; }
|
||||||
|
}
|
||||||
@ -70,4 +70,17 @@ public class TrackPullConfigRepository : BasicRepository<TrackPullConfigEntity>,
|
|||||||
}, true)
|
}, true)
|
||||||
.SingleAsync();
|
.SingleAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<GetTrackPullContentDetailOutputVO> GetContentDetailAsync(int id)
|
||||||
|
{
|
||||||
|
return await Context.Queryable<TrackPullContentConfigEntity>()
|
||||||
|
.InnerJoin<TrackContentEntity>((pullContent, trackContent) => pullContent.TrackContentId == trackContent.Id)
|
||||||
|
.Where(pullContent => pullContent.Id == id)
|
||||||
|
.Select((pullContent, trackContent) => new GetTrackPullContentDetailOutputVO
|
||||||
|
{
|
||||||
|
Id = pullContent.Id,
|
||||||
|
Code = trackContent.Code + "-" + trackContent.Content,
|
||||||
|
}, true)
|
||||||
|
.SingleAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user