From 67569825ee33032b4b8e3eac6d88ed841399e8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E5=96=9C=E6=97=BA?= Date: Fri, 2 Aug 2024 16:24:01 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=85=9C=E5=BA=95=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9=E6=97=B6=E5=8C=BA=E6=B7=BB=E5=8A=A0=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E5=92=8C=E8=BF=94=E5=9B=9E=E8=AF=A6=E6=83=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutoMapper/TrackPushAutoMapperProfile.cs | 6 +++++- .../GetTrackPushConfigDetailOutputVO.cs | 19 ++++++++++++++++++- .../Repositories/TrackPushConfigRepository.cs | 3 +++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application/AutoMapper/TrackPushAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackPushAutoMapperProfile.cs index 213d7872..e08a0e16 100644 --- a/src/SJZY.Track.Application/AutoMapper/TrackPushAutoMapperProfile.cs +++ b/src/SJZY.Track.Application/AutoMapper/TrackPushAutoMapperProfile.cs @@ -11,7 +11,11 @@ public class TrackPushAutoMapperProfile : Profile { public TrackPushAutoMapperProfile() { - CreateMap(MemberList.None); + CreateMap(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(MemberList.None).Ignore(dest => dest.Id) .ForMember(dest => dest.IsPush, opt => opt.MapFrom(source => true)); CreateMap(MemberList.None); diff --git a/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs index ef8ea329..a6f94e20 100644 --- a/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs +++ b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs @@ -1,4 +1,6 @@ -namespace SJZY.Track.Domain.Dtos.TrackPush; +using SJZY.Track.Domain.Enums; + +namespace SJZY.Track.Domain.Dtos.TrackPush; public class GetTrackPushConfigDetailOutputVO { @@ -53,4 +55,19 @@ public class GetTrackPushConfigDetailOutputVO /// 是否全量推送 /// public bool IsAllPush { get; set; } + + /// + /// 时间格式枚举 + /// + public DateTimeFormatEnum DateTimeFormatType { get; set; } + + /// + /// 日期时间格式模板 + /// + public string? DateTimeFormat { get; set; } + + /// + /// 时区格式格式模板 + /// + public string? TimezoneFormat { get; set; } } \ No newline at end of file diff --git a/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs index f073f286..75a0cb5a 100644 --- a/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs @@ -71,6 +71,9 @@ public class TrackPushConfigRepository : BasicRepository, SubSystem = system.CnName, CustomName = externalSubject.Abbreviation, ServiceProvider = service.Name, + DateTimeFormat = trackPush.DateTimeFormat, + DateTimeFormatType = trackPush.DateTimeFormatType, + TimezoneFormat = trackPush.TimezoneFormat }, true) .SingleAsync(); }