From e98f2a682be520ffcce3723d3dbafe3e0adb548c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E9=95=87=E6=B1=90?= <8907060@qq.com> Date: Sat, 30 Mar 2019 12:17:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86Angular=20Material=20Demo=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=86=E7=A6=BB=E4=B8=BA=E7=B1=BB=E5=BA=93=E5=BD=A2?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util.sln | 39 ++++- build/version.props | 2 +- .../Apis/Systems/ApplicationController.cs | 6 +- .../Apis/Systems/RoleController.cs | 6 +- .../Systems/Views/Application/Detail.cshtml | 2 +- .../Systems/Views/Application/Edit.cshtml | 4 +- .../Systems/Views/Application/Index.cshtml | 2 +- .../Areas/Systems/Views/Role/Detail.cshtml | 2 +- .../Areas/Systems/Views/Role/Edit.cshtml | 2 +- .../Areas/Systems/Views/Role/Index.cshtml | 2 +- .../Views/Role/SelectRoleDialog.cshtml | 2 +- .../Areas/Systems/Views/_ViewImports.cshtml | 2 + .../Configs/ServiceRegister.cs | 29 ---- .../Domains/Models/Role.cs | 26 ---- .../Domains/Repositories/IRoleRepository.cs | 11 -- .../Services/Abstractions/IRoleManager.cs | 11 -- .../Services/Implements/RoleManager.cs | 32 ---- .../Util.Samples.Angular.Material/Startup.cs | 33 +--- .../Util.Samples.Angular.Material.csproj | 14 +- .../DbScripts/MySql/Sample.sql | 0 .../DbScripts/PgSql/Sample.sql | 0 .../DbScripts/SqlServer/Sample.sql | 0 .../ISampleUnitOfWork.cs | 0 .../Mappings/Systems/MySql}/ApplicationMap.cs | 4 +- .../Mappings/Systems/MySql}/RoleMap.cs | 4 +- .../Mappings/Systems/PgSql}/ApplicationMap.cs | 4 +- .../Mappings/Systems/PgSql}/RoleMap.cs | 4 +- .../Systems/SqlServer}/ApplicationMap.cs | 4 +- .../Mappings/Systems/SqlServer}/RoleMap.cs | 4 +- .../Systems/ApplicationRepository.cs | 4 +- .../Repositories/Systems/RoleRepository.cs | 4 +- .../UnitOfWorks}/MySql/SampleUnitOfWork.cs | 2 +- .../UnitOfWorks}/PgSql/SampleUnitOfWork.cs | 2 +- .../SqlServer/SampleUnitOfWork.cs | 2 +- .../Util.Samples.Data.csproj | 15 ++ .../Models/Application.cs | 2 +- .../Util.Samples.Domain/Models/Role.Base.cs | 143 ++++++++++++++++++ sample/Util.Samples.Domain/Models/Role.cs | 23 +++ .../Repositories/IApplicationRepository.cs | 4 +- .../Repositories/IRoleRepository.cs | 11 ++ .../Services/IRoleManager.cs | 20 +++ .../Services/RoleManager.cs | 65 ++++++++ .../Util.Samples.Domain.csproj | 17 +++ .../Systems/IApplicationService.cs | 6 +- .../Abstractions/Systems/IRoleService.cs | 6 +- .../Dtos/Systems/ApplicationDto.cs | 4 +- .../Dtos/Systems/CreateRoleRequest.cs | 4 +- .../Dtos/Systems/RoleDto.cs | 4 +- .../Dtos/Systems/UpdateRoleRequest.cs | 4 +- .../Implements/Systems/ApplicationService.cs | 21 +-- .../Implements/Systems/RoleService.cs | 14 +- .../Queries/Systems/ApplicationQuery.cs | 17 +-- .../Queries/Systems/RoleQuery.cs | 2 +- .../Util.Samples.Service.csproj | 16 ++ src/Util.Applications/Trees/TreeDtoBase.cs | 9 -- 55 files changed, 418 insertions(+), 254 deletions(-) delete mode 100644 sample/Util.Samples.Angular.Material/Configs/ServiceRegister.cs delete mode 100644 sample/Util.Samples.Angular.Material/Domains/Models/Role.cs delete mode 100644 sample/Util.Samples.Angular.Material/Domains/Repositories/IRoleRepository.cs delete mode 100644 sample/Util.Samples.Angular.Material/Domains/Services/Abstractions/IRoleManager.cs delete mode 100644 sample/Util.Samples.Angular.Material/Domains/Services/Implements/RoleManager.cs rename sample/{Util.Samples.Angular.Material => Util.Samples.Data}/DbScripts/MySql/Sample.sql (100%) rename sample/{Util.Samples.Angular.Material => Util.Samples.Data}/DbScripts/PgSql/Sample.sql (100%) rename sample/{Util.Samples.Angular.Material => Util.Samples.Data}/DbScripts/SqlServer/Sample.sql (100%) rename sample/{Util.Samples.Angular.Material/Data => Util.Samples.Data}/ISampleUnitOfWork.cs (100%) rename sample/{Util.Samples.Angular.Material/Data/MySql/Mappings => Util.Samples.Data/Mappings/Systems/MySql}/ApplicationMap.cs (90%) rename sample/{Util.Samples.Angular.Material/Data/MySql/Mappings => Util.Samples.Data/Mappings/Systems/MySql}/RoleMap.cs (91%) rename sample/{Util.Samples.Angular.Material/Data/PgSql/Mappings => Util.Samples.Data/Mappings/Systems/PgSql}/ApplicationMap.cs (90%) rename sample/{Util.Samples.Angular.Material/Data/PgSql/Mappings => Util.Samples.Data/Mappings/Systems/PgSql}/RoleMap.cs (91%) rename sample/{Util.Samples.Angular.Material/Data/SqlServer/Mappings/Systems => Util.Samples.Data/Mappings/Systems/SqlServer}/ApplicationMap.cs (90%) rename sample/{Util.Samples.Angular.Material/Data/SqlServer/Mappings/Systems => Util.Samples.Data/Mappings/Systems/SqlServer}/RoleMap.cs (91%) rename sample/{Util.Samples.Angular.Material/Data => Util.Samples.Data}/Repositories/Systems/ApplicationRepository.cs (86%) rename sample/{Util.Samples.Angular.Material/Data => Util.Samples.Data}/Repositories/Systems/RoleRepository.cs (98%) rename sample/{Util.Samples.Angular.Material/Data => Util.Samples.Data/UnitOfWorks}/MySql/SampleUnitOfWork.cs (92%) rename sample/{Util.Samples.Angular.Material/Data => Util.Samples.Data/UnitOfWorks}/PgSql/SampleUnitOfWork.cs (92%) rename sample/{Util.Samples.Angular.Material/Data => Util.Samples.Data/UnitOfWorks}/SqlServer/SampleUnitOfWork.cs (91%) create mode 100644 sample/Util.Samples.Data/Util.Samples.Data.csproj rename sample/{Util.Samples.Angular.Material/Domains => Util.Samples.Domain}/Models/Application.cs (99%) create mode 100644 sample/Util.Samples.Domain/Models/Role.Base.cs create mode 100644 sample/Util.Samples.Domain/Models/Role.cs rename sample/{Util.Samples.Angular.Material/Domains => Util.Samples.Domain}/Repositories/IApplicationRepository.cs (69%) create mode 100644 sample/Util.Samples.Domain/Repositories/IRoleRepository.cs create mode 100644 sample/Util.Samples.Domain/Services/IRoleManager.cs create mode 100644 sample/Util.Samples.Domain/Services/RoleManager.cs create mode 100644 sample/Util.Samples.Domain/Util.Samples.Domain.csproj rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Abstractions/Systems/IApplicationService.cs (57%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Abstractions/Systems/IRoleService.cs (83%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Dtos/Systems/ApplicationDto.cs (97%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Dtos/Systems/CreateRoleRequest.cs (96%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Dtos/Systems/RoleDto.cs (98%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Dtos/Systems/UpdateRoleRequest.cs (96%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Implements/Systems/ApplicationService.cs (89%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Implements/Systems/RoleService.cs (89%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Queries/Systems/ApplicationQuery.cs (77%) rename sample/{Util.Samples.Angular.Material/Services => Util.Samples.Service}/Queries/Systems/RoleQuery.cs (98%) create mode 100644 sample/Util.Samples.Service/Util.Samples.Service.csproj diff --git a/Util.sln b/Util.sln index 50df5592..62972bbe 100644 --- a/Util.sln +++ b/Util.sln @@ -74,6 +74,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "02-Util.Ui.Angular.AntDesig EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "04-Util.Ui.Angular.Material", "src\Util.Ui.Angular.Material\04-Util.Ui.Angular.Material.csproj", "{9A38AC58-8559-4895-A09E-2A924FD9763A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01-Presentation", "01-Presentation", "{3FAAA4DC-3245-4270-8BAF-C6333C79D516}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "02-Service", "02-Service", "{BA4E4760-AE72-4091-8E25-6B300CC27EEE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03-Domain", "03-Domain", "{4B71322A-458F-448D-844A-62A15F4323BC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "04-Infrastructure", "04-Infrastructure", "{11ED0240-9469-44ED-B92B-007633238CC6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Util.Samples.Service", "sample\Util.Samples.Service\Util.Samples.Service.csproj", "{9C3643A9-2C53-4578-A373-CCF5626E7346}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Util.Samples.Domain", "sample\Util.Samples.Domain\Util.Samples.Domain.csproj", "{02E7316A-0B88-47D3-B859-3B2E90307F7F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Util.Samples.Data", "sample\Util.Samples.Data\Util.Samples.Data.csproj", "{8F374F37-9A07-427E-9BA3-0E3A69AB094D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -184,6 +198,18 @@ Global {9A38AC58-8559-4895-A09E-2A924FD9763A}.Debug|Any CPU.Build.0 = Debug|Any CPU {9A38AC58-8559-4895-A09E-2A924FD9763A}.Release|Any CPU.ActiveCfg = Release|Any CPU {9A38AC58-8559-4895-A09E-2A924FD9763A}.Release|Any CPU.Build.0 = Release|Any CPU + {9C3643A9-2C53-4578-A373-CCF5626E7346}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C3643A9-2C53-4578-A373-CCF5626E7346}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C3643A9-2C53-4578-A373-CCF5626E7346}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C3643A9-2C53-4578-A373-CCF5626E7346}.Release|Any CPU.Build.0 = Release|Any CPU + {02E7316A-0B88-47D3-B859-3B2E90307F7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02E7316A-0B88-47D3-B859-3B2E90307F7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02E7316A-0B88-47D3-B859-3B2E90307F7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02E7316A-0B88-47D3-B859-3B2E90307F7F}.Release|Any CPU.Build.0 = Release|Any CPU + {8F374F37-9A07-427E-9BA3-0E3A69AB094D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F374F37-9A07-427E-9BA3-0E3A69AB094D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F374F37-9A07-427E-9BA3-0E3A69AB094D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F374F37-9A07-427E-9BA3-0E3A69AB094D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -215,13 +241,20 @@ Global {D1083FEB-81A7-4BBF-ADDB-C03D143BC4AB} = {DE1DF0B9-0403-4888-8B24-8208348E9AFA} {F680DA14-282E-471E-8E1C-F4D2067B718E} = {D1083FEB-81A7-4BBF-ADDB-C03D143BC4AB} {E220692E-909A-4855-A67F-64C3A9590BA6} = {3746073A-1C5C-40A7-9D50-CB2A94CA888A} - {18A2D4FE-27BB-4A69-8C07-29169B9006B3} = {F1B4AAEF-9162-4DFA-8B62-4069FC914839} + {18A2D4FE-27BB-4A69-8C07-29169B9006B3} = {3FAAA4DC-3245-4270-8BAF-C6333C79D516} {26F6273A-567A-4AA4-8304-AEC57FC40DC9} = {3746073A-1C5C-40A7-9D50-CB2A94CA888A} - {41F2DA18-8295-4003-99D3-4237B90D7BAE} = {F1B4AAEF-9162-4DFA-8B62-4069FC914839} - {E4C15F45-CBB9-4240-B0CD-45E6A2A34629} = {F1B4AAEF-9162-4DFA-8B62-4069FC914839} + {41F2DA18-8295-4003-99D3-4237B90D7BAE} = {3FAAA4DC-3245-4270-8BAF-C6333C79D516} + {E4C15F45-CBB9-4240-B0CD-45E6A2A34629} = {3FAAA4DC-3245-4270-8BAF-C6333C79D516} {5D30B981-7319-4181-9E0A-DDE1ECCC691D} = {78CC88DA-0B25-45BC-86A8-FFE9628B34A6} {4939123A-D223-4F20-9911-6C30F2EECF2B} = {0629A068-957D-4920-9290-0B9288341E0D} {9A38AC58-8559-4895-A09E-2A924FD9763A} = {78CC88DA-0B25-45BC-86A8-FFE9628B34A6} + {3FAAA4DC-3245-4270-8BAF-C6333C79D516} = {F1B4AAEF-9162-4DFA-8B62-4069FC914839} + {BA4E4760-AE72-4091-8E25-6B300CC27EEE} = {F1B4AAEF-9162-4DFA-8B62-4069FC914839} + {4B71322A-458F-448D-844A-62A15F4323BC} = {F1B4AAEF-9162-4DFA-8B62-4069FC914839} + {11ED0240-9469-44ED-B92B-007633238CC6} = {F1B4AAEF-9162-4DFA-8B62-4069FC914839} + {9C3643A9-2C53-4578-A373-CCF5626E7346} = {BA4E4760-AE72-4091-8E25-6B300CC27EEE} + {02E7316A-0B88-47D3-B859-3B2E90307F7F} = {4B71322A-458F-448D-844A-62A15F4323BC} + {8F374F37-9A07-427E-9BA3-0E3A69AB094D} = {11ED0240-9469-44ED-B92B-007633238CC6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AA6E8E23-8AB6-4AB6-9B31-494CB7CE5E63} diff --git a/build/version.props b/build/version.props index a2b250ee..013eeb46 100644 --- a/build/version.props +++ b/build/version.props @@ -2,7 +2,7 @@ 1 3 - 5 + 6 $(VersionMajor).$(VersionMinor).$(VersionPatch) diff --git a/sample/Util.Samples.Angular.Material/Apis/Systems/ApplicationController.cs b/sample/Util.Samples.Angular.Material/Apis/Systems/ApplicationController.cs index 839b23d5..30e18717 100644 --- a/sample/Util.Samples.Angular.Material/Apis/Systems/ApplicationController.cs +++ b/sample/Util.Samples.Angular.Material/Apis/Systems/ApplicationController.cs @@ -1,6 +1,6 @@ -using Util.Samples.Services.Abstractions.Systems; -using Util.Samples.Services.Dtos.Systems; -using Util.Samples.Services.Queries.Systems; +using Util.Samples.Service.Abstractions.Systems; +using Util.Samples.Service.Dtos.Systems; +using Util.Samples.Service.Queries.Systems; using Util.Webs.Controllers; namespace Util.Samples.Apis.Systems { diff --git a/sample/Util.Samples.Angular.Material/Apis/Systems/RoleController.cs b/sample/Util.Samples.Angular.Material/Apis/Systems/RoleController.cs index 75c6bb0f..b17c4abf 100644 --- a/sample/Util.Samples.Angular.Material/Apis/Systems/RoleController.cs +++ b/sample/Util.Samples.Angular.Material/Apis/Systems/RoleController.cs @@ -1,8 +1,8 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; -using Util.Samples.Services.Abstractions.Systems; -using Util.Samples.Services.Dtos.Systems; -using Util.Samples.Services.Queries.Systems; +using Util.Samples.Service.Abstractions.Systems; +using Util.Samples.Service.Dtos.Systems; +using Util.Samples.Service.Queries.Systems; using Util.Ui.Controllers; namespace Util.Samples.Apis.Systems { diff --git a/sample/Util.Samples.Angular.Material/Areas/Systems/Views/Application/Detail.cshtml b/sample/Util.Samples.Angular.Material/Areas/Systems/Views/Application/Detail.cshtml index 672702e8..ac6977fe 100644 --- a/sample/Util.Samples.Angular.Material/Areas/Systems/Views/Application/Detail.cshtml +++ b/sample/Util.Samples.Angular.Material/Areas/Systems/Views/Application/Detail.cshtml @@ -1,4 +1,4 @@ -@model Util.Samples.Services.Dtos.Systems.ApplicationDto +@model ApplicationDto