From 535dc8dda29eeb24c91a06c7eec400283bff2f7a Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 23 Aug 2024 17:10:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(notifications):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B6=88=E6=81=AF=E6=97=B6=E6=97=A0=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbpNotificationsApplicationAutoMapperProfile.cs | 2 +- .../AbpNotificationsDomainAutoMapperProfile.cs | 2 +- .../LINGYUN/Abp/Notifications/UserNotificationInfo.cs | 1 + .../EfCoreUserNotificationRepository.cs | 9 +++++---- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationAutoMapperProfile.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationAutoMapperProfile.cs index 479671877..4c41a76c0 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationAutoMapperProfile.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationAutoMapperProfile.cs @@ -8,7 +8,7 @@ public class AbpNotificationsApplicationAutoMapperProfile : Profile public AbpNotificationsApplicationAutoMapperProfile() { CreateMap() - .ForMember(dto => dto.Id, map => map.MapFrom(src => src.Id.ToString())) + .ForMember(dto => dto.Id, map => map.MapFrom(src => src.NotificationId.ToString())) .ForMember(dto => dto.Lifetime, map => map.Ignore()) .ForMember(dto => dto.Data, map => map.MapFrom((src, nfi) => { diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainAutoMapperProfile.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainAutoMapperProfile.cs index fedff66b7..21a144526 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainAutoMapperProfile.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainAutoMapperProfile.cs @@ -28,7 +28,7 @@ public class AbpNotificationsDomainAutoMapperProfile : Profile })); CreateMap() - .ForMember(dto => dto.Id, map => map.MapFrom(src => src.Id.ToString())) + .ForMember(dto => dto.Id, map => map.MapFrom(src => src.NotificationId.ToString())) .ForMember(dto => dto.Name, map => map.MapFrom(src => src.Name)) .ForMember(dto => dto.Lifetime, map => map.Ignore()) .ForMember(dto => dto.Type, map => map.MapFrom(src => src.Type)) diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/UserNotificationInfo.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/UserNotificationInfo.cs index 98e042315..b62312895 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/UserNotificationInfo.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/UserNotificationInfo.cs @@ -8,6 +8,7 @@ public class UserNotificationInfo public Guid? TenantId { get; set; } public string Name { get; set; } public long Id { get; set; } + public long NotificationId { get; set; } public ExtraPropertyDictionary ExtraProperties { get; set; } public string NotificationTypeName { get; set; } public DateTime CreationTime { get; set; } diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.EntityFrameworkCore/LINGYUN/Abp/Notifications/EntityFrameworkCore/EfCoreUserNotificationRepository.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.EntityFrameworkCore/LINGYUN/Abp/Notifications/EntityFrameworkCore/EfCoreUserNotificationRepository.cs index 8e9c8a85b..345053ead 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.EntityFrameworkCore/LINGYUN/Abp/Notifications/EntityFrameworkCore/EfCoreUserNotificationRepository.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.EntityFrameworkCore/LINGYUN/Abp/Notifications/EntityFrameworkCore/EfCoreUserNotificationRepository.cs @@ -47,7 +47,8 @@ public class EfCoreUserNotificationRepository : EfCoreRepository