完成 轨迹推送配置内容详情 接口
This commit is contained in:
parent
64963d2f42
commit
a54f071769
@ -57,4 +57,15 @@ public class TrackPushService : ApplicationService, ITransientDependency
|
|||||||
{
|
{
|
||||||
return await _trackPushConfigRepository.GetDetailAsync(id);
|
return await _trackPushConfigRepository.GetDetailAsync(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹推送配置内容详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("GetContentDetail")]
|
||||||
|
public async Task<GetTrackPushContentDetailOutputVO> GetContentDetailAsync(int id)
|
||||||
|
{
|
||||||
|
return await _trackPushConfigRepository.GetContentDetailAsync(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -10,4 +10,6 @@ public interface ITrackPushConfigRepository : IBasicRepository<TrackPushConfigEn
|
|||||||
Task<UnifyPageResultDto<GetTrackPushContentPageOutputVO>> GetContentPageAsync(GetTrackPushContentPageInputVO input);
|
Task<UnifyPageResultDto<GetTrackPushContentPageOutputVO>> GetContentPageAsync(GetTrackPushContentPageInputVO input);
|
||||||
|
|
||||||
Task<GetTrackPushConfigDetailOutputVO> GetDetailAsync(int id);
|
Task<GetTrackPushConfigDetailOutputVO> GetDetailAsync(int id);
|
||||||
|
|
||||||
|
Task<GetTrackPushContentDetailOutputVO> GetContentDetailAsync(int id);
|
||||||
}
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
namespace SJZY.Track.Domain.Dtos.TrackPush;
|
||||||
|
|
||||||
|
public class GetTrackPushContentDetailOutputVO
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容代码
|
||||||
|
/// </summary>
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推送扩展字段
|
||||||
|
/// </summary>
|
||||||
|
public string ExpandFieldsValue { get; set; }
|
||||||
|
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推送单号类型
|
||||||
|
/// </summary>
|
||||||
|
public int OrderNoType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推送轨迹排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { 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 TrackEnContentValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹推送配置id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackPullConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推送轨迹状态
|
||||||
|
/// </summary>
|
||||||
|
public string TrackStatusValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推送轨迹时区
|
||||||
|
/// </summary>
|
||||||
|
public string TrackTimeZone { get; set; }
|
||||||
|
}
|
||||||
@ -69,4 +69,17 @@ public class TrackPushConfigRepository : BasicRepository<TrackPushConfigEntity>,
|
|||||||
}, true)
|
}, true)
|
||||||
.SingleAsync();
|
.SingleAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<GetTrackPushContentDetailOutputVO> GetContentDetailAsync(int id)
|
||||||
|
{
|
||||||
|
return await Context.Queryable<TrackPushContentConfigEntity>()
|
||||||
|
.InnerJoin<TrackContentEntity>((pushContent, trackContent) => pushContent.TrackContentId == trackContent.Id)
|
||||||
|
.Where(pushContent => pushContent.Id == id)
|
||||||
|
.Select((pushContent, trackContent) => new GetTrackPushContentDetailOutputVO
|
||||||
|
{
|
||||||
|
Id = pushContent.Id,
|
||||||
|
Code = trackContent.Code + "-" + trackContent.Content,
|
||||||
|
}, true)
|
||||||
|
.SingleAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user