Browse Source

Merge pull request #1093 from colinin/message-center

feat(platform): 增加消息中心统一处理邮件短信消息.
pull/1105/head
yx lin 1 year ago
committed by GitHub
parent
commit
e1e665163d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 45
      aspnet-core/LINGYUN.MicroService.All.sln
  2. 21
      aspnet-core/LINGYUN.MicroService.SingleProject.sln
  3. 6294
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20250208011431_Add-Message-Center.Designer.cs
  4. 170
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20250208011431_Add-Message-Center.cs
  5. 6288
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20250208034755_Remove-Message-Status-Default-Value.Designer.cs
  6. 54
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20250208034755_Remove-Message-Status-Default-Value.cs
  7. 274
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/SingleMigrationsDbContextModelSnapshot.cs
  8. 3
      aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/FodyWeavers.xml
  9. 30
      aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/FodyWeavers.xsd
  10. 24
      aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/LINGYUN.Abp.Emailing.Platform.csproj
  11. 13
      aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/LINGYUN/Abp/Emailing/Platform/AbpEmailingPlatformModule.cs
  12. 130
      aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/LINGYUN/Abp/Emailing/Platform/PlatformEmailSender.cs
  13. 51
      aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/README.md
  14. 3
      aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/FodyWeavers.xml
  15. 30
      aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/FodyWeavers.xsd
  16. 24
      aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/LINGYUN.Abp.Sms.Platform.csproj
  17. 13
      aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/LINGYUN/Abp/Sms/Platform/AbpSmsPlatformModule.cs
  18. 37
      aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/LINGYUN/Abp/Sms/Platform/PlatformSmsSender.cs
  19. 51
      aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/README.md
  20. 5
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN.Platform.Application.Contracts.csproj
  21. 5
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/en.json
  22. 5
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json
  23. 16
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageAttachmentDto.cs
  24. 64
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageCreateDto.cs
  25. 19
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageDto.cs
  26. 16
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageGetListInput.cs
  27. 27
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageHeaderDto.cs
  28. 16
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/MessageDto.cs
  29. 30
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/SmsMessageCreateDto.cs
  30. 5
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/SmsMessageDto.cs
  31. 12
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/SmsMessageGetListInput.cs
  32. 33
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/IEmailMessageAppService.cs
  33. 33
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/ISmsMessageAppService.cs
  34. 16
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Integration/IEmailMessageIntegrationService.cs
  35. 16
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Integration/ISmsMessageIntegrationService.cs
  36. 8
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissionDefinitionProvider.cs
  37. 242
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissions.cs
  38. 7
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/PlatformApplicationContractModule.cs
  39. 4
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN.Platform.Application.csproj
  40. 94
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Messages/EmailMessageAppService.cs
  41. 65
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Messages/Integration/EmailMessageIntegrationService.cs
  42. 38
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Messages/Integration/SmsMessageIntegrationService.cs
  43. 91
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Messages/SmsMessageAppService.cs
  44. 6
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationMappingProfile.cs
  45. 6
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationModule.cs
  46. 33
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/en.json
  47. 33
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/zh-Hans.json
  48. 5
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/EmailMessageAttachmentConsts.cs
  49. 6
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/EmailMessageConsts.cs
  50. 10
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/EmailMessageEto.cs
  51. 6
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/EmailMessageHeaderConsts.cs
  52. 8
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/MessageConsts.cs
  53. 12
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/MessageEto.cs
  54. 16
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/MessageStatus.cs
  55. 8
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/SmsMessageEto.cs
  56. 8
      aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/PlatformErrorCodes.cs
  57. 2
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN.Platform.Domain.csproj
  58. 87
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessage.cs
  59. 23
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessageAttachment.cs
  60. 20
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessageHeader.cs
  61. 134
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessageManager.cs
  62. 7
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/IEmailMessageManager.cs
  63. 21
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/IEmailMessageRepository.cs
  64. 7
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/ISmsMessageManager.cs
  65. 21
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/ISmsMessageRepository.cs
  66. 56
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/Message.cs
  67. 8
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/MessagingContainer.cs
  68. 18
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/SmsMessage.cs
  69. 66
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/SmsMessageManager.cs
  70. 38
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainMappingProfile.cs
  71. 16
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainModule.cs
  72. 3
      aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/EntityFrameworkCore/IPlatformDbContext.cs
  73. 3
      aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/EntityFrameworkCore/PlatformDbContext.cs
  74. 97
      aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/EntityFrameworkCore/PlatformDbContextModelBuilderExtensions.cs
  75. 4
      aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/EntityFrameworkCore/PlatformEntityFrameworkCoreModule.cs
  76. 49
      aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Messages/EfCoreEmailMessageRepository.cs
  77. 42
      aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Messages/EfCoreSmsMessageRepository.cs
  78. 110
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/DataClientProxy.Generated.cs
  79. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/DataClientProxy.cs
  80. 44
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/FeedbackAttachmentClientProxy.Generated.cs
  81. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/FeedbackAttachmentClientProxy.cs
  82. 51
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/FeedbackClientProxy.Generated.cs
  83. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/FeedbackClientProxy.cs
  84. 27
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/MyFeedbackClientProxy.Generated.cs
  85. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/MyFeedbackClientProxy.cs
  86. 65
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Layouts/LayoutClientProxy.Generated.cs
  87. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Layouts/LayoutClientProxy.cs
  88. 126
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Menus/MenuClientProxy.Generated.cs
  89. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Menus/MenuClientProxy.cs
  90. 87
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Menus/UserFavoriteMenuClientProxy.Generated.cs
  91. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Menus/UserFavoriteMenuClientProxy.cs
  92. 51
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/EmailMessageClientProxy.Generated.cs
  93. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/EmailMessageClientProxy.cs
  94. 29
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/Integration/EmailMessageIntegrationClientProxy.Generated.cs
  95. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/Integration/EmailMessageIntegrationClientProxy.cs
  96. 29
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/Integration/SmsMessageIntegrationClientProxy.Generated.cs
  97. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/Integration/SmsMessageIntegrationClientProxy.cs
  98. 51
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/SmsMessageClientProxy.Generated.cs
  99. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/SmsMessageClientProxy.cs
  100. 96
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Packages/PackageClientProxy.Generated.cs

45
aspnet-core/LINGYUN.MicroService.All.sln

@ -767,9 +767,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OssManagement.I
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Notifications.HttpApi.Client", "modules\realtime-notifications\LINGYUN.Abp.Notifications.HttpApi.Client\LINGYUN.Abp.Notifications.HttpApi.Client.csproj", "{3CBD1342-C021-49FB-933F-FAC1DAFC7B48}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Notifications.Templating", "modules\realtime-notifications\LINGYUN.Abp.Notifications.Templating\LINGYUN.Abp.Notifications.Templating.csproj", "{E2AC3DB8-D579-49A3-845B-528C77A1EC75}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Sms.Platform", "modules\platform\LINGYUN.Abp.Sms.Platform\LINGYUN.Abp.Sms.Platform.csproj", "{01B86C39-B0C8-48A4-949C-1C63D755B02C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Notifications.Templating.Tests", "tests\LINGYUN.Abp.Notifications.Templating.Tests\LINGYUN.Abp.Notifications.Templating.Tests.csproj", "{F47EDB4F-1F92-4887-8F33-BFCEB61BB51A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Emailing.Platform", "modules\platform\LINGYUN.Abp.Emailing.Platform\LINGYUN.Abp.Emailing.Platform.csproj", "{DD6609C7-07AC-49FD-B588-44E649D0AE6E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Sms.Platform.Tests", "tests\LINGYUN.Abp.Sms.Platform.Tests\LINGYUN.Abp.Sms.Platform.Tests.csproj", "{856B4ACA-BD13-417F-A6E2-0F401F877189}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Platform.HttpApi.Client", "modules\platform\LINGYUN.Platform.HttpApi.Client\LINGYUN.Platform.HttpApi.Client.csproj", "{B52B199C-0E1C-4CE9-B066-71D26F618424}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Emailing.Platform.Tests", "tests\LINGYUN.Abp.Emailing.Platform.Tests\LINGYUN.Abp.Emailing.Platform.Tests.csproj", "{80F44B5B-F8FF-47FA-9A77-BE2D176B2721}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -1973,14 +1979,26 @@ Global
{3CBD1342-C021-49FB-933F-FAC1DAFC7B48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CBD1342-C021-49FB-933F-FAC1DAFC7B48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CBD1342-C021-49FB-933F-FAC1DAFC7B48}.Release|Any CPU.Build.0 = Release|Any CPU
{E2AC3DB8-D579-49A3-845B-528C77A1EC75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2AC3DB8-D579-49A3-845B-528C77A1EC75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2AC3DB8-D579-49A3-845B-528C77A1EC75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2AC3DB8-D579-49A3-845B-528C77A1EC75}.Release|Any CPU.Build.0 = Release|Any CPU
{F47EDB4F-1F92-4887-8F33-BFCEB61BB51A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F47EDB4F-1F92-4887-8F33-BFCEB61BB51A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F47EDB4F-1F92-4887-8F33-BFCEB61BB51A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F47EDB4F-1F92-4887-8F33-BFCEB61BB51A}.Release|Any CPU.Build.0 = Release|Any CPU
{01B86C39-B0C8-48A4-949C-1C63D755B02C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01B86C39-B0C8-48A4-949C-1C63D755B02C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01B86C39-B0C8-48A4-949C-1C63D755B02C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01B86C39-B0C8-48A4-949C-1C63D755B02C}.Release|Any CPU.Build.0 = Release|Any CPU
{DD6609C7-07AC-49FD-B588-44E649D0AE6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD6609C7-07AC-49FD-B588-44E649D0AE6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD6609C7-07AC-49FD-B588-44E649D0AE6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD6609C7-07AC-49FD-B588-44E649D0AE6E}.Release|Any CPU.Build.0 = Release|Any CPU
{856B4ACA-BD13-417F-A6E2-0F401F877189}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{856B4ACA-BD13-417F-A6E2-0F401F877189}.Debug|Any CPU.Build.0 = Debug|Any CPU
{856B4ACA-BD13-417F-A6E2-0F401F877189}.Release|Any CPU.ActiveCfg = Release|Any CPU
{856B4ACA-BD13-417F-A6E2-0F401F877189}.Release|Any CPU.Build.0 = Release|Any CPU
{B52B199C-0E1C-4CE9-B066-71D26F618424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B52B199C-0E1C-4CE9-B066-71D26F618424}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B52B199C-0E1C-4CE9-B066-71D26F618424}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B52B199C-0E1C-4CE9-B066-71D26F618424}.Release|Any CPU.Build.0 = Release|Any CPU
{80F44B5B-F8FF-47FA-9A77-BE2D176B2721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80F44B5B-F8FF-47FA-9A77-BE2D176B2721}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80F44B5B-F8FF-47FA-9A77-BE2D176B2721}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80F44B5B-F8FF-47FA-9A77-BE2D176B2721}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -2352,8 +2370,11 @@ Global
{76DDE71D-00BD-4BC8-AEA2-31209E2B7E05} = {B05CB08F-C088-4D6D-97EE-A94A5D1AE4A6}
{267933BD-BFB8-4906-BA39-DF193B2FD558} = {B05CB08F-C088-4D6D-97EE-A94A5D1AE4A6}
{3CBD1342-C021-49FB-933F-FAC1DAFC7B48} = {1A23BB7F-1839-4204-88C5-7E9A6C9FBF1E}
{E2AC3DB8-D579-49A3-845B-528C77A1EC75} = {1A23BB7F-1839-4204-88C5-7E9A6C9FBF1E}
{F47EDB4F-1F92-4887-8F33-BFCEB61BB51A} = {370D7CD5-1E17-4F3D-BBFA-03429F6D4F2F}
{01B86C39-B0C8-48A4-949C-1C63D755B02C} = {F4923692-D343-4318-AECA-96F580B1A563}
{DD6609C7-07AC-49FD-B588-44E649D0AE6E} = {F4923692-D343-4318-AECA-96F580B1A563}
{856B4ACA-BD13-417F-A6E2-0F401F877189} = {370D7CD5-1E17-4F3D-BBFA-03429F6D4F2F}
{B52B199C-0E1C-4CE9-B066-71D26F618424} = {F4923692-D343-4318-AECA-96F580B1A563}
{80F44B5B-F8FF-47FA-9A77-BE2D176B2721} = {370D7CD5-1E17-4F3D-BBFA-03429F6D4F2F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718}

21
aspnet-core/LINGYUN.MicroService.SingleProject.sln

@ -624,6 +624,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.EntityFram
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql\LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql.csproj", "{FCD95DCE-9DF4-403C-966C-FF19ADD2EA43}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Sms.Platform", "modules\platform\LINGYUN.Abp.Sms.Platform\LINGYUN.Abp.Sms.Platform.csproj", "{A31C7F96-3AC6-44AF-B505-7D900C945291}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Platform.HttpApi.Client", "modules\platform\LINGYUN.Platform.HttpApi.Client\LINGYUN.Platform.HttpApi.Client.csproj", "{6C9E816F-3ECD-4AD1-A592-C4EDA1F011A3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Emailing.Platform", "modules\platform\LINGYUN.Abp.Emailing.Platform\LINGYUN.Abp.Emailing.Platform.csproj", "{9D357D4C-532A-4ADC-9CCB-C95B4E033547}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -1646,6 +1652,18 @@ Global
{FCD95DCE-9DF4-403C-966C-FF19ADD2EA43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCD95DCE-9DF4-403C-966C-FF19ADD2EA43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCD95DCE-9DF4-403C-966C-FF19ADD2EA43}.Release|Any CPU.Build.0 = Release|Any CPU
{A31C7F96-3AC6-44AF-B505-7D900C945291}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A31C7F96-3AC6-44AF-B505-7D900C945291}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A31C7F96-3AC6-44AF-B505-7D900C945291}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A31C7F96-3AC6-44AF-B505-7D900C945291}.Release|Any CPU.Build.0 = Release|Any CPU
{6C9E816F-3ECD-4AD1-A592-C4EDA1F011A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C9E816F-3ECD-4AD1-A592-C4EDA1F011A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C9E816F-3ECD-4AD1-A592-C4EDA1F011A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C9E816F-3ECD-4AD1-A592-C4EDA1F011A3}.Release|Any CPU.Build.0 = Release|Any CPU
{9D357D4C-532A-4ADC-9CCB-C95B4E033547}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D357D4C-532A-4ADC-9CCB-C95B4E033547}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D357D4C-532A-4ADC-9CCB-C95B4E033547}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D357D4C-532A-4ADC-9CCB-C95B4E033547}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1949,6 +1967,9 @@ Global
{EB3EC78D-CD1C-423F-B866-74E0DC8D429D} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35}
{C4761F7E-6DFB-4D84-BCA1-38A7EDC28B01} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35}
{FCD95DCE-9DF4-403C-966C-FF19ADD2EA43} = {0D69B63D-F082-4D57-9FF0-355642C56993}
{A31C7F96-3AC6-44AF-B505-7D900C945291} = {F3449D35-8671-4BF6-8D1B-EFBB8AFD61DD}
{6C9E816F-3ECD-4AD1-A592-C4EDA1F011A3} = {F3449D35-8671-4BF6-8D1B-EFBB8AFD61DD}
{9D357D4C-532A-4ADC-9CCB-C95B4E033547} = {F3449D35-8671-4BF6-8D1B-EFBB8AFD61DD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1}

6294
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20250208011431_Add-Message-Center.Designer.cs

File diff suppressed because it is too large

170
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20250208011431_Add-Message-Center.cs

@ -0,0 +1,170 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class AddMessageCenter : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AppPlatformEmailMessages",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
From = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Subject = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IsBodyHtml = table.Column<bool>(type: "tinyint(1)", nullable: false),
CC = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Normalize = table.Column<bool>(type: "tinyint(1)", nullable: false),
Priority = table.Column<int>(type: "int", nullable: true),
BodyTransferEncoding = table.Column<int>(type: "int", nullable: true),
DeliveryNotificationOptions = table.Column<int>(type: "int", nullable: true),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
UserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
Sender = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Provider = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Receiver = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Content = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
SendTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
SendCount = table.Column<int>(type: "int", nullable: false),
Status = table.Column<int>(type: "int", nullable: false, defaultValue: -1),
Reason = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_AppPlatformEmailMessages", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AppPlatformSmsMessages",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
UserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
Sender = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Provider = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Receiver = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Content = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
SendTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
SendCount = table.Column<int>(type: "int", nullable: false),
Status = table.Column<int>(type: "int", nullable: false, defaultValue: -1),
Reason = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_AppPlatformSmsMessages", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AppPlatformEmailMessageAttachments",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
MessageId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
BlobName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Size = table.Column<long>(type: "bigint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AppPlatformEmailMessageAttachments", x => x.Id);
table.ForeignKey(
name: "FK_AppPlatformEmailMessageAttachments_AppPlatformEmailMessages_~",
column: x => x.MessageId,
principalTable: "AppPlatformEmailMessages",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AppPlatformEmailMessageHeaders",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
MessageId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Key = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Value = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_AppPlatformEmailMessageHeaders", x => x.Id);
table.ForeignKey(
name: "FK_AppPlatformEmailMessageHeaders_AppPlatformEmailMessages_Mess~",
column: x => x.MessageId,
principalTable: "AppPlatformEmailMessages",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_AppPlatformEmailMessageAttachments_MessageId",
table: "AppPlatformEmailMessageAttachments",
column: "MessageId");
migrationBuilder.CreateIndex(
name: "IX_AppPlatformEmailMessageHeaders_MessageId",
table: "AppPlatformEmailMessageHeaders",
column: "MessageId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AppPlatformEmailMessageAttachments");
migrationBuilder.DropTable(
name: "AppPlatformEmailMessageHeaders");
migrationBuilder.DropTable(
name: "AppPlatformSmsMessages");
migrationBuilder.DropTable(
name: "AppPlatformEmailMessages");
}
}
}

6288
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20250208034755_Remove-Message-Status-Default-Value.Designer.cs

File diff suppressed because it is too large

54
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20250208034755_Remove-Message-Status-Default-Value.cs

@ -0,0 +1,54 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class RemoveMessageStatusDefaultValue : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "Status",
table: "AppPlatformSmsMessages",
type: "int",
nullable: false,
oldClrType: typeof(int),
oldType: "int",
oldDefaultValue: -1);
migrationBuilder.AlterColumn<int>(
name: "Status",
table: "AppPlatformEmailMessages",
type: "int",
nullable: false,
oldClrType: typeof(int),
oldType: "int",
oldDefaultValue: -1);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "Status",
table: "AppPlatformSmsMessages",
type: "int",
nullable: false,
defaultValue: -1,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<int>(
name: "Status",
table: "AppPlatformEmailMessages",
type: "int",
nullable: false,
defaultValue: -1,
oldClrType: typeof(int),
oldType: "int");
}
}
}

274
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/SingleMigrationsDbContextModelSnapshot.cs

@ -1,4 +1,4 @@
// <auto-generated />
// <auto-generated />
using System;
using LY.MicroService.Applications.Single.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
@ -2743,6 +2743,253 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migratio
b.ToTable("AppPlatformUserMenus", (string)null);
});
modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<int?>("BodyTransferEncoding")
.HasColumnType("int");
b.Property<string>("CC")
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
.HasColumnName("CC");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Content")
.IsRequired()
.HasColumnType("longtext")
.HasColumnName("Content");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<int?>("DeliveryNotificationOptions")
.HasColumnType("int");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<string>("From")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("From");
b.Property<bool>("IsBodyHtml")
.HasColumnType("tinyint(1)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<bool>("Normalize")
.HasColumnType("tinyint(1)");
b.Property<int?>("Priority")
.HasColumnType("int");
b.Property<string>("Provider")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("Provider");
b.Property<string>("Reason")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Reason");
b.Property<string>("Receiver")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
.HasColumnName("Receiver");
b.Property<int>("SendCount")
.HasColumnType("int");
b.Property<DateTime?>("SendTime")
.HasColumnType("datetime(6)");
b.Property<string>("Sender")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Sender");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("Subject")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("Subject");
b.Property<Guid?>("UserId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.ToTable("AppPlatformEmailMessages", (string)null);
});
modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<string>("BlobName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("BlobName");
b.Property<Guid>("MessageId")
.HasColumnType("char(36)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Name");
b.Property<long>("Size")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("MessageId");
b.ToTable("AppPlatformEmailMessageAttachments", (string)null);
});
modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("Key");
b.Property<Guid>("MessageId")
.HasColumnType("char(36)");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("Value");
b.HasKey("Id");
b.HasIndex("MessageId");
b.ToTable("AppPlatformEmailMessageHeaders", (string)null);
});
modelBuilder.Entity("LINGYUN.Platform.Messages.SmsMessage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Content")
.IsRequired()
.HasColumnType("longtext")
.HasColumnName("Content");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<string>("Provider")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("Provider");
b.Property<string>("Reason")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Reason");
b.Property<string>("Receiver")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
.HasColumnName("Receiver");
b.Property<int>("SendCount")
.HasColumnType("int");
b.Property<DateTime?>("SendTime")
.HasColumnType("datetime(6)");
b.Property<string>("Sender")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Sender");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<Guid?>("UserId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.ToTable("AppPlatformSmsMessages", (string)null);
});
modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b =>
{
b.Property<Guid>("Id")
@ -5603,6 +5850,24 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migratio
.IsRequired();
});
modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b =>
{
b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null)
.WithMany("Attachments")
.HasForeignKey("MessageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b =>
{
b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null)
.WithMany("Headers")
.HasForeignKey("MessageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b =>
{
b.HasOne("LINGYUN.Platform.Packages.Package", "Package")
@ -5922,6 +6187,13 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migratio
b.Navigation("Comments");
});
modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b =>
{
b.Navigation("Attachments");
b.Navigation("Headers");
});
modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b =>
{
b.Navigation("Blobs");

3
aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

24
aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/LINGYUN.Abp.Emailing.Platform.csproj

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
<AssemblyName>LINGYUN.Abp.Emailing.Platform</AssemblyName>
<PackageId>LINGYUN.Abp.Emailing.Platform</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Emailing" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Platform.HttpApi.Client\LINGYUN.Platform.HttpApi.Client.csproj" />
</ItemGroup>
</Project>

13
aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/LINGYUN/Abp/Emailing/Platform/AbpEmailingPlatformModule.cs

@ -0,0 +1,13 @@
using LINGYUN.Platform.HttpApi.Client;
using Volo.Abp.Emailing;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Emailing.Platform;
[DependsOn(
typeof(AbpEmailingModule),
typeof(PlatformHttpApiClientModule))]
public class AbpEmailingPlatformModule : AbpModule
{
}

130
aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/LINGYUN/Abp/Emailing/Platform/PlatformEmailSender.cs

@ -0,0 +1,130 @@
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Messages.Integration;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Mail;
using System.Threading.Tasks;
using Volo.Abp.Content;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Emailing;
namespace LINGYUN.Abp.Emailing.Platform;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
public class PlatformEmailSender : IEmailSender
{
private readonly IEmailMessageIntegrationService _service;
public PlatformEmailSender(IEmailMessageIntegrationService service)
{
_service = service;
}
public virtual Task QueueAsync(string to, string subject, string body, bool isBodyHtml = true, AdditionalEmailSendingArgs additionalEmailSendingArgs = null)
{
return SendAsync(from: null, to, subject, body, isBodyHtml, additionalEmailSendingArgs);
}
public virtual Task QueueAsync(string from, string to, string subject, string body, bool isBodyHtml = true, AdditionalEmailSendingArgs additionalEmailSendingArgs = null)
{
return SendAsync(from, to, subject, body, isBodyHtml, additionalEmailSendingArgs);
}
public virtual Task SendAsync(string to, string subject, string body, bool isBodyHtml = true, AdditionalEmailSendingArgs additionalEmailSendingArgs = null)
{
return SendAsync(from: null, to, subject, body, isBodyHtml, additionalEmailSendingArgs);
}
public async virtual Task SendAsync(string from, string to, string subject, string body, bool isBodyHtml = true, AdditionalEmailSendingArgs additionalEmailSendingArgs = null)
{
var createInput = new EmailMessageCreateDto(
to,
body,
from,
subject,
isBodyHtml,
additionalEmailSendingArgs?.CC?.JoinAsString(","))
{
Normalize = true
};
if (additionalEmailSendingArgs?.Attachments != null)
{
var attachments = new List<IRemoteStreamContent>();
foreach (var attachment in additionalEmailSendingArgs.Attachments)
{
var stream = new MemoryStream(attachment.File.Length);
await stream.WriteAsync(attachment.File, 0, attachment.File.Length);
stream.Seek(0, SeekOrigin.Begin);
attachments.Add(new RemoteStreamContent(stream, attachment.Name));
}
createInput.Attachments = attachments.ToArray();
}
if (additionalEmailSendingArgs?.ExtraProperties != null)
{
createInput.ExtraProperties = new ExtraPropertyDictionary();
foreach (var prop in additionalEmailSendingArgs.ExtraProperties)
{
createInput.ExtraProperties.Add(prop.Key, prop.Value);
}
}
await _service.CreateAsync(createInput);
}
public async virtual Task SendAsync(MailMessage mail, bool normalize = true)
{
var createInput = new EmailMessageCreateDto(
mail.To.ToString(),
mail.Body,
mail.From?.ToString(),
mail.Subject,
mail.IsBodyHtml,
mail.CC?.ToString())
{
Normalize = normalize,
Priority = mail.Priority,
BodyTransferEncoding = mail.BodyTransferEncoding,
DeliveryNotificationOptions = mail.DeliveryNotificationOptions
};
if (mail.Attachments != null)
{
var attachments = new List<IRemoteStreamContent>();
foreach (var attachment in mail.Attachments)
{
attachments.Add(
new RemoteStreamContent(
attachment.ContentStream,
attachment.Name,
attachment.ContentType?.ToString()));
}
createInput.Attachments = attachments.ToArray();
}
if (mail.Headers != null)
{
var headers = new List<EmailMessageHeaderDto>();
foreach (var key in mail.Headers.AllKeys)
{
var value = mail.Headers.Get(key);
if (!value.IsNullOrWhiteSpace())
{
headers.Add(new EmailMessageHeaderDto(key, value));
}
}
createInput.Headers = headers;
}
await _service.CreateAsync(createInput);
}
}

51
aspnet-core/modules/platform/LINGYUN.Abp.Emailing.Platform/README.md

@ -0,0 +1,51 @@
# LINGYUN.Abp.Emailing.Platform
abp框架邮件发送接口**IEmailSender**的消息处理平台实现
通过平台服务接口实现邮件消息管理,发送,查询等功能
## 配置使用
模块按需引用
```csharp
[DependsOn(typeof(AbpEmailingPlatformModule))]
public class YouProjectModule : AbpModule
{
// other
}
```
## 配置项说明
```json
{
"RemoteServices": {
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"IdentityClient": "InternalServiceClient",
"UseCurrentAccessToken": "False"
}
},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385",
"ClientId": "InternalServiceClient",
"ClientSecret": "1q2w3e*",
"GrantType": "client_credentials",
"RequireHttps": "False",
"Scope": "lingyun-abp-application"
}
},
}
```
## 相关链接
* [平台服务模块](../README.md)
* [邮件发送集成](https://abp.io/docs/latest/framework/infrastructure/emailing)
* [动态接口代理](https://abp.io/docs/latest/framework/api-development/dynamic-csharp-clients)
## 其他

3
aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

24
aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/LINGYUN.Abp.Sms.Platform.csproj

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
<AssemblyName>LINGYUN.Abp.Sms.Platform</AssemblyName>
<PackageId>LINGYUN.Abp.Sms.Platform</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Sms" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Platform.HttpApi.Client\LINGYUN.Platform.HttpApi.Client.csproj" />
</ItemGroup>
</Project>

13
aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/LINGYUN/Abp/Sms/Platform/AbpSmsPlatformModule.cs

@ -0,0 +1,13 @@
using LINGYUN.Platform.HttpApi.Client;
using Volo.Abp.Modularity;
using Volo.Abp.Sms;
namespace LINGYUN.Abp.Sms.Platform;
[DependsOn(
typeof(AbpSmsModule),
typeof(PlatformHttpApiClientModule))]
public class AbpSmsPlatformModule : AbpModule
{
}

37
aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/LINGYUN/Abp/Sms/Platform/PlatformSmsSender.cs

@ -0,0 +1,37 @@
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Messages.Integration;
using Microsoft.Extensions.DependencyInjection;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Sms;
namespace LINGYUN.Abp.Sms.Platform;
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
public class PlatformSmsSender : ISmsSender
{
private readonly ISmsMessageIntegrationService _service;
public PlatformSmsSender(ISmsMessageIntegrationService service)
{
_service = service;
}
public async virtual Task SendAsync(SmsMessage smsMessage)
{
var createInput = new SmsMessageCreateDto(
smsMessage.PhoneNumber,
smsMessage.Text);
if (smsMessage.Properties != null)
{
createInput.ExtraProperties = new ExtraPropertyDictionary();
foreach (var property in smsMessage.Properties)
{
createInput.ExtraProperties[property.Key] = property.Value;
}
}
await _service.CreateAsync(createInput);
}
}

51
aspnet-core/modules/platform/LINGYUN.Abp.Sms.Platform/README.md

@ -0,0 +1,51 @@
# LINGYUN.Abp.Sms.Platform
abp框架短信发送接口**ISmsSender**的消息处理平台实现
通过平台服务接口实现短信消息管理,发送,查询等功能
## 配置使用
模块按需引用
```csharp
[DependsOn(typeof(AbpSmsPlatformModule))]
public class YouProjectModule : AbpModule
{
// other
}
```
## 配置项说明
```json
{
"RemoteServices": {
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"IdentityClient": "InternalServiceClient",
"UseCurrentAccessToken": "False"
}
},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385",
"ClientId": "InternalServiceClient",
"ClientSecret": "1q2w3e*",
"GrantType": "client_credentials",
"RequireHttps": "False",
"Scope": "lingyun-abp-application"
}
},
}
```
## 相关链接
* [平台服务模块](../README.md)
* [短信发送集成](https://abp.io/docs/latest/framework/infrastructure/sms-sending)
* [动态接口代理](https://abp.io/docs/latest/framework/api-development/dynamic-csharp-clients)
## 其他

5
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN.Platform.Application.Contracts.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
@ -22,7 +22,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" />
<PackageReference Include="Volo.Abp.Authorization.Abstractions" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" />
</ItemGroup>
<ItemGroup>

5
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/en.json

@ -33,6 +33,9 @@
"Permission:ManageBlobs": "Manage Blobs",
"Permission:Feedback": "Feedback",
"Permission:ManageAttachments": "Manage Attachments",
"Permission:ManageComments": "Manage Comments"
"Permission:ManageComments": "Manage Comments",
"Permission:SmsMessage": "Sms Message",
"Permission:EmailMessage": "Email Message",
"Permission:SendMessage": "Send Message"
}
}

5
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json

@ -33,6 +33,9 @@
"Permission:ManageBlobs": "资源管理",
"Permission:Feedback": "反馈管理",
"Permission:ManageAttachments": "附件管理",
"Permission:ManageComments": "评论管理"
"Permission:ManageComments": "评论管理",
"Permission:SmsMessage": "短信消息",
"Permission:EmailMessage": "邮件消息",
"Permission:SendMessage": "发送消息"
}
}

16
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageAttachmentDto.cs

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
namespace LINGYUN.Platform.Messages;
public class EmailMessageAttachmentDto
{
[Required]
[DynamicStringLength(typeof(EmailMessageAttachmentConsts), nameof(EmailMessageAttachmentConsts.MaxNameLength))]
public string Name { get; set; }
[Required]
[DynamicStringLength(typeof(EmailMessageAttachmentConsts), nameof(EmailMessageAttachmentConsts.MaxNameLength))]
public string BlobName { get; set; }
public long Size { get; set; }
}

64
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageCreateDto.cs

@ -0,0 +1,64 @@
using JetBrains.Annotations;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Net.Mail;
using System.Net.Mime;
using Volo.Abp.Auditing;
using Volo.Abp.Content;
using Volo.Abp.Data;
using Volo.Abp.Validation;
namespace LINGYUN.Platform.Messages;
public class EmailMessageCreateDto : IHasExtraProperties
{
[Required]
[DynamicStringLength(typeof(MessageConsts), nameof(MessageConsts.MaxReceiverLength))]
public string To { get; set; }
[Required]
public string Content { get; set; }
[DynamicStringLength(typeof(EmailMessageConsts), nameof(EmailMessageConsts.MaxFromLength))]
public string From { get; set; }
[DynamicStringLength(typeof(EmailMessageConsts), nameof(EmailMessageConsts.MaxSubjectLength))]
public string Subject { get; set; }
public bool IsBodyHtml { get; set; } = true;
[DynamicStringLength(typeof(MessageConsts), nameof(MessageConsts.MaxReceiverLength))]
public string CC { get; set; }
public bool Normalize { get; set; }
public MailPriority? Priority { get; set; }
public TransferEncoding? BodyTransferEncoding { get; set; }
public DeliveryNotificationOptions? DeliveryNotificationOptions { get; set; }
[DisableAuditing]
public IRemoteStreamContent[] Attachments { get; set; }
public List<EmailMessageHeaderDto> Headers { get; set; }
public ExtraPropertyDictionary ExtraProperties { get; set; }
public EmailMessageCreateDto()
{
}
public EmailMessageCreateDto(
[NotNull] string to,
[NotNull] string content,
string from = null,
string subject = null,
bool isBodyHtml = true,
string cc = null)
{
To = to;
Content = content;
From = from;
Subject = subject;
IsBodyHtml = isBodyHtml;
CC = cc;
}
}

19
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageDto.cs

@ -0,0 +1,19 @@
using System.Collections.Generic;
using System.Net.Mail;
using System.Net.Mime;
namespace LINGYUN.Platform.Messages;
public class EmailMessageDto : MessageDto
{
public string From { get; set; }
public string Subject { get; set; }
public bool IsBodyHtml { get; set; }
public string CC { get; set; }
public bool Normalize { get; set; }
public MailPriority? Priority { get; set; }
public TransferEncoding? BodyTransferEncoding { get; set; }
public DeliveryNotificationOptions? DeliveryNotificationOptions { get; set; }
public ICollection<EmailMessageAttachmentDto> Attachments { get; set; }
public List<EmailMessageHeaderDto> Headers { get; set; }
}

16
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageGetListInput.cs

@ -0,0 +1,16 @@
using System;
using System.Net.Mail;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Platform.Messages;
public class EmailMessageGetListInput : PagedAndSortedResultRequestDto
{
public string EmailAddress { get; set; }
public string Content { get; set; }
public string From { get; set; }
public string Subject { get; set; }
public MessageStatus? Status { get; set; }
public MailPriority? Priority { get; set; }
public DateTime? BeginSendTime { get; set; }
public DateTime? EndSendTime { get; set; }
}

27
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/EmailMessageHeaderDto.cs

@ -0,0 +1,27 @@
using JetBrains.Annotations;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
namespace LINGYUN.Platform.Messages;
public class EmailMessageHeaderDto
{
[Required]
[DynamicStringLength(typeof(EmailMessageHeaderConsts), nameof(EmailMessageHeaderConsts.MaxKeyLength))]
public string Key { get; set; }
[Required]
[DynamicStringLength(typeof(EmailMessageHeaderConsts), nameof(EmailMessageHeaderConsts.MaxValueLength))]
public string Value { get; set; }
public EmailMessageHeaderDto()
{
}
public EmailMessageHeaderDto(
[NotNull] string key,
[NotNull] string value)
{
Key = key;
Value = value;
}
}

16
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/MessageDto.cs

@ -0,0 +1,16 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Platform.Messages;
public abstract class MessageDto : AuditedEntityDto<Guid>
{
public Guid? UserId { get; set; }
public string Sender { get; set; }
public string Provider { get; set; }
public string Receiver { get; set; }
public string Content { get; set; }
public DateTime? SendTime { get; set; }
public int SendCount { get; set; }
public MessageStatus Status { get; set; }
public string Reason { get; set; }
}

30
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/SmsMessageCreateDto.cs

@ -0,0 +1,30 @@
using JetBrains.Annotations;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Data;
using Volo.Abp.Validation;
namespace LINGYUN.Platform.Messages;
public class SmsMessageCreateDto : IHasExtraProperties
{
[Required]
[DynamicStringLength(typeof(MessageConsts), nameof(MessageConsts.MaxReceiverLength))]
public string PhoneNumber { get; set; }
[Required]
public string Text { get; set; }
public ExtraPropertyDictionary ExtraProperties { get; set; }
public SmsMessageCreateDto()
{
}
public SmsMessageCreateDto(
[NotNull] string phoneNumber,
[NotNull] string text)
{
PhoneNumber = phoneNumber;
Text = text;
}
}

5
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/SmsMessageDto.cs

@ -0,0 +1,5 @@
namespace LINGYUN.Platform.Messages;
public class SmsMessageDto : MessageDto
{
}

12
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Dto/SmsMessageGetListInput.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Platform.Messages;
public class SmsMessageGetListInput : PagedAndSortedResultRequestDto
{
public string PhoneNumber { get; set; }
public string Content { get; set; }
public MessageStatus? Status { get; set; }
public DateTime? BeginSendTime { get; set; }
public DateTime? EndSendTime { get; set; }
}

33
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/IEmailMessageAppService.cs

@ -0,0 +1,33 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.Platform.Messages;
public interface IEmailMessageAppService : IApplicationService
{
/// <summary>
/// 获取邮件消息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<EmailMessageDto> GetAsync(Guid id);
/// <summary>
/// 删除邮件消息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 发送邮件消息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task SendAsync(Guid id);
/// <summary>
/// 获取邮件消息列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<PagedResultDto<EmailMessageDto>> GetListAsync(EmailMessageGetListInput input);
}

33
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/ISmsMessageAppService.cs

@ -0,0 +1,33 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.Platform.Messages;
public interface ISmsMessageAppService : IApplicationService
{
/// <summary>
/// 获取短信消息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<SmsMessageDto> GetAsync(Guid id);
/// <summary>
/// 删除短信消息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 重新发送短信消息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task SendAsync(Guid id);
/// <summary>
/// 获取短信消息列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<PagedResultDto<SmsMessageDto>> GetListAsync(SmsMessageGetListInput input);
}

16
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Integration/IEmailMessageIntegrationService.cs

@ -0,0 +1,16 @@
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
namespace LINGYUN.Platform.Messages.Integration;
[IntegrationService]
public interface IEmailMessageIntegrationService : IApplicationService
{
/// <summary>
/// 创建邮件消息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<EmailMessageDto> CreateAsync(EmailMessageCreateDto input);
}

16
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Messages/Integration/ISmsMessageIntegrationService.cs

@ -0,0 +1,16 @@
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
namespace LINGYUN.Platform.Messages.Integration;
[IntegrationService]
public interface ISmsMessageIntegrationService : IApplicationService
{
/// <summary>
/// 创建短信消息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<SmsMessageDto> CreateAsync(SmsMessageCreateDto input);
}

8
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissionDefinitionProvider.cs

@ -42,6 +42,14 @@ public class PlatformPermissionDefinitionProvider : PermissionDefinitionProvider
feedback.AddChild(PlatformPermissions.Feedback.Delete, L("Permission:Delete"));
feedback.AddChild(PlatformPermissions.Feedback.ManageAttachments, L("Permission:ManageAttachments"));
feedback.AddChild(PlatformPermissions.Feedback.ManageComments, L("Permission:ManageComments"));
var emailMessage = platform.AddPermission(PlatformPermissions.EmailMessage.Default, L("Permission:EmailMessage"));
emailMessage.AddChild(PlatformPermissions.EmailMessage.SendMessage, L("Permission:SendMessage"));
emailMessage.AddChild(PlatformPermissions.EmailMessage.Delete, L("Permission:Delete"));
var smsMessage = platform.AddPermission(PlatformPermissions.SmsMessage.Default, L("Permission:SmsMessage"));
smsMessage.AddChild(PlatformPermissions.SmsMessage.SendMessage, L("Permission:SendMessage"));
smsMessage.AddChild(PlatformPermissions.SmsMessage.Delete, L("Permission:Delete"));
}
private static LocalizableString L(string name)

242
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Permissions/PlatformPermissions.cs

@ -1,120 +1,138 @@
using Volo.Abp.Reflection;
namespace LINGYUN.Platform.Permissions;
public static class PlatformPermissions
{
public const string GroupName = "Platform";
public class DataDictionary
{
public const string Default = GroupName + ".DataDictionary";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Move = Default + ".Move";
public const string Delete = Default + ".Delete";
public const string ManageItems = Default + ".ManageItems";
}
public class Layout
{
public const string Default = GroupName + ".Layout";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
}
public class Menu
{
public const string Default = GroupName + ".Menu";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string ManageRoles = Default + ".ManageRoles";
using Volo.Abp.Reflection;
namespace LINGYUN.Platform.Permissions;
public static class PlatformPermissions
{
public const string GroupName = "Platform";
public class DataDictionary
{
public const string Default = GroupName + ".DataDictionary";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Move = Default + ".Move";
public const string Delete = Default + ".Delete";
public const string ManageItems = Default + ".ManageItems";
}
public class Layout
{
public const string Default = GroupName + ".Layout";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
}
public class Menu
{
public const string Default = GroupName + ".Menu";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string ManageRoles = Default + ".ManageRoles";
public const string ManageUsers = Default + ".ManageUsers";
public const string ManageUserFavorites = Default + ".ManageUserFavorites";
}
// 如果abp后期提供对象存储的目录管理接口,则启用此权限
/// <summary>
/// 文件系统
/// </summary>
public class FileSystem
{
public const string Default = GroupName + ".FileSystem";
public const string Create = Default + ".Create";
public const string Delete = Default + ".Delete";
public const string Rename = Default + ".Rename";
public const string Copy = Default + ".Copy";
public const string Move = Default + ".Move";
public class FileManager
{
public const string Default = FileSystem.Default + ".FileManager";
public const string Create = Default + ".Create";
public const string Copy = Default + ".Copy";
public const string Delete = Default + ".Delete";
public const string Update = Default + ".Update";
public const string Move = Default + ".Move";
public const string Download = Default + ".Download";
}
}
public class Package
{
public const string Default = GroupName + ".Package";
public const string Create = Default + ".Create";
public const string Delete = Default + ".Delete";
public const string Update = Default + ".Update";
public const string ManageBlobs = Default + ".ManageBlobs";
}
public const string ManageUserFavorites = Default + ".ManageUserFavorites";
}
// 如果abp后期提供对象存储的目录管理接口,则启用此权限
/// <summary>
/// 文件系统
/// </summary>
public class FileSystem
{
public const string Default = GroupName + ".FileSystem";
public const string Create = Default + ".Create";
public const string Delete = Default + ".Delete";
public const string Rename = Default + ".Rename";
public const string Copy = Default + ".Copy";
public const string Move = Default + ".Move";
public class FileManager
{
public const string Default = FileSystem.Default + ".FileManager";
public const string Create = Default + ".Create";
public const string Copy = Default + ".Copy";
public const string Delete = Default + ".Delete";
public const string Update = Default + ".Update";
public const string Move = Default + ".Move";
public const string Download = Default + ".Download";
}
}
public class Package
{
public const string Default = GroupName + ".Package";
public const string Create = Default + ".Create";
public const string Delete = Default + ".Delete";
public const string Update = Default + ".Update";
public const string ManageBlobs = Default + ".ManageBlobs";
}
public class Feedback
{
public const string Default = GroupName + ".Feedback";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
{
public const string Default = GroupName + ".Feedback";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string ManageComments = Default + ".ManageComments";
public const string ManageAttachments = Default + ".ManageAttachments";
}
public static string[] GetAll()
{
return ReflectionHelper.GetPublicConstantsRecursively(typeof(PlatformPermissions));
}
}
}
public class EmailMessage
{
public const string Default = GroupName + ".EmailMessage";
public const string Delete = Default + ".Delete";
public const string SendMessage = Default + ".SendMessage";
}
public class SmsMessage
{
public const string Default = GroupName + ".SmsMessage";
public const string Delete = Default + ".Delete";
public const string SendMessage = Default + ".SendMessage";
}
public static string[] GetAll()
{
return ReflectionHelper.GetPublicConstantsRecursively(typeof(PlatformPermissions));
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/PlatformApplicationContractModule.cs

@ -1,11 +1,16 @@
using LINGYUN.Platform.Localization;
using Volo.Abp.Application;
using Volo.Abp.Authorization;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Platform;
[DependsOn(typeof(PlatformDomainSharedModule))]
[DependsOn(
typeof(AbpDddApplicationContractsModule),
typeof(AbpAuthorizationAbstractionsModule),
typeof(PlatformDomainSharedModule))]
public class PlatformApplicationContractModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)

4
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN.Platform.Application.csproj

@ -12,6 +12,10 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Platform.Application.Contracts\LINGYUN.Platform.Application.Contracts.csproj" />

94
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Messages/EmailMessageAppService.cs

@ -0,0 +1,94 @@
using LINGYUN.Platform.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Platform.Messages;
[Authorize(PlatformPermissions.EmailMessage.Default)]
public class EmailMessageAppService : PlatformApplicationServiceBase, IEmailMessageAppService
{
private readonly IEmailMessageManager _emailMessageManager;
private readonly IEmailMessageRepository _emailMessageRepository;
public EmailMessageAppService(
IEmailMessageManager emailMessageManager,
IEmailMessageRepository emailMessageRepository)
{
_emailMessageManager = emailMessageManager;
_emailMessageRepository = emailMessageRepository;
}
[Authorize(PlatformPermissions.EmailMessage.Delete)]
public async virtual Task DeleteAsync(Guid id)
{
var emailMessage = await _emailMessageRepository.GetAsync(id);
await _emailMessageRepository.DeleteAsync(emailMessage);
await CurrentUnitOfWork.SaveChangesAsync();
}
public async virtual Task<EmailMessageDto> GetAsync(Guid id)
{
var emailMessage = await _emailMessageRepository.GetAsync(id);
return ObjectMapper.Map<EmailMessage, EmailMessageDto>(emailMessage);
}
public async virtual Task<PagedResultDto<EmailMessageDto>> GetListAsync(EmailMessageGetListInput input)
{
var specification = new EmailMessageGetListSpecification(input);
var totalCount = await _emailMessageRepository.GetCountAsync(specification);
var emailMessages = await _emailMessageRepository.GetListAsync(
specification,
input.Sorting,
input.MaxResultCount,
input.SkipCount
);
return new PagedResultDto<EmailMessageDto>(totalCount,
ObjectMapper.Map<List<EmailMessage>, List<EmailMessageDto>>(emailMessages)
);
}
[Authorize(PlatformPermissions.EmailMessage.SendMessage)]
public async virtual Task SendAsync(Guid id)
{
var emailMessage = await _emailMessageRepository.GetAsync(id);
await _emailMessageManager.SendAsync(emailMessage);
await _emailMessageRepository.UpdateAsync(emailMessage);
await CurrentUnitOfWork.SaveChangesAsync();
}
private class EmailMessageGetListSpecification : Volo.Abp.Specifications.Specification<EmailMessage>
{
protected EmailMessageGetListInput Input { get; }
public EmailMessageGetListSpecification(EmailMessageGetListInput input)
{
Input = input;
}
public override Expression<Func<EmailMessage, bool>> ToExpression()
{
Expression<Func<EmailMessage, bool>> expression = _ => true;
return expression
.AndIf(!Input.EmailAddress.IsNullOrWhiteSpace(), x => x.Receiver.Contains(Input.EmailAddress))
.AndIf(!Input.Subject.IsNullOrWhiteSpace(), x => x.Subject.Contains(Input.Subject))
.AndIf(!Input.Content.IsNullOrWhiteSpace(), x => x.Content.Contains(Input.Content))
.AndIf(!Input.From.IsNullOrWhiteSpace(), x => x.From.Contains(Input.From))
.AndIf(Input.Status.HasValue, x => x.Status == Input.Status)
.AndIf(Input.Priority.HasValue, x => x.Priority == Input.Priority)
.AndIf(Input.BeginSendTime.HasValue, x => x.SendTime >= Input.BeginSendTime)
.AndIf(Input.EndSendTime.HasValue, x => x.SendTime <= Input.EndSendTime);
}
}
}

65
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Messages/Integration/EmailMessageIntegrationService.cs

@ -0,0 +1,65 @@
using System.Threading.Tasks;
using Volo.Abp.BlobStoring;
namespace LINGYUN.Platform.Messages.Integration;
public class EmailMessageIntegrationService : PlatformApplicationServiceBase, IEmailMessageIntegrationService
{
private readonly IBlobContainer<MessagingContainer> _blobContainer;
private readonly IEmailMessageRepository _emailMessageRepository;
public EmailMessageIntegrationService(
IBlobContainer<MessagingContainer> blobContainer,
IEmailMessageRepository emailMessageRepository)
{
_blobContainer = blobContainer;
_emailMessageRepository = emailMessageRepository;
}
public async virtual Task<EmailMessageDto> CreateAsync(EmailMessageCreateDto input)
{
var emailMessage = new EmailMessage(
GuidGenerator.Create(),
input.To,
input.From,
input.Subject,
input.Content,
input.IsBodyHtml,
input.CC,
CurrentUser.Id,
CurrentUser.UserName)
{
Normalize = input.Normalize,
Priority = input.Priority,
BodyTransferEncoding = input.BodyTransferEncoding,
DeliveryNotificationOptions = input.DeliveryNotificationOptions
};
if (input.Headers != null)
{
foreach (var header in input.Headers)
{
emailMessage.AddHeader(header.Key, header.Value);
}
}
if (input.Attachments != null)
{
foreach (var attachment in input.Attachments)
{
var attachmentStream = attachment.GetStream();
var attachmentNamePrefix = $"attachments/{Clock.Now:yyyy-MM-dd}";
var attachmentName = $"{attachmentNamePrefix}/{emailMessage.Id}/{attachment.FileName}";
await _blobContainer.SaveAsync(attachmentName, attachmentStream, overrideExisting: true);
emailMessage.AddAttachment(attachment.FileName, attachmentName, attachmentStream.Length);
}
}
emailMessage = await _emailMessageRepository.InsertAsync(emailMessage);
await CurrentUnitOfWork.SaveChangesAsync();
return ObjectMapper.Map<EmailMessage, EmailMessageDto>(emailMessage);
}
}

38
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Messages/Integration/SmsMessageIntegrationService.cs

@ -0,0 +1,38 @@
using System.Threading.Tasks;
using Volo.Abp.Data;
namespace LINGYUN.Platform.Messages.Integration;
public class SmsMessageIntegrationService : PlatformApplicationServiceBase, ISmsMessageIntegrationService
{
private readonly ISmsMessageRepository _smsMessageRepository;
public SmsMessageIntegrationService(ISmsMessageRepository smsMessageRepository)
{
_smsMessageRepository = smsMessageRepository;
}
public async virtual Task<SmsMessageDto> CreateAsync(SmsMessageCreateDto input)
{
var smsMessage = new SmsMessage(
GuidGenerator.Create(),
input.PhoneNumber,
input.Text,
CurrentUser.Id,
CurrentUser.UserName
);
if (input.ExtraProperties != null)
{
foreach (var prop in input.ExtraProperties)
{
smsMessage.SetProperty(prop.Key, prop.Value);
}
}
smsMessage = await _smsMessageRepository.InsertAsync(smsMessage);
await CurrentUnitOfWork.SaveChangesAsync();
return ObjectMapper.Map<SmsMessage, SmsMessageDto>(smsMessage);
}
}

91
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Messages/SmsMessageAppService.cs

@ -0,0 +1,91 @@
using LINGYUN.Platform.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Platform.Messages;
[Authorize(PlatformPermissions.SmsMessage.Default)]
public class SmsMessageAppService : PlatformApplicationServiceBase, ISmsMessageAppService
{
private readonly ISmsMessageManager _smsMessageManager;
private readonly ISmsMessageRepository _smsMessageRepository;
public SmsMessageAppService(
ISmsMessageManager smsMessageManager,
ISmsMessageRepository smsMessageRepository)
{
_smsMessageManager = smsMessageManager;
_smsMessageRepository = smsMessageRepository;
}
[Authorize(PlatformPermissions.SmsMessage.Delete)]
public async virtual Task DeleteAsync(Guid id)
{
var smsMessage = await _smsMessageRepository.GetAsync(id);
await _smsMessageRepository.DeleteAsync(smsMessage);
await CurrentUnitOfWork.SaveChangesAsync();
}
public async virtual Task<SmsMessageDto> GetAsync(Guid id)
{
var smsMessage = await _smsMessageRepository.GetAsync(id);
return ObjectMapper.Map<SmsMessage, SmsMessageDto>(smsMessage);
}
public async virtual Task<PagedResultDto<SmsMessageDto>> GetListAsync(SmsMessageGetListInput input)
{
var specification = new SmsMessageGetListSpecification(input);
var totalCount = await _smsMessageRepository.GetCountAsync(specification);
var smsMessages = await _smsMessageRepository.GetListAsync(
specification,
input.Sorting,
input.MaxResultCount,
input.SkipCount
);
return new PagedResultDto<SmsMessageDto>(totalCount,
ObjectMapper.Map<List<SmsMessage>, List<SmsMessageDto>>(smsMessages)
);
}
[Authorize(PlatformPermissions.SmsMessage.SendMessage)]
public async virtual Task SendAsync(Guid id)
{
var smsMessage = await _smsMessageRepository.GetAsync(id);
await _smsMessageManager.SendAsync(smsMessage);
await _smsMessageRepository.UpdateAsync(smsMessage);
await CurrentUnitOfWork.SaveChangesAsync();
}
private class SmsMessageGetListSpecification : Volo.Abp.Specifications.Specification<SmsMessage>
{
protected SmsMessageGetListInput Input { get; }
public SmsMessageGetListSpecification(SmsMessageGetListInput input)
{
Input = input;
}
public override Expression<Func<SmsMessage, bool>> ToExpression()
{
Expression<Func<SmsMessage, bool>> expression = _ => true;
return expression
.AndIf(!Input.PhoneNumber.IsNullOrWhiteSpace(), x => x.Receiver.Contains(Input.PhoneNumber))
.AndIf(!Input.Content.IsNullOrWhiteSpace(), x => x.Content.Contains(Input.Content))
.AndIf(Input.Status.HasValue, x => x.Status == Input.Status)
.AndIf(Input.BeginSendTime.HasValue, x => x.SendTime >= Input.BeginSendTime)
.AndIf(Input.EndSendTime.HasValue, x => x.SendTime <= Input.EndSendTime);
}
}
}

6
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationMappingProfile.cs

@ -3,6 +3,7 @@ using LINGYUN.Platform.Datas;
using LINGYUN.Platform.Feedbacks;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
namespace LINGYUN.Platform;
@ -26,5 +27,10 @@ public class PlatformApplicationMappingProfile : Profile
CreateMap<Feedback, FeedbackDto>();
CreateMap<FeedbackComment, FeedbackCommentDto>();
CreateMap<FeedbackAttachment, FeedbackAttachmentDto>();
CreateMap<EmailMessageAttachment, EmailMessageAttachmentDto>();
CreateMap<EmailMessageHeader, EmailMessageHeaderDto>();
CreateMap<EmailMessage, EmailMessageDto>();
CreateMap<SmsMessage, SmsMessageDto>();
}
}

6
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationModule.cs

@ -1,10 +1,14 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.Platform;
[DependsOn(typeof(PlatformApplicationContractModule))]
[DependsOn(
typeof(PlatformApplicationContractModule),
typeof(PlatformDomainModule),
typeof(AbpDddApplicationModule))]
public class PlatformApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)

33
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/en.json

@ -14,6 +14,8 @@
"Platform:05102": "Cannot add duplicate attachments {Name}!",
"Platform:05103": "User feedback: Attachment named {Name} not found!",
"Platform:05104": "Attachment {Name} is invalid, please upload again!",
"Platform:06101": "Duplicate headers cannot be added {Key}!",
"Platform:06102": "Duplicate attachments cannot be added {Name}!",
"UploadFileSizeBeyondLimit": "Upload file size cannot exceed {0} MB!",
"NotAllowedFileExtensionName": "Not allowed file extension: {0}!",
"DisplayName:VersionFileLimitLength": "File limit size",
@ -55,6 +57,30 @@
"DisplayName:DownloadCount": "Download Count",
"DisplayName:File": "File",
"DisplayName:Blobs": "Blobs",
"DisplayName:Subject": "Subject",
"DisplayName:Content": "Content",
"DisplayName:From": "From",
"DisplayName:Receiver": "Receiver",
"DisplayName:Status": "Status",
"DisplayName:CreationTime": "Creation Time",
"DisplayName:SendTime": "Send Time",
"DisplayName:SendCount": "Send Count",
"DisplayName:Reason": "Reason",
"DisplayName:Provider": "Provider",
"DisplayName:IsBodyHtml": "Is Body Html",
"DisplayName:CC": "CC",
"DisplayName:Priority": "Priority",
"DisplayName:Attachments": "Attachments",
"DisplayName:Headers": "Headers",
"DisplayName:BlobName": "Blob Name",
"DisplayName:Key": "Key",
"DisplayName:Value": "Value",
"MailPriority:Normal": "Normal",
"MailPriority:Low": "Low",
"MailPriority:High": "High",
"MessageStatus:Pending": "Pending",
"MessageStatus:Sent": "Sent",
"MessageStatus:Failed": "Failed",
"Layout:AddNew": "Add New",
"Layout:Edit": "Edit",
"Layout:EditByName": "Edit Layout - {0}",
@ -83,6 +109,11 @@
"FeedbackStatus:Created": "Created",
"FeedbackStatus:InProgress": "Pending",
"FeedbackStatus:Closed": "Closed",
"FeedbackStatus:Resolved": "Resolved"
"FeedbackStatus:Resolved": "Resolved",
"EmailMessages": "Email Messages",
"SmsMessages": "Sms Messages",
"SendMessage": "Send Message",
"MessageWillBeReSendWarningMessage": "The selected message will be resend.",
"SuccessfullySent": "Successfully Sent, Please check the status later in the message center!"
}
}

33
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Localization/Resources/zh-Hans.json

@ -14,6 +14,8 @@
"Platform:05102": "不能添加重复的附件 {Name}!",
"Platform:05103": "用户反馈未找到名为 {Name} 的附件!",
"Platform:05104": "附件 {Name} 已失效, 请重新上传!",
"Platform:06101": "不能添加重复的标头 {Key}!",
"Platform:06102": "不能添加重复的附件 {Name}!",
"UploadFileSizeBeyondLimit": "上传文件大小不能超过 {0} MB!",
"NotAllowedFileExtensionName": "不被允许的文件扩展名: {0}!",
"DisplayName:VersionFileLimitLength": "文件限制大小",
@ -55,6 +57,30 @@
"DisplayName:DownloadCount": "下载次数",
"DisplayName:File": "上传文件",
"DisplayName:Blobs": "资源文件",
"DisplayName:Subject": "标题",
"DisplayName:Content": "内容",
"DisplayName:From": "发送方",
"DisplayName:Receiver": "接收方",
"DisplayName:Status": "状态",
"DisplayName:CreationTime": "创建时间",
"DisplayName:SendTime": "发送时间",
"DisplayName:SendCount": "发送次数",
"DisplayName:Reason": "原因",
"DisplayName:Provider": "提供者",
"DisplayName:IsBodyHtml": "是否html内容",
"DisplayName:CC": "抄送",
"DisplayName:Priority": "优先级",
"DisplayName:Attachments": "附件",
"DisplayName:Headers": "标头",
"DisplayName:BlobName": "存储名称",
"DisplayName:Key": "键名",
"DisplayName:Value": "键值",
"MailPriority:Normal": "普通",
"MailPriority:Low": "低",
"MailPriority:High": "高",
"MessageStatus:Pending": "未发送",
"MessageStatus:Sent": "已发送",
"MessageStatus:Failed": "发送失败",
"Layout:AddNew": "添加新布局",
"Layout:Edit": "编辑布局",
"Layout:EditByName": "编辑布局 - {0}",
@ -83,6 +109,11 @@
"FeedbackStatus:Created": "新增",
"FeedbackStatus:InProgress": "处理中",
"FeedbackStatus:Closed": "已关闭",
"FeedbackStatus:Resolved": "已解决"
"FeedbackStatus:Resolved": "已解决",
"EmailMessages": "邮件消息",
"SmsMessages": "短信消息",
"SendMessage": "发送消息",
"MessageWillBeReSendWarningMessage": "将重新发送选择的消息.",
"SuccessfullySent": "发送成功,请稍后在消息中心查看状态!"
}
}

5
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/EmailMessageAttachmentConsts.cs

@ -0,0 +1,5 @@
namespace LINGYUN.Platform.Messages;
public static class EmailMessageAttachmentConsts
{
public static int MaxNameLength { get; set; } = 256;
}

6
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/EmailMessageConsts.cs

@ -0,0 +1,6 @@
namespace LINGYUN.Platform.Messages;
public static class EmailMessageConsts
{
public static int MaxFromLength { get; set; } = 128;
public static int MaxSubjectLength { get; set; } = 128;
}

10
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/EmailMessageEto.cs

@ -0,0 +1,10 @@
using Volo.Abp.EventBus;
namespace LINGYUN.Platform.Messages;
[EventName("platform.messages.email")]
public class EmailMessageEto : MessageEto
{
public string From { get; set; }
public string Subject { get; set; }
}

6
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/EmailMessageHeaderConsts.cs

@ -0,0 +1,6 @@
namespace LINGYUN.Platform.Messages;
public static class EmailMessageHeaderConsts
{
public static int MaxKeyLength { get; set; } = 64;
public static int MaxValueLength { get; set; } = 128;
}

8
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/MessageConsts.cs

@ -0,0 +1,8 @@
namespace LINGYUN.Platform.Messages;
public static class MessageConsts
{
public static int MaxSenderLength { get; set; } = 256;
public static int MaxReceiverLength { get; set; } = 1024;
public static int MaxProviderLength { get; set; } = 128;
public static int MaxReasonLength { get; set; } = 256;
}

12
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/MessageEto.cs

@ -0,0 +1,12 @@
using System;
namespace LINGYUN.Platform.Messages;
public abstract class MessageEto
{
public Guid Id { get; set; }
public Guid? UserId { get; set; }
public string Sender { get; set; }
public DateTime CreationTime { get; set; }
public Guid? CreatorId { get; set; }
public MessageStatus Status { get; set; }
}

16
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/MessageStatus.cs

@ -0,0 +1,16 @@
namespace LINGYUN.Platform.Messages;
public enum MessageStatus
{
/// <summary>
/// 未发送
/// </summary>
Pending = -1,
/// <summary>
/// 已发送
/// </summary>
Sent = 0,
/// <summary>
/// 发送失败
/// </summary>
Failed = 10
}

8
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/Messages/SmsMessageEto.cs

@ -0,0 +1,8 @@
using Volo.Abp.EventBus;
namespace LINGYUN.Platform.Messages;
[EventName("platform.messages.sms")]
public class SmsMessageEto : MessageEto
{
}

8
aspnet-core/modules/platform/LINGYUN.Platform.Domain.Shared/LINGYUN/Platform/PlatformErrorCodes.cs

@ -53,4 +53,12 @@ public static class PlatformErrorCodes
/// 附件 {Name} 已失效, 请重新上传!
/// </summary>
public const string FeedackAttachmentLoseEffectiveness = Namespace + ":05104";
/// <summary>
/// 不能添加重复的标头 {Key}!
/// </summary>
public const string DuplicateEmailMessageHeader = Namespace + ":06101";
/// <summary>
/// 不能添加重复的附件 {Name}!
/// </summary>
public const string DuplicateEmailMessageAttachment = Namespace + ":06102";
}

2
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN.Platform.Domain.csproj

@ -19,6 +19,8 @@
<PackageReference Include="Volo.Abp.BlobStoring" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
<PackageReference Include="Volo.Abp.Settings" />
<PackageReference Include="Volo.Abp.Sms" />
<PackageReference Include="Volo.Abp.Emailing" />
</ItemGroup>
<ItemGroup>

87
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessage.cs

@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using Volo.Abp;
namespace LINGYUN.Platform.Messages;
public class EmailMessage : Message
{
public virtual string From { get; set; }
public virtual string Subject { get; private set; }
public virtual bool IsBodyHtml { get; private set; }
public virtual string CC { get; private set; }
public virtual bool Normalize { get; set; }
public virtual MailPriority? Priority { get; set; }
public virtual TransferEncoding? BodyTransferEncoding { get; set; }
public virtual DeliveryNotificationOptions? DeliveryNotificationOptions { get; set; }
public virtual ICollection<EmailMessageAttachment> Attachments { get; private set; }
public virtual ICollection<EmailMessageHeader> Headers { get; private set; }
protected EmailMessage()
{
Headers = new Collection<EmailMessageHeader>();
Attachments = new Collection<EmailMessageAttachment>();
}
public EmailMessage(
Guid id,
string to,
string from,
string subject,
string body,
bool isBodyHtml = false,
string cc = null,
Guid? userId = null,
string userName = null)
: base(id, to, body, userId, userName)
{
From = Check.Length(from, nameof(from), EmailMessageConsts.MaxFromLength);
Subject = Check.Length(subject, nameof(subject), EmailMessageConsts.MaxSubjectLength);
IsBodyHtml = isBodyHtml;
CC = Check.Length(cc, nameof(cc), MessageConsts.MaxReceiverLength);
Headers = new Collection<EmailMessageHeader>();
Attachments = new Collection<EmailMessageAttachment>();
}
public bool IsInAttachment(string name)
{
return Attachments.Any(x => x.Name == name);
}
public void RemoveAttachment(string name)
{
Attachments.RemoveAll(x => x.Name == name);
}
public void AddAttachment(string name, string blobName, long size)
{
if (IsInAttachment(name))
{
throw new BusinessException(PlatformErrorCodes.DuplicateEmailMessageAttachment)
.WithData("Name", name);
}
Attachments.Add(new EmailMessageAttachment(Id, name, blobName, size));
}
public bool IsInHeader(string key)
{
return Headers.Any(x => x.Key == key);
}
public void RemoveHeader(string key)
{
Headers.RemoveAll(x => x.Key == key);
}
public void AddHeader(string key, string value)
{
if (IsInHeader(key))
{
throw new BusinessException(PlatformErrorCodes.DuplicateEmailMessageHeader)
.WithData("Key", key);
}
Headers.Add(new EmailMessageHeader(Id, key, value));
}
}

23
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessageAttachment.cs

@ -0,0 +1,23 @@
using System;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
namespace LINGYUN.Platform.Messages;
public class EmailMessageAttachment : Entity<long>
{
public virtual Guid MessageId { get; private set; }
public virtual string Name { get; private set; }
public virtual string BlobName { get; private set; }
public virtual long Size { get; private set; }
protected EmailMessageAttachment()
{
}
public EmailMessageAttachment(Guid messageId, string name, string blobName, long size)
{
MessageId = messageId;
Name = Check.NotNullOrWhiteSpace(name, nameof(name), EmailMessageAttachmentConsts.MaxNameLength);
BlobName = Check.NotNullOrWhiteSpace(blobName, nameof(blobName), EmailMessageAttachmentConsts.MaxNameLength);
Size = size;
}
}

20
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessageHeader.cs

@ -0,0 +1,20 @@
using System;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
namespace LINGYUN.Platform.Messages;
public class EmailMessageHeader : Entity<long>
{
public virtual Guid MessageId { get; private set; }
public virtual string Key { get; private set; }
public virtual string Value { get; private set; }
protected EmailMessageHeader()
{
}
public EmailMessageHeader(Guid messageId, string key, string value)
{
MessageId = messageId;
Key = Check.NotNullOrWhiteSpace(key, nameof(key), EmailMessageHeaderConsts.MaxKeyLength);
Value = Check.NotNullOrWhiteSpace(value, nameof(value), EmailMessageHeaderConsts.MaxValueLength);
}
}

134
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessageManager.cs

@ -0,0 +1,134 @@
using Microsoft.Extensions.Logging;
using System;
using System.IO;
using System.Net.Mail;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Volo.Abp.BlobStoring;
using Volo.Abp.Domain.Services;
using Volo.Abp.DynamicProxy;
using Volo.Abp.Emailing;
using Volo.Abp.Settings;
namespace LINGYUN.Platform.Messages;
public class EmailMessageManager : DomainService, IEmailMessageManager
{
private const string FromAddressPattern = @"([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})";
protected ISettingProvider SettingProvider { get; }
protected IEmailMessageRepository Repository { get; }
protected IBlobContainer<MessagingContainer> BlobContainer { get; }
public EmailMessageManager(
ISettingProvider settingProvider,
IEmailMessageRepository repository,
IBlobContainer<MessagingContainer> blobContainer)
{
SettingProvider = settingProvider;
Repository = repository;
BlobContainer = blobContainer;
}
public async virtual Task<EmailMessage> SendAsync(EmailMessage message)
{
var emailSender = GetEmailSender();
message.Provider = ProxyHelper.GetUnProxiedType(emailSender).Name;
var error = await TrySendAsync(emailSender, message);
if (error.IsNullOrWhiteSpace())
{
message.Sent(Clock);
}
else
{
message.Failed(error, Clock);
}
return message;
}
public async virtual Task<string> TrySendAsync(IEmailSender emailSender, EmailMessage message)
{
try
{
MailAddress from;
if (message.From.IsNullOrWhiteSpace())
{
var defaultFrom = await SettingProvider.GetOrNullAsync(EmailSettingNames.DefaultFromAddress);
var defaultFromDisplayName = await SettingProvider.GetOrNullAsync(EmailSettingNames.DefaultFromDisplayName);
from = new MailAddress(defaultFrom, defaultFromDisplayName);
message.From = $"{defaultFrom}{(defaultFromDisplayName.IsNullOrWhiteSpace() ? "" : $"<{defaultFromDisplayName}>")}";
}
else
{
var match = Regex.Match(message.From, FromAddressPattern);
if (match.Success)
{
from = new MailAddress(match.Value);
}
else
{
from = new MailAddress(message.From);
}
}
var to = new MailAddress(message.Receiver);
var mailMessage = new MailMessage(from, to)
{
Subject = message.Subject,
Body = message.Content,
IsBodyHtml = message.IsBodyHtml,
};
if (!message.CC.IsNullOrWhiteSpace())
{
mailMessage.CC.Add(message.CC);
}
if (message.Priority.HasValue)
{
mailMessage.Priority = message.Priority.Value;
}
if (message.BodyTransferEncoding.HasValue)
{
mailMessage.BodyTransferEncoding = message.BodyTransferEncoding.Value;
}
if (message.DeliveryNotificationOptions.HasValue)
{
mailMessage.DeliveryNotificationOptions = message.DeliveryNotificationOptions.Value;
}
foreach (var header in message.Headers)
{
mailMessage.Headers.Add(header.Key, header.Value);
}
foreach (var attachment in message.Attachments)
{
var blob = await BlobContainer.GetOrNullAsync(attachment.BlobName);
if (blob != null && blob != Stream.Null)
{
mailMessage.Attachments.Add(new Attachment(blob, attachment.Name));
}
}
await emailSender.SendAsync(mailMessage, message.Normalize);
return null;
}
catch(Exception ex)
{
Logger.LogWarning("Failed to send a email message, error: {message}", ex.ToString());
return ex.Message;
}
}
protected virtual IEmailSender GetEmailSender()
{
return LazyServiceProvider.LazyGetRequiredService<IEmailSender>();
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/IEmailMessageManager.cs

@ -0,0 +1,7 @@
using System.Threading.Tasks;
namespace LINGYUN.Platform.Messages;
public interface IEmailMessageManager
{
Task<EmailMessage> SendAsync(EmailMessage message);
}

21
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/IEmailMessageRepository.cs

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Specifications;
namespace LINGYUN.Platform.Messages;
public interface IEmailMessageRepository : IBasicRepository<EmailMessage, Guid>
{
Task<int> GetCountAsync(
ISpecification<EmailMessage> specification,
CancellationToken cancellationToken = default);
Task<List<EmailMessage>> GetListAsync(
ISpecification<EmailMessage> specification,
string sorting = $"{nameof(Message.CreationTime)} DESC",
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default);
}

7
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/ISmsMessageManager.cs

@ -0,0 +1,7 @@
using System.Threading.Tasks;
namespace LINGYUN.Platform.Messages;
public interface ISmsMessageManager
{
Task<SmsMessage> SendAsync(SmsMessage message);
}

21
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/ISmsMessageRepository.cs

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Specifications;
namespace LINGYUN.Platform.Messages;
public interface ISmsMessageRepository : IBasicRepository<SmsMessage, Guid>
{
Task<int> GetCountAsync(
ISpecification<SmsMessage> specification,
CancellationToken cancellationToken = default);
Task<List<SmsMessage>> GetListAsync(
ISpecification<SmsMessage> specification,
string sorting = $"{nameof(Message.CreationTime)} DESC",
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default);
}

56
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/Message.cs

@ -0,0 +1,56 @@
using System;
using Volo.Abp;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Timing;
namespace LINGYUN.Platform.Messages;
public class Message : AuditedAggregateRoot<Guid>
{
public virtual Guid? UserId { get; private set; }
public virtual string Sender { get; private set; }
public virtual string Provider { get; set; }
public virtual string Receiver { get; private set; }
public virtual string Content { get; private set; }
public virtual DateTime? SendTime { get; private set; }
public virtual int SendCount { get; private set; }
public virtual MessageStatus Status { get; private set; }
public virtual string Reason { get; private set; }
protected Message()
{
}
public Message(
Guid id,
string receiver,
string content,
Guid? userId = null,
string userName = null)
: base(id)
{
Receiver = Check.NotNullOrWhiteSpace(receiver, nameof(receiver), MessageConsts.MaxReceiverLength);
Content = content;
UserId = userId;
Sender = Check.Length(userName, nameof(userName), MessageConsts.MaxSenderLength);
SendCount = 0;
Status = MessageStatus.Pending;
}
public void Sent(IClock clock)
{
SendCount += 1;
SendTime = clock.Now;
Status = MessageStatus.Sent;
Reason = "";
}
public void Failed(string error, IClock clock)
{
SendTime = clock.Now;
Status = MessageStatus.Failed;
Reason = error.Truncate(MessageConsts.MaxReasonLength);
}
}

8
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/MessagingContainer.cs

@ -0,0 +1,8 @@
using Volo.Abp.BlobStoring;
namespace LINGYUN.Platform.Messages;
[BlobContainerName("messaging")]
public class MessagingContainer
{
}

18
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/SmsMessage.cs

@ -0,0 +1,18 @@
using System;
namespace LINGYUN.Platform.Messages;
public class SmsMessage : Message
{
protected SmsMessage()
{
}
public SmsMessage(
Guid id,
string phoneNumber,
string content,
Guid? userId = null,
string userName = null)
: base(id, phoneNumber, content, userId, userName)
{
}
}

66
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/SmsMessageManager.cs

@ -0,0 +1,66 @@
using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks;
using Volo.Abp.Domain.Services;
using Volo.Abp.DynamicProxy;
using Volo.Abp.Sms;
namespace LINGYUN.Platform.Messages;
public class SmsMessageManager : DomainService, ISmsMessageManager
{
protected ISmsMessageRepository Repository { get; }
public SmsMessageManager(ISmsMessageRepository repository)
{
Repository = repository;
}
public async virtual Task<SmsMessage> SendAsync(SmsMessage message)
{
var smsSender = GetSmsSender();
message.Provider = ProxyHelper.GetUnProxiedType(smsSender).Name;
var error = await TrySendAsync(smsSender, message);
if (error.IsNullOrWhiteSpace())
{
message.Sent(Clock);
}
else
{
message.Failed(error, Clock);
}
return message;
}
public async virtual Task<string> TrySendAsync(ISmsSender smsSender, SmsMessage message)
{
try
{
var smsMessage = new Volo.Abp.Sms.SmsMessage(
message.Receiver,
message.Content);
foreach (var prop in message.ExtraProperties)
{
smsMessage.Properties.Add(prop.Key, prop.Value);
}
await smsSender.SendAsync(smsMessage);
return null;
}
catch (Exception ex)
{
Logger.LogWarning("Failed to send a short message, error: {message}", ex.ToString());
return ex.Message;
}
}
protected virtual ISmsSender GetSmsSender()
{
return LazyServiceProvider.LazyGetRequiredService<ISmsSender>();
}
}

38
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainMappingProfile.cs

@ -1,20 +1,24 @@
using AutoMapper;
using AutoMapper;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
namespace LINGYUN.Platform;
public class PlatformDomainMappingProfile : Profile
{
public PlatformDomainMappingProfile()
{
CreateMap<Layout, LayoutEto>();
CreateMap<Menu, MenuEto>();
CreateMap<UserMenu, UserMenuEto>();
CreateMap<RoleMenu, RoleMenuEto>();
CreateMap<Package, PackageEto>();
}
}
namespace LINGYUN.Platform;
public class PlatformDomainMappingProfile : Profile
{
public PlatformDomainMappingProfile()
{
CreateMap<Layout, LayoutEto>();
CreateMap<Menu, MenuEto>();
CreateMap<UserMenu, UserMenuEto>();
CreateMap<RoleMenu, RoleMenuEto>();
CreateMap<Package, PackageEto>();
CreateMap<EmailMessage, EmailMessageEto>();
CreateMap<SmsMessage, SmsMessageEto>();
}
}

16
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainModule.cs

@ -1,6 +1,7 @@
using LINGYUN.Platform.Datas;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.ObjectExtending;
using LINGYUN.Platform.Packages;
using LINGYUN.Platform.Routes;
@ -8,16 +9,21 @@ using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.BlobStoring;
using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.Emailing;
using Volo.Abp.EventBus;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending.Modularity;
using Volo.Abp.Sms;
using SmsMessage = LINGYUN.Platform.Messages.SmsMessage;
namespace LINGYUN.Platform;
[DependsOn(
typeof(PlatformDomainSharedModule),
typeof(AbpSmsModule),
typeof(AbpEmailingModule),
typeof(AbpEventBusModule),
typeof(AbpBlobStoringModule),
typeof(AbpEventBusModule))]
typeof(PlatformDomainSharedModule))]
public class PlatformDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
@ -51,6 +57,12 @@ public class PlatformDomainModule : AbpModule
options.EtoMappings.Add<RoleMenu, RoleMenuEto>(typeof(PlatformDomainModule));
options.EtoMappings.Add<Package, PackageEto>(typeof(PlatformDomainModule));
options.EtoMappings.Add<EmailMessage, EmailMessageEto>(typeof(PlatformDomainModule));
options.EtoMappings.Add<SmsMessage, SmsMessageEto>(typeof(PlatformDomainModule));
options.AutoEventSelectors.Add<EmailMessage>();
options.AutoEventSelectors.Add<SmsMessage>();
});
}
public override void PostConfigureServices(ServiceConfigurationContext context)

3
aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/EntityFrameworkCore/IPlatformDbContext.cs

@ -1,6 +1,7 @@
using LINGYUN.Platform.Datas;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
using LINGYUN.Platform.Portal;
using Microsoft.EntityFrameworkCore;
@ -22,4 +23,6 @@ public interface IPlatformDbContext : IEfCoreDbContext
DbSet<Package> Packages { get; }
DbSet<PackageBlob> PackageBlobs { get; }
DbSet<Enterprise> Enterprises { get; }
DbSet<EmailMessage> EmailMessages { get; }
DbSet<SmsMessage> SmsMessages { get; }
}

3
aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/EntityFrameworkCore/PlatformDbContext.cs

@ -1,6 +1,7 @@
using LINGYUN.Platform.Datas;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
using LINGYUN.Platform.Portal;
using Microsoft.EntityFrameworkCore;
@ -22,6 +23,8 @@ public class PlatformDbContext : AbpDbContext<PlatformDbContext>, IPlatformDbCon
public DbSet<Package> Packages { get; set; }
public DbSet<PackageBlob> PackageBlobs { get; set; }
public DbSet<Enterprise> Enterprises { get; set; }
public DbSet<EmailMessage> EmailMessages { get; set; }
public DbSet<SmsMessage> SmsMessages { get; set; }
public PlatformDbContext(DbContextOptions<PlatformDbContext> options)
: base(options)
{

97
aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/EntityFrameworkCore/PlatformDbContextModelBuilderExtensions.cs

@ -3,6 +3,7 @@ using LINGYUN.Platform.Datas;
using LINGYUN.Platform.Feedbacks;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
using LINGYUN.Platform.Portal;
using LINGYUN.Platform.Routes;
@ -332,6 +333,102 @@ public static class PlatformDbContextModelBuilderExtensions
x.ConfigureByConvention();
});
builder.Entity<EmailMessage>(x =>
{
x.ToTable(options.TablePrefix + "EmailMessages", options.Schema);
x.Property(p => p.Receiver)
.HasColumnName(nameof(EmailMessage.Receiver))
.HasMaxLength(MessageConsts.MaxReceiverLength)
.IsRequired(true);
x.Property(p => p.Content)
.HasColumnName(nameof(EmailMessage.Content))
.IsRequired(true);
x.Property(p => p.From)
.HasColumnName(nameof(EmailMessage.From))
.HasMaxLength(EmailMessageConsts.MaxFromLength);
x.Property(p => p.Subject)
.HasColumnName(nameof(EmailMessage.Subject))
.HasMaxLength(EmailMessageConsts.MaxSubjectLength);
x.Property(p => p.CC)
.HasColumnName(nameof(EmailMessage.CC))
.HasMaxLength(MessageConsts.MaxReceiverLength);
x.Property(p => p.Sender)
.HasColumnName(nameof(EmailMessage.Sender))
.HasMaxLength(MessageConsts.MaxSenderLength);
x.Property(p => p.Provider)
.HasColumnName(nameof(EmailMessage.Provider))
.HasMaxLength(MessageConsts.MaxProviderLength);
x.Property(p => p.Reason)
.HasColumnName(nameof(EmailMessage.Reason))
.HasMaxLength(MessageConsts.MaxReasonLength);
x.HasMany(p => p.Attachments)
.WithOne()
.HasForeignKey(fk => fk.MessageId);
x.HasMany(p => p.Headers)
.WithOne()
.HasForeignKey(fk => fk.MessageId);
x.ConfigureByConvention();
});
builder.Entity<EmailMessageAttachment>(x =>
{
x.ToTable(options.TablePrefix + "EmailMessageAttachments", options.Schema);
x.Property(p => p.Name)
.HasColumnName(nameof(EmailMessageAttachment.Name))
.HasMaxLength(EmailMessageAttachmentConsts.MaxNameLength)
.IsRequired(true);
x.Property(p => p.BlobName)
.HasColumnName(nameof(EmailMessageAttachment.BlobName))
.HasMaxLength(EmailMessageAttachmentConsts.MaxNameLength)
.IsRequired(true);
x.ConfigureByConvention();
});
builder.Entity<EmailMessageHeader>(x =>
{
x.ToTable(options.TablePrefix + "EmailMessageHeaders", options.Schema);
x.Property(p => p.Key)
.HasColumnName(nameof(EmailMessageHeader.Key))
.HasMaxLength(EmailMessageHeaderConsts.MaxKeyLength)
.IsRequired(true);
x.Property(p => p.Value)
.HasColumnName(nameof(EmailMessageHeader.Value))
.HasMaxLength(EmailMessageHeaderConsts.MaxValueLength)
.IsRequired(true);
x.ConfigureByConvention();
});
builder.Entity<SmsMessage>(x =>
{
x.ToTable(options.TablePrefix + "SmsMessages", options.Schema);
x.Property(p => p.Receiver)
.HasColumnName(nameof(SmsMessage.Receiver))
.HasMaxLength(MessageConsts.MaxReceiverLength)
.IsRequired(true);
x.Property(p => p.Content)
.HasColumnName(nameof(SmsMessage.Content))
.IsRequired(true);
x.Property(p => p.Sender)
.HasColumnName(nameof(SmsMessage.Sender))
.HasMaxLength(MessageConsts.MaxSenderLength);
x.Property(p => p.Provider)
.HasColumnName(nameof(SmsMessage.Provider))
.HasMaxLength(MessageConsts.MaxProviderLength);
x.Property(p => p.Reason)
.HasColumnName(nameof(SmsMessage.Reason))
.HasMaxLength(MessageConsts.MaxReasonLength);
x.ConfigureByConvention();
});
}
public static EntityTypeBuilder<TRoute> ConfigureRoute<TRoute>(

4
aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/EntityFrameworkCore/PlatformEntityFrameworkCoreModule.cs

@ -2,6 +2,7 @@
using LINGYUN.Platform.Feedbacks;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
using LINGYUN.Platform.Portal;
using Microsoft.Extensions.DependencyInjection;
@ -30,6 +31,9 @@ public class PlatformEntityFrameworkCoreModule : AbpModule
options.AddRepository<Feedback, EfCoreFeedbackRepository>();
options.AddRepository<SmsMessage, EfCoreSmsMessageRepository>();
options.AddRepository<EmailMessage, EfCoreEmailMessageRepository>();
options.AddDefaultRepositories(includeAllEntities: true);
});
}

49
aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Messages/EfCoreEmailMessageRepository.cs

@ -0,0 +1,49 @@
using LINGYUN.Platform.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Specifications;
namespace LINGYUN.Platform.Messages;
public class EfCoreEmailMessageRepository : EfCoreRepository<IPlatformDbContext, EmailMessage, Guid>, IEmailMessageRepository
{
public EfCoreEmailMessageRepository(
IDbContextProvider<IPlatformDbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public async virtual Task<int> GetCountAsync(ISpecification<EmailMessage> specification, CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.CountAsync(GetCancellationToken(cancellationToken));
}
public async virtual Task<List<EmailMessage>> GetListAsync(
ISpecification<EmailMessage> specification,
string sorting = $"{nameof(Message.CreationTime)} DESC",
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.OrderBy(sorting.IsNullOrWhiteSpace() ? $"{nameof(Message.CreationTime)} DESC" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}
public async override Task<IQueryable<EmailMessage>> WithDetailsAsync()
{
return (await base.WithDetailsAsync())
.Include(x => x.Attachments)
.Include(x => x.Headers);
}
}

42
aspnet-core/modules/platform/LINGYUN.Platform.EntityFrameworkCore/LINGYUN/Platform/Messages/EfCoreSmsMessageRepository.cs

@ -0,0 +1,42 @@
using LINGYUN.Platform.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Specifications;
namespace LINGYUN.Platform.Messages;
public class EfCoreSmsMessageRepository : EfCoreRepository<IPlatformDbContext, SmsMessage, Guid>, ISmsMessageRepository
{
public EfCoreSmsMessageRepository(
IDbContextProvider<IPlatformDbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public async virtual Task<int> GetCountAsync(ISpecification<SmsMessage> specification, CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.CountAsync(GetCancellationToken(cancellationToken));
}
public async virtual Task<List<SmsMessage>> GetListAsync(
ISpecification<SmsMessage> specification,
string sorting = $"{nameof(Message.CreationTime)} DESC",
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.OrderBy(sorting.IsNullOrWhiteSpace() ? $"{nameof(Message.CreationTime)} DESC" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}
}

110
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/DataClientProxy.Generated.cs

@ -0,0 +1,110 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Datas;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Datas;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IDataAppService), typeof(DataClientProxy))]
public partial class DataClientProxy : ClientProxyBase<IDataAppService>, IDataAppService
{
public virtual async Task<DataDto> CreateAsync(DataCreateDto input)
{
return await RequestAsync<DataDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(DataCreateDto), input }
});
}
public virtual async Task CreateItemAsync(Guid id, DataItemCreateDto input)
{
await RequestAsync(nameof(CreateItemAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(DataItemCreateDto), input }
});
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task DeleteItemAsync(Guid id, string name)
{
await RequestAsync(nameof(DeleteItemAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(string), name }
});
}
public virtual async Task<DataDto> GetAsync(string name)
{
return await RequestAsync<DataDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<DataDto> GetAsync(Guid id)
{
return await RequestAsync<DataDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<ListResultDto<DataDto>> GetAllAsync()
{
return await RequestAsync<ListResultDto<DataDto>>(nameof(GetAllAsync));
}
public virtual async Task<PagedResultDto<DataDto>> GetListAsync(GetDataListInput input)
{
return await RequestAsync<PagedResultDto<DataDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetDataListInput), input }
});
}
public virtual async Task<DataDto> MoveAsync(Guid id, DataMoveDto input)
{
return await RequestAsync<DataDto>(nameof(MoveAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(DataMoveDto), input }
});
}
public virtual async Task<DataDto> UpdateAsync(Guid id, DataUpdateDto input)
{
return await RequestAsync<DataDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(DataUpdateDto), input }
});
}
public virtual async Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input)
{
await RequestAsync(nameof(UpdateItemAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(string), name },
{ typeof(DataItemUpdateDto), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/DataClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of DataClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Datas;
public partial class DataClientProxy
{
}

44
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/FeedbackAttachmentClientProxy.Generated.cs

@ -0,0 +1,44 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Feedbacks;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Content;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Feedbacks;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IFeedbackAttachmentAppService), typeof(FeedbackAttachmentClientProxy))]
public partial class FeedbackAttachmentClientProxy : ClientProxyBase<IFeedbackAttachmentAppService>, IFeedbackAttachmentAppService
{
public virtual async Task<IRemoteStreamContent> GetAsync(FeedbackAttachmentGetInput input)
{
return await RequestAsync<IRemoteStreamContent>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(FeedbackAttachmentGetInput), input }
});
}
public virtual async Task<FeedbackAttachmentTempFileDto> UploadAsync(FeedbackAttachmentUploadInput input)
{
return await RequestAsync<FeedbackAttachmentTempFileDto>(nameof(UploadAsync), new ClientProxyRequestTypeValue
{
{ typeof(FeedbackAttachmentUploadInput), input }
});
}
public virtual async Task DeleteAsync(FeedbackAttachmentGetInput input)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(FeedbackAttachmentGetInput), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/FeedbackAttachmentClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of FeedbackAttachmentClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Feedbacks;
public partial class FeedbackAttachmentClientProxy
{
}

51
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/FeedbackClientProxy.Generated.cs

@ -0,0 +1,51 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Feedbacks;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Feedbacks;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IFeedbackAppService), typeof(FeedbackClientProxy))]
public partial class FeedbackClientProxy : ClientProxyBase<IFeedbackAppService>, IFeedbackAppService
{
public virtual async Task<FeedbackDto> CreateAsync(FeedbackCreateDto input)
{
return await RequestAsync<FeedbackDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(FeedbackCreateDto), input }
});
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<FeedbackDto> GetAsync(Guid id)
{
return await RequestAsync<FeedbackDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<PagedResultDto<FeedbackDto>> GetListAsync(FeedbackGetListInput input)
{
return await RequestAsync<PagedResultDto<FeedbackDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(FeedbackGetListInput), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/FeedbackClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of FeedbackClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Feedbacks;
public partial class FeedbackClientProxy
{
}

27
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/MyFeedbackClientProxy.Generated.cs

@ -0,0 +1,27 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Feedbacks;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Feedbacks;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMyFeedbackAppService), typeof(MyFeedbackClientProxy))]
public partial class MyFeedbackClientProxy : ClientProxyBase<IMyFeedbackAppService>, IMyFeedbackAppService
{
public virtual async Task<PagedResultDto<FeedbackDto>> GetMyFeedbacksAsync(FeedbackGetListInput input)
{
return await RequestAsync<PagedResultDto<FeedbackDto>>(nameof(GetMyFeedbacksAsync), new ClientProxyRequestTypeValue
{
{ typeof(FeedbackGetListInput), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Feedbacks/MyFeedbackClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of MyFeedbackClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Feedbacks;
public partial class MyFeedbackClientProxy
{
}

65
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Layouts/LayoutClientProxy.Generated.cs

@ -0,0 +1,65 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Layouts;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Layouts;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ILayoutAppService), typeof(LayoutClientProxy))]
public partial class LayoutClientProxy : ClientProxyBase<ILayoutAppService>, ILayoutAppService
{
public virtual async Task<LayoutDto> CreateAsync(LayoutCreateDto input)
{
return await RequestAsync<LayoutDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(LayoutCreateDto), input }
});
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<LayoutDto> GetAsync(Guid id)
{
return await RequestAsync<LayoutDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<ListResultDto<LayoutDto>> GetAllListAsync()
{
return await RequestAsync<ListResultDto<LayoutDto>>(nameof(GetAllListAsync));
}
public virtual async Task<PagedResultDto<LayoutDto>> GetListAsync(GetLayoutListInput input)
{
return await RequestAsync<PagedResultDto<LayoutDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetLayoutListInput), input }
});
}
public virtual async Task<LayoutDto> UpdateAsync(Guid id, LayoutUpdateDto input)
{
return await RequestAsync<LayoutDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(LayoutUpdateDto), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Layouts/LayoutClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of LayoutClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Layouts;
public partial class LayoutClientProxy
{
}

126
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Menus/MenuClientProxy.Generated.cs

@ -0,0 +1,126 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Menus;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Menus;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMenuAppService), typeof(MenuClientProxy))]
public partial class MenuClientProxy : ClientProxyBase<IMenuAppService>, IMenuAppService
{
public virtual async Task<ListResultDto<MenuDto>> GetCurrentUserMenuListAsync(GetMenuInput input)
{
return await RequestAsync<ListResultDto<MenuDto>>(nameof(GetCurrentUserMenuListAsync), new ClientProxyRequestTypeValue
{
{ typeof(GetMenuInput), input }
});
}
public virtual async Task<MenuDto> GetAsync(Guid id)
{
return await RequestAsync<MenuDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<ListResultDto<MenuDto>> GetAllAsync(MenuGetAllInput input)
{
return await RequestAsync<ListResultDto<MenuDto>>(nameof(GetAllAsync), new ClientProxyRequestTypeValue
{
{ typeof(MenuGetAllInput), input }
});
}
public virtual async Task<PagedResultDto<MenuDto>> GetListAsync(MenuGetListInput input)
{
return await RequestAsync<PagedResultDto<MenuDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(MenuGetListInput), input }
});
}
public virtual async Task<MenuDto> CreateAsync(MenuCreateDto input)
{
return await RequestAsync<MenuDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(MenuCreateDto), input }
});
}
public virtual async Task<MenuDto> UpdateAsync(Guid id, MenuUpdateDto input)
{
return await RequestAsync<MenuDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(MenuUpdateDto), input }
});
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task SetUserMenusAsync(UserMenuInput input)
{
await RequestAsync(nameof(SetUserMenusAsync), new ClientProxyRequestTypeValue
{
{ typeof(UserMenuInput), input }
});
}
public virtual async Task SetUserStartupAsync(Guid id, UserMenuStartupInput input)
{
await RequestAsync(nameof(SetUserStartupAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(UserMenuStartupInput), input }
});
}
public virtual async Task<ListResultDto<MenuDto>> GetUserMenuListAsync(MenuGetByUserInput input)
{
return await RequestAsync<ListResultDto<MenuDto>>(nameof(GetUserMenuListAsync), new ClientProxyRequestTypeValue
{
{ typeof(MenuGetByUserInput), input }
});
}
public virtual async Task SetRoleMenusAsync(RoleMenuInput input)
{
await RequestAsync(nameof(SetRoleMenusAsync), new ClientProxyRequestTypeValue
{
{ typeof(RoleMenuInput), input }
});
}
public virtual async Task SetRoleStartupAsync(Guid id, RoleMenuStartupInput input)
{
await RequestAsync(nameof(SetRoleStartupAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(RoleMenuStartupInput), input }
});
}
public virtual async Task<ListResultDto<MenuDto>> GetRoleMenuListAsync(MenuGetByRoleInput input)
{
return await RequestAsync<ListResultDto<MenuDto>>(nameof(GetRoleMenuListAsync), new ClientProxyRequestTypeValue
{
{ typeof(MenuGetByRoleInput), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Menus/MenuClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of MenuClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Menus;
public partial class MenuClientProxy
{
}

87
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Menus/UserFavoriteMenuClientProxy.Generated.cs

@ -0,0 +1,87 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Menus;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Menus;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IUserFavoriteMenuAppService), typeof(UserFavoriteMenuClientProxy))]
public partial class UserFavoriteMenuClientProxy : ClientProxyBase<IUserFavoriteMenuAppService>, IUserFavoriteMenuAppService
{
public virtual async Task<UserFavoriteMenuDto> CreateAsync(Guid userId, UserFavoriteMenuCreateDto input)
{
return await RequestAsync<UserFavoriteMenuDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), userId },
{ typeof(UserFavoriteMenuCreateDto), input }
});
}
public virtual async Task<UserFavoriteMenuDto> CreateMyFavoriteMenuAsync(UserFavoriteMenuCreateDto input)
{
return await RequestAsync<UserFavoriteMenuDto>(nameof(CreateMyFavoriteMenuAsync), new ClientProxyRequestTypeValue
{
{ typeof(UserFavoriteMenuCreateDto), input }
});
}
public virtual async Task DeleteAsync(Guid userId, UserFavoriteMenuRemoveInput input)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), userId },
{ typeof(UserFavoriteMenuRemoveInput), input }
});
}
public virtual async Task DeleteMyFavoriteMenuAsync(UserFavoriteMenuRemoveInput input)
{
await RequestAsync(nameof(DeleteMyFavoriteMenuAsync), new ClientProxyRequestTypeValue
{
{ typeof(UserFavoriteMenuRemoveInput), input }
});
}
public virtual async Task<ListResultDto<UserFavoriteMenuDto>> GetListAsync(Guid userId, UserFavoriteMenuGetListInput input)
{
return await RequestAsync<ListResultDto<UserFavoriteMenuDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), userId },
{ typeof(UserFavoriteMenuGetListInput), input }
});
}
public virtual async Task<ListResultDto<UserFavoriteMenuDto>> GetMyFavoriteMenuListAsync(UserFavoriteMenuGetListInput input)
{
return await RequestAsync<ListResultDto<UserFavoriteMenuDto>>(nameof(GetMyFavoriteMenuListAsync), new ClientProxyRequestTypeValue
{
{ typeof(UserFavoriteMenuGetListInput), input }
});
}
public virtual async Task<UserFavoriteMenuDto> UpdateAsync(Guid userId, UserFavoriteMenuUpdateDto input)
{
return await RequestAsync<UserFavoriteMenuDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), userId },
{ typeof(UserFavoriteMenuUpdateDto), input }
});
}
public virtual async Task<UserFavoriteMenuDto> UpdateMyFavoriteMenuAsync(UserFavoriteMenuUpdateDto input)
{
return await RequestAsync<UserFavoriteMenuDto>(nameof(UpdateMyFavoriteMenuAsync), new ClientProxyRequestTypeValue
{
{ typeof(UserFavoriteMenuUpdateDto), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Menus/UserFavoriteMenuClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of UserFavoriteMenuClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Menus;
public partial class UserFavoriteMenuClientProxy
{
}

51
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/EmailMessageClientProxy.Generated.cs

@ -0,0 +1,51 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Messages;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Messages;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IEmailMessageAppService), typeof(EmailMessageClientProxy))]
public partial class EmailMessageClientProxy : ClientProxyBase<IEmailMessageAppService>, IEmailMessageAppService
{
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<EmailMessageDto> GetAsync(Guid id)
{
return await RequestAsync<EmailMessageDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<PagedResultDto<EmailMessageDto>> GetListAsync(EmailMessageGetListInput input)
{
return await RequestAsync<PagedResultDto<EmailMessageDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(EmailMessageGetListInput), input }
});
}
public virtual async Task SendAsync(Guid id)
{
await RequestAsync(nameof(SendAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/EmailMessageClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of EmailMessageClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Messages;
public partial class EmailMessageClientProxy
{
}

29
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/Integration/EmailMessageIntegrationClientProxy.Generated.cs

@ -0,0 +1,29 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Messages.Integration;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Messages.Integration;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IEmailMessageIntegrationService), typeof(EmailMessageIntegrationClientProxy))]
[IntegrationService]
public partial class EmailMessageIntegrationClientProxy : ClientProxyBase<IEmailMessageIntegrationService>, IEmailMessageIntegrationService
{
public virtual async Task<EmailMessageDto> CreateAsync(EmailMessageCreateDto input)
{
return await RequestAsync<EmailMessageDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(EmailMessageCreateDto), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/Integration/EmailMessageIntegrationClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of EmailMessageIntegrationClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Messages.Integration;
public partial class EmailMessageIntegrationClientProxy
{
}

29
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/Integration/SmsMessageIntegrationClientProxy.Generated.cs

@ -0,0 +1,29 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Messages.Integration;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Messages.Integration;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ISmsMessageIntegrationService), typeof(SmsMessageIntegrationClientProxy))]
[IntegrationService]
public partial class SmsMessageIntegrationClientProxy : ClientProxyBase<ISmsMessageIntegrationService>, ISmsMessageIntegrationService
{
public virtual async Task<SmsMessageDto> CreateAsync(SmsMessageCreateDto input)
{
return await RequestAsync<SmsMessageDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(SmsMessageCreateDto), input }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/Integration/SmsMessageIntegrationClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of SmsMessageIntegrationClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Messages.Integration;
public partial class SmsMessageIntegrationClientProxy
{
}

51
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/SmsMessageClientProxy.Generated.cs

@ -0,0 +1,51 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Messages;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Messages;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ISmsMessageAppService), typeof(SmsMessageClientProxy))]
public partial class SmsMessageClientProxy : ClientProxyBase<ISmsMessageAppService>, ISmsMessageAppService
{
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<SmsMessageDto> GetAsync(Guid id)
{
return await RequestAsync<SmsMessageDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<PagedResultDto<SmsMessageDto>> GetListAsync(SmsMessageGetListInput input)
{
return await RequestAsync<PagedResultDto<SmsMessageDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(SmsMessageGetListInput), input }
});
}
public virtual async Task SendAsync(Guid id)
{
await RequestAsync(nameof(SendAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
}

7
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Messages/SmsMessageClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of SmsMessageClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Messages;
public partial class SmsMessageClientProxy
{
}

96
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Packages/PackageClientProxy.Generated.cs

@ -0,0 +1,96 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Platform.Packages;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Content;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Platform.Packages;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPackageAppService), typeof(PackageClientProxy))]
public partial class PackageClientProxy : ClientProxyBase<IPackageAppService>, IPackageAppService
{
public virtual async Task<PackageDto> CreateAsync(PackageCreateDto input)
{
return await RequestAsync<PackageDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(PackageCreateDto), input }
});
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<PackageBlobDto> UploadBlobAsync(Guid id, PackageBlobUploadDto input)
{
return await RequestAsync<PackageBlobDto>(nameof(UploadBlobAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(PackageBlobUploadDto), input }
});
}
public virtual async Task RemoveBlobAsync(Guid id, PackageBlobRemoveDto input)
{
await RequestAsync(nameof(RemoveBlobAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(PackageBlobRemoveDto), input }
});
}
public virtual async Task<IRemoteStreamContent> DownloadBlobAsync(Guid id, PackageBlobDownloadInput input)
{
return await RequestAsync<IRemoteStreamContent>(nameof(DownloadBlobAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(PackageBlobDownloadInput), input }
});
}
public virtual async Task<PackageDto> GetAsync(Guid id)
{
return await RequestAsync<PackageDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<PackageDto> GetLatestAsync(PackageGetLatestInput input)
{
return await RequestAsync<PackageDto>(nameof(GetLatestAsync), new ClientProxyRequestTypeValue
{
{ typeof(PackageGetLatestInput), input }
});
}
public virtual async Task<PagedResultDto<PackageDto>> GetListAsync(PackageGetPagedListInput input)
{
return await RequestAsync<PagedResultDto<PackageDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(PackageGetPagedListInput), input }
});
}
public virtual async Task<PackageDto> UpdateAsync(Guid id, PackageUpdateDto input)
{
return await RequestAsync<PackageDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(PackageUpdateDto), input }
});
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save