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.Application/Services/ForewarningServices/KpiAreaService.cs b/src/SJZY.Track.Application/Services/ForewarningServices/KpiAreaService.cs index 354e177d..8f8ecb95 100644 --- a/src/SJZY.Track.Application/Services/ForewarningServices/KpiAreaService.cs +++ b/src/SJZY.Track.Application/Services/ForewarningServices/KpiAreaService.cs @@ -113,7 +113,6 @@ public class KpiAreaService : ApplicationService await _ruleAreaRepository.UpdateAreaInfoAsync(ruleAreaEntity); await _forewarningCacheService.ClearRedisByAreaId(areaInfo.AreaId); - await RedisHelper.Client.PublishAsync(GlobalConst.PublishNotifyChannelKey, "clear local cache"); return new UnifyResultDto(true, "更新成功"); } diff --git a/src/SJZY.Track.Domain/Dtos/Forewarning/RuleAreaBaseInfo.cs b/src/SJZY.Track.Domain/Dtos/Forewarning/RuleAreaBaseInfo.cs index a8fef8d3..b7457ff5 100644 --- a/src/SJZY.Track.Domain/Dtos/Forewarning/RuleAreaBaseInfo.cs +++ b/src/SJZY.Track.Domain/Dtos/Forewarning/RuleAreaBaseInfo.cs @@ -1,3 +1,17 @@ namespace SJZY.Track.Domain.Dtos.Forewarning; -public record RuleAreaBaseInfo(int SystemId, int CustomerId); \ No newline at end of file +public class RuleAreaBaseInfo +{ + public int SystemId { get; set; } + public int CustomerId { get; set; } + + public RuleAreaBaseInfo() + { + } + + public RuleAreaBaseInfo(int systemId, int customerId) + { + SystemId = systemId; + CustomerId = customerId; + } +} \ No newline at end of file diff --git a/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs index ef8ea329..76420ad4 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/Queries/WarningQueries.cs b/src/SJZY.Track.Repository/Queries/WarningQueries.cs index 9772f425..32aefadf 100644 --- a/src/SJZY.Track.Repository/Queries/WarningQueries.cs +++ b/src/SJZY.Track.Repository/Queries/WarningQueries.cs @@ -79,7 +79,11 @@ public class WarningQueries : ISugarRepository, IWarningQueries, return Context.Queryable() .InnerJoin((a, b) => a.WarningId == b.Id) .Where((a, b) => b.IsEnable && a.AreaId == areaId) - .Select((a, b) => new RuleAreaBaseInfo(b.CustomerId, b.SubSystemId)) + .Select((a, b) => new RuleAreaBaseInfo + { + CustomerId = b.CustomerId, + SystemId = b.SubSystemId + }) .ToListAsync(); } } \ 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..187f306e 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== DateTimeFormatEnum.None?null:trackPush.DateTimeFormatType, + TimezoneFormat = trackPush.TimezoneFormat }, true) .SingleAsync(); }