diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs index dc214c9b..aad0b549 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs @@ -10,11 +10,11 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries /// private readonly IDataDictionaryRepository _dataDictionaryRepository; - private readonly DataDictionaryManager _dataDictionaryManager; + private readonly IDataDictionaryManager _dataDictionaryManager; public DataDictionaryAppService( IDataDictionaryRepository dataDictionaryRepository, - DataDictionaryManager dataDictionaryManager) + IDataDictionaryManager dataDictionaryManager) { _dataDictionaryRepository = dataDictionaryRepository; _dataDictionaryManager = dataDictionaryManager; diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs index 11bd34a5..85cdf57c 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { - public class DataDictionaryManager : DataDictionaryDomainService + public class DataDictionaryManager : DataDictionaryDomainService, IDataDictionaryManager { private readonly IDataDictionaryRepository _dataDictionaryRepository; private readonly IDistributedCache _cache; diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/IDataDictionaryManager.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/IDataDictionaryManager.cs new file mode 100644 index 00000000..9d009475 --- /dev/null +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/IDataDictionaryManager.cs @@ -0,0 +1,71 @@ +namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries; + +public interface IDataDictionaryManager +{ + Task FindByIdAsync( + Guid id, + CancellationToken cancellationToken = default); + + Task FindByCodeAsync( + string code, + CancellationToken cancellationToken = default); + + /// + /// 创建字典类型 + /// + /// + /// + /// + Task CreateAsync(string code, string displayText, string description); + + /// + /// 新增字典明细 + /// + /// + /// + /// + /// + /// + /// + Task CreateDetailAsync( + Guid dataDictionaryId, + string code, + string displayText, + string description, + int order); + + /// + /// 设置字典明细状态 + /// + Task SetStatus( + Guid dataDictionaryId, + Guid dataDictionaryDetailId, + bool isEnabled); + + /// + /// 更新数据字典明细 + /// + Task UpdateDetailAsync( + Guid dataDictionaryId, + Guid dataDictionaryDetailId, + string displayText, + string description, + int order); + + Task DeleteAsync(Guid dataDictionaryId, Guid dataDictionayDetailId); + + Task UpdateAsync( + Guid dataDictionaryId, + string displayText, + string description); + + /// + /// 删除字典类型 + /// + /// + /// + Task DeleteDataDictionaryTypeAsync(Guid id); + + IAbpLazyServiceProvider LazyServiceProvider { get; set; } + IServiceProvider ServiceProvider { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs index f52e7c6e..637a55e0 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs @@ -3,10 +3,10 @@ [Authorize] public class FileAppService : FileManagementAppService, IFileAppService { - private readonly FileManager _fileManager; + private readonly IFileManager _fileManager; private readonly IConfiguration _configuration; - public FileAppService(FileManager fileManager, IConfiguration configuration) + public FileAppService(IFileManager fileManager, IConfiguration configuration) { _fileManager = fileManager; _configuration = configuration; diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileManager.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileManager.cs index 1c73e6ad..16e3231f 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileManager.cs +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileManager.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.FileManagement.Files; -public class FileManager : DomainService +public class FileManager : DomainService, IFileManager { private readonly IFileRepository _fileRepository; diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/IFileManager.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/IFileManager.cs new file mode 100644 index 00000000..26204afc --- /dev/null +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/IFileManager.cs @@ -0,0 +1,15 @@ +namespace Lion.AbpPro.FileManagement.Files; + +public interface IFileManager +{ + Task CreateAsync(string fileName, string filePath); + + Task> PagingAsync( + string filter = null, + int maxResultCount = 10, + int skipCount = 0); + + Task CountAsync(string filter = null); + IAbpLazyServiceProvider LazyServiceProvider { get; set; } + IServiceProvider ServiceProvider { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs index ff624d79..0898682d 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs @@ -3,12 +3,12 @@ namespace Lion.AbpPro.NotificationManagement.Notifications [Authorize] public class NotificationAppService : NotificationManagementAppService, INotificationAppService { - private readonly NotificationManager _notificationManager; + private readonly INotificationManager _notificationManager; private readonly ICurrentUser _currentUser; public NotificationAppService( - NotificationManager notificationManager, + INotificationManager notificationManager, ICurrentUser currentUser) { _notificationManager = notificationManager; diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/INotificationManager.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/INotificationManager.cs new file mode 100644 index 00000000..31e2cb00 --- /dev/null +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/INotificationManager.cs @@ -0,0 +1,71 @@ +using Volo.Abp.DependencyInjection; + +namespace Lion.AbpPro.NotificationManagement.Notifications; + +public interface INotificationManager +{ + /// + /// 分页获取消息 + /// + Task> GetPagingListAsync( + Guid? userId, + MessageType messageType, + int maxResultCount = 10, + int skipCount = 0); + + /// + /// 获取消息总条数 + /// + Task GetPagingCountAsync(Guid? userId, MessageType messageType); + + /// + /// 发送警告文本消息 + /// + /// 标题 + /// 消息内容 + /// 接受人,发送给谁。 + Task SendCommonWarningMessageAsync(string title, string content, List receiveIds); + + /// + /// 发送普通文本消息 + /// + /// 标题 + /// 消息内容 + /// 接受人,发送给谁。 + Task SendCommonInformationMessageAsync(string title, string content, List receiveIds); + + /// + /// 发送错误文本消息 + /// + Task SendCommonErrorMessageAsync(string title, string content, List receiveIds); + + /// + /// 发送警告广播消息 + /// + /// 标题 + /// 消息内容 + Task SendBroadCastWarningMessageAsync(string title, string content); + + /// + /// 发送正常广播消息 + /// + /// 标题 + /// 消息内容 + Task SendBroadCastInformationMessageAsync(string title, string content); + + /// + /// 发送错误广播消息 + /// + /// 标题 + /// 消息内容 + Task SendBroadCastErrorMessageAsync(string title, string content); + + /// + /// 消息设置为已读 + /// + /// 消息Id + Task SetReadAsync(Guid id); + + IAbpLazyServiceProvider LazyServiceProvider { get; set; } + IServiceProvider ServiceProvider { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs index 06d8c899..3e6208ba 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs @@ -2,7 +2,7 @@ using Lion.AbpPro.NotificationManagement.Notifications.LocalEvents; namespace Lion.AbpPro.NotificationManagement.Notifications { - public class NotificationManager : NotificationManagementDomainService + public class NotificationManager : NotificationManagementDomainService, INotificationManager { private readonly INotificationRepository _notificationRepository;