feat:兜底轨迹时区添加映射和返回详情中

This commit is contained in:
钟喜旺 2024-08-02 16:24:01 +08:00
parent d0eda88a2f
commit 67569825ee
3 changed files with 26 additions and 2 deletions

View File

@ -11,7 +11,11 @@ public class TrackPushAutoMapperProfile : Profile
{ {
public TrackPushAutoMapperProfile() public TrackPushAutoMapperProfile()
{ {
CreateMap<EditTrackPushConfigInput, TrackPushConfigEntity>(MemberList.None); CreateMap<EditTrackPushConfigInput, TrackPushConfigEntity>(MemberList.None)
.ForMember(val => val.DateTimeFormatType, opt => opt.MapFrom(src => src.DateTimeFormatType))
.ForMember(val => val.DateTimeFormat, opt => opt.MapFrom(src => src.DateTimeFormat))
.ForMember(val => val.TimezoneFormat, opt => opt.MapFrom(src => src.TimezoneFormat));
CreateMap<EditTrackPushConfigInput, TrackPushPullParamsConfigEntity>(MemberList.None).Ignore(dest => dest.Id) CreateMap<EditTrackPushConfigInput, TrackPushPullParamsConfigEntity>(MemberList.None).Ignore(dest => dest.Id)
.ForMember(dest => dest.IsPush, opt => opt.MapFrom(source => true)); .ForMember(dest => dest.IsPush, opt => opt.MapFrom(source => true));
CreateMap<EditTrackPushContentInput, TrackPushContentConfigEntity>(MemberList.None); CreateMap<EditTrackPushContentInput, TrackPushContentConfigEntity>(MemberList.None);

View File

@ -1,4 +1,6 @@
namespace SJZY.Track.Domain.Dtos.TrackPush; using SJZY.Track.Domain.Enums;
namespace SJZY.Track.Domain.Dtos.TrackPush;
public class GetTrackPushConfigDetailOutputVO public class GetTrackPushConfigDetailOutputVO
{ {
@ -53,4 +55,19 @@ public class GetTrackPushConfigDetailOutputVO
/// 是否全量推送 /// 是否全量推送
/// </summary> /// </summary>
public bool IsAllPush { get; set; } public bool IsAllPush { get; set; }
/// <summary>
/// 时间格式枚举
/// </summary>
public DateTimeFormatEnum DateTimeFormatType { get; set; }
/// <summary>
/// 日期时间格式模板
/// </summary>
public string? DateTimeFormat { get; set; }
/// <summary>
/// 时区格式格式模板
/// </summary>
public string? TimezoneFormat { get; set; }
} }

View File

@ -71,6 +71,9 @@ public class TrackPushConfigRepository : BasicRepository<TrackPushConfigEntity>,
SubSystem = system.CnName, SubSystem = system.CnName,
CustomName = externalSubject.Abbreviation, CustomName = externalSubject.Abbreviation,
ServiceProvider = service.Name, ServiceProvider = service.Name,
DateTimeFormat = trackPush.DateTimeFormat,
DateTimeFormatType = trackPush.DateTimeFormatType,
TimezoneFormat = trackPush.TimezoneFormat
}, true) }, true)
.SingleAsync(); .SingleAsync();
} }