From 783de65957167ceda726673de63103c76e0d973c Mon Sep 17 00:00:00 2001 From: yanzhengyu Date: Tue, 26 Sep 2017 11:41:39 +0800 Subject: [PATCH] =?UTF-8?q?!1=20=E4=BB=BB=E5=8A=A1=E8=B0=83=E5=BA=A6?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91=20Merge?= =?UTF-8?q?=20pull=20request=20!1=20from=20yanzhengyu/feature/TaskManagerO?= =?UTF-8?q?ss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 + ZilLion.TaskManagerOss.sln | 186 ++++++++++++++++++ .../ComponentLoader.cs | 8 +- .../TaskCommandController.cs | 13 +- .../TaskConfigController.cs | 8 +- .../TaskNodeController.cs | 18 +- .../TaskPackageDownloadController.cs | 135 ++++++------- .../TaskStateController.cs | 4 +- ...ion.WebApi.TaskPlatform.Controllers.csproj | 14 +- .../app.config | 36 ++-- .../packages.config | 10 +- .../Response/NodeInfoResponse.cs | 2 +- .../Response/TaskCommandResponse.cs | 2 +- .../Response/TaskConfigResponse.cs | 4 +- .../Response/TaskStateResponse.cs | 2 +- .../Response/UploadTaskPackageResponse.cs | 2 +- .../Interface/ITaskMongoGridFsRespository.cs | 2 +- .../Respository/NodeInfoRespository.cs | 37 ---- .../NodePerformanceMonitorRespository.cs | 38 ---- .../Respository/NodeRunMonitorRespository.cs | 38 ---- .../Sqlserver/TaskMongoGridFsRespository.cs | 7 +- .../Respository/TaskCommandRespository.cs | 57 ------ .../Respository/TaskConfigRespository.cs | 60 ------ .../TaskModuleConfigRespository.cs | 39 ---- .../Respository/TaskMongoGridFsRespository.cs | 24 --- .../Respository/TaskStateRespository.cs | 70 ------- .../TaskRunnerContext.cs | 25 --- .../ZilLion.WebApi.TaskPlatform.Domain.csproj | 28 +-- ZilLion.WebApi.TaskPlatform.Domain/app.config | 16 +- .../packages.config | 12 +- ZilLion.WebApiApp/ZilLion.WebApiApp.csproj | 13 +- .../ZilLion.WebApiApp.csproj.user | 2 +- ZilLion.WebApiApp/zlsetting.json | 44 +---- .../OrderController.cs | 17 +- .../Order/PrepayOrderMainRepository.cs | 2 +- .../Services/Interface/IOrderService.cs | 10 +- .../Services/OrderService.cs | 5 + 37 files changed, 397 insertions(+), 596 deletions(-) create mode 100644 ZilLion.TaskManagerOss.sln delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/Respository/NodeInfoRespository.cs delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/Respository/NodePerformanceMonitorRespository.cs delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/Respository/NodeRunMonitorRespository.cs delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskCommandRespository.cs delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskConfigRespository.cs delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskModuleConfigRespository.cs delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskMongoGridFsRespository.cs delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskStateRespository.cs delete mode 100644 ZilLion.WebApi.TaskPlatform.Domain/TaskRunnerContext.cs diff --git a/.gitignore b/.gitignore index 8d50eb3b..bf0d780a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ /ZilLion.WebApiApp/obj/Release/*.cache bin obj +/ZilLion.WebApiApp/Properties/PublishProfiles/TaskManagerOss.pubxml +/ZilLion.WebApiApp/Properties/PublishProfiles/TaskManagerOss.pubxml.user +/ZilLion.WebApiApp/logs/Error/201709/2017-09-26.log diff --git a/ZilLion.TaskManagerOss.sln b/ZilLion.TaskManagerOss.sln new file mode 100644 index 00000000..aa8e52ed --- /dev/null +++ b/ZilLion.TaskManagerOss.sln @@ -0,0 +1,186 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ZilLion.WebApi.Core", "ZilLion.WebApi.Core", "{8610DC11-70E0-4D8F-8C55-FC4CFDBACE64}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.WebApi.Core.ControllerBase", "ZilLion.WebApi.Core.ControllerBase\ZilLion.WebApi.Core.ControllerBase.csproj", "{B473871A-E95F-4521-B9F5-E00FDA603084}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructrue", "Infrastructrue", "{B305504D-E21D-4260-90D7-92AE364D1934}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedSources", "SharedSources", "{C6CDE62C-05C9-45B0-861C-C9CC94BC0D27}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{69478FB7-A9BC-4DD2-A22F-D809807F5F2D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.WebApi.Core.Domain", "ZilLion.WebApi.Core.Domain\ZilLion.WebApi.Core.Domain.csproj", "{982E545E-1587-4F1D-B178-B096DA8FCAB2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.WebApi.Core.AutofacWrapper", "ZilLion.WebApi.Core.AutofacWrapper\ZilLion.WebApi.Core.AutofacWrapper.csproj", "{C0A29048-C583-4C31-8298-1F7021EF6D59}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.WebApi.Core.Infrastructure", "ZilLion.WebApi.Core.Infrastructure\ZilLion.WebApi.Core.Infrastructure.csproj", "{9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.SelfHostWebApi", "ZilLion.SelfHostWebApi\ZilLion.SelfHostWebApi.csproj", "{AE66610C-8B88-46B3-99C7-32F09F584E52}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.WebApiApp", "ZilLion.WebApiApp\ZilLion.WebApiApp.csproj", "{1FAF5D0C-6BB5-4362-A167-2AF077B2126A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wrapper", "Wrapper", "{63A30311-A2B3-4FCD-A105-36A787D7F1F0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.WebApi.Core.Starter", "ZilLion.WebApi.Core.Starter\ZilLion.WebApi.Core.Starter.csproj", "{F937C86C-2F75-4005-9C5A-33C5DFB2F227}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ZilLionOss", "ZilLionOss", "{D4D82724-E86D-4EC2-9F83-C51C48ADCBEB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.Webapi.ZilLionOss.Controllers", "ZilLion.Webapi.ZilLionOss.Controllers\ZilLion.Webapi.ZilLionOss.Controllers.csproj", "{17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.Webapi.ZilLionOss.Domain", "ZilLion.Webapi.ZilLionOss.Domain\ZilLion.Webapi.ZilLionOss.Domain.csproj", "{AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ZilLionObjectStorage", "ZilLionObjectStorage", "{21370B47-9477-48F4-9B8E-104403C07746}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.Webapi.ObjectStorage.Controllers", "ZilLion.Webapi.ObjectStorage.Controllers\ZilLion.Webapi.ObjectStorage.Controllers.csproj", "{0E93312D-A195-457A-8E41-A4EAEE29D9CA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.Webapi.ObjectStorage.Domain", "ZilLion.Webapi.ObjectStorage.Domain\ZilLion.Webapi.ObjectStorage.Domain.csproj", "{5DEF4B5B-66F5-4A15-9A44-30B563304E50}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TaskPlatform", "TaskPlatform", "{3BA4918C-D274-4778-987E-9FE034DA0785}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.WebApi.TaskPlatform.Controllers", "ZilLion.WebApi.TaskPlatform.Controllers\ZilLion.WebApi.TaskPlatform.Controllers.csproj", "{BE3B5F9F-D4B7-45BB-8626-F195C0915021}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZilLion.WebApi.TaskPlatform.Domain", "ZilLion.WebApi.TaskPlatform.Domain\ZilLion.WebApi.TaskPlatform.Domain.csproj", "{52BAF0A0-6B15-415A-BB5D-41BB14E592E5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B473871A-E95F-4521-B9F5-E00FDA603084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B473871A-E95F-4521-B9F5-E00FDA603084}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B473871A-E95F-4521-B9F5-E00FDA603084}.Debug|x86.ActiveCfg = Debug|Any CPU + {B473871A-E95F-4521-B9F5-E00FDA603084}.Debug|x86.Build.0 = Debug|Any CPU + {B473871A-E95F-4521-B9F5-E00FDA603084}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B473871A-E95F-4521-B9F5-E00FDA603084}.Release|Any CPU.Build.0 = Release|Any CPU + {B473871A-E95F-4521-B9F5-E00FDA603084}.Release|x86.ActiveCfg = Release|Any CPU + {B473871A-E95F-4521-B9F5-E00FDA603084}.Release|x86.Build.0 = Release|Any CPU + {982E545E-1587-4F1D-B178-B096DA8FCAB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {982E545E-1587-4F1D-B178-B096DA8FCAB2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {982E545E-1587-4F1D-B178-B096DA8FCAB2}.Debug|x86.ActiveCfg = Debug|Any CPU + {982E545E-1587-4F1D-B178-B096DA8FCAB2}.Debug|x86.Build.0 = Debug|Any CPU + {982E545E-1587-4F1D-B178-B096DA8FCAB2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {982E545E-1587-4F1D-B178-B096DA8FCAB2}.Release|Any CPU.Build.0 = Release|Any CPU + {982E545E-1587-4F1D-B178-B096DA8FCAB2}.Release|x86.ActiveCfg = Release|Any CPU + {982E545E-1587-4F1D-B178-B096DA8FCAB2}.Release|x86.Build.0 = Release|Any CPU + {C0A29048-C583-4C31-8298-1F7021EF6D59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0A29048-C583-4C31-8298-1F7021EF6D59}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0A29048-C583-4C31-8298-1F7021EF6D59}.Debug|x86.ActiveCfg = Debug|Any CPU + {C0A29048-C583-4C31-8298-1F7021EF6D59}.Debug|x86.Build.0 = Debug|Any CPU + {C0A29048-C583-4C31-8298-1F7021EF6D59}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0A29048-C583-4C31-8298-1F7021EF6D59}.Release|Any CPU.Build.0 = Release|Any CPU + {C0A29048-C583-4C31-8298-1F7021EF6D59}.Release|x86.ActiveCfg = Release|Any CPU + {C0A29048-C583-4C31-8298-1F7021EF6D59}.Release|x86.Build.0 = Release|Any CPU + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}.Debug|x86.ActiveCfg = Debug|Any CPU + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}.Debug|x86.Build.0 = Debug|Any CPU + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}.Release|Any CPU.Build.0 = Release|Any CPU + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}.Release|x86.ActiveCfg = Release|Any CPU + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915}.Release|x86.Build.0 = Release|Any CPU + {AE66610C-8B88-46B3-99C7-32F09F584E52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE66610C-8B88-46B3-99C7-32F09F584E52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE66610C-8B88-46B3-99C7-32F09F584E52}.Debug|x86.ActiveCfg = Debug|Any CPU + {AE66610C-8B88-46B3-99C7-32F09F584E52}.Debug|x86.Build.0 = Debug|Any CPU + {AE66610C-8B88-46B3-99C7-32F09F584E52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE66610C-8B88-46B3-99C7-32F09F584E52}.Release|Any CPU.Build.0 = Release|Any CPU + {AE66610C-8B88-46B3-99C7-32F09F584E52}.Release|x86.ActiveCfg = Release|Any CPU + {AE66610C-8B88-46B3-99C7-32F09F584E52}.Release|x86.Build.0 = Release|Any CPU + {1FAF5D0C-6BB5-4362-A167-2AF077B2126A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1FAF5D0C-6BB5-4362-A167-2AF077B2126A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FAF5D0C-6BB5-4362-A167-2AF077B2126A}.Debug|x86.ActiveCfg = Debug|Any CPU + {1FAF5D0C-6BB5-4362-A167-2AF077B2126A}.Debug|x86.Build.0 = Debug|Any CPU + {1FAF5D0C-6BB5-4362-A167-2AF077B2126A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1FAF5D0C-6BB5-4362-A167-2AF077B2126A}.Release|Any CPU.Build.0 = Release|Any CPU + {1FAF5D0C-6BB5-4362-A167-2AF077B2126A}.Release|x86.ActiveCfg = Release|Any CPU + {1FAF5D0C-6BB5-4362-A167-2AF077B2126A}.Release|x86.Build.0 = Release|Any CPU + {F937C86C-2F75-4005-9C5A-33C5DFB2F227}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F937C86C-2F75-4005-9C5A-33C5DFB2F227}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F937C86C-2F75-4005-9C5A-33C5DFB2F227}.Debug|x86.ActiveCfg = Debug|Any CPU + {F937C86C-2F75-4005-9C5A-33C5DFB2F227}.Debug|x86.Build.0 = Debug|Any CPU + {F937C86C-2F75-4005-9C5A-33C5DFB2F227}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F937C86C-2F75-4005-9C5A-33C5DFB2F227}.Release|Any CPU.Build.0 = Release|Any CPU + {F937C86C-2F75-4005-9C5A-33C5DFB2F227}.Release|x86.ActiveCfg = Release|Any CPU + {F937C86C-2F75-4005-9C5A-33C5DFB2F227}.Release|x86.Build.0 = Release|Any CPU + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}.Debug|x86.ActiveCfg = Debug|Any CPU + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}.Debug|x86.Build.0 = Debug|Any CPU + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}.Release|Any CPU.Build.0 = Release|Any CPU + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}.Release|x86.ActiveCfg = Release|Any CPU + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E}.Release|x86.Build.0 = Release|Any CPU + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}.Debug|x86.ActiveCfg = Debug|Any CPU + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}.Debug|x86.Build.0 = Debug|Any CPU + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}.Release|Any CPU.Build.0 = Release|Any CPU + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}.Release|x86.ActiveCfg = Release|Any CPU + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD}.Release|x86.Build.0 = Release|Any CPU + {0E93312D-A195-457A-8E41-A4EAEE29D9CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E93312D-A195-457A-8E41-A4EAEE29D9CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E93312D-A195-457A-8E41-A4EAEE29D9CA}.Debug|x86.ActiveCfg = Debug|Any CPU + {0E93312D-A195-457A-8E41-A4EAEE29D9CA}.Debug|x86.Build.0 = Debug|Any CPU + {0E93312D-A195-457A-8E41-A4EAEE29D9CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E93312D-A195-457A-8E41-A4EAEE29D9CA}.Release|Any CPU.Build.0 = Release|Any CPU + {0E93312D-A195-457A-8E41-A4EAEE29D9CA}.Release|x86.ActiveCfg = Release|Any CPU + {0E93312D-A195-457A-8E41-A4EAEE29D9CA}.Release|x86.Build.0 = Release|Any CPU + {5DEF4B5B-66F5-4A15-9A44-30B563304E50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5DEF4B5B-66F5-4A15-9A44-30B563304E50}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5DEF4B5B-66F5-4A15-9A44-30B563304E50}.Debug|x86.ActiveCfg = Debug|Any CPU + {5DEF4B5B-66F5-4A15-9A44-30B563304E50}.Debug|x86.Build.0 = Debug|Any CPU + {5DEF4B5B-66F5-4A15-9A44-30B563304E50}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5DEF4B5B-66F5-4A15-9A44-30B563304E50}.Release|Any CPU.Build.0 = Release|Any CPU + {5DEF4B5B-66F5-4A15-9A44-30B563304E50}.Release|x86.ActiveCfg = Release|Any CPU + {5DEF4B5B-66F5-4A15-9A44-30B563304E50}.Release|x86.Build.0 = Release|Any CPU + {BE3B5F9F-D4B7-45BB-8626-F195C0915021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE3B5F9F-D4B7-45BB-8626-F195C0915021}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE3B5F9F-D4B7-45BB-8626-F195C0915021}.Debug|x86.ActiveCfg = Debug|Any CPU + {BE3B5F9F-D4B7-45BB-8626-F195C0915021}.Debug|x86.Build.0 = Debug|Any CPU + {BE3B5F9F-D4B7-45BB-8626-F195C0915021}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE3B5F9F-D4B7-45BB-8626-F195C0915021}.Release|Any CPU.Build.0 = Release|Any CPU + {BE3B5F9F-D4B7-45BB-8626-F195C0915021}.Release|x86.ActiveCfg = Release|Any CPU + {BE3B5F9F-D4B7-45BB-8626-F195C0915021}.Release|x86.Build.0 = Release|Any CPU + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5}.Debug|x86.ActiveCfg = Debug|Any CPU + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5}.Debug|x86.Build.0 = Debug|Any CPU + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5}.Release|Any CPU.Build.0 = Release|Any CPU + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5}.Release|x86.ActiveCfg = Release|Any CPU + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B473871A-E95F-4521-B9F5-E00FDA603084} = {B305504D-E21D-4260-90D7-92AE364D1934} + {B305504D-E21D-4260-90D7-92AE364D1934} = {8610DC11-70E0-4D8F-8C55-FC4CFDBACE64} + {982E545E-1587-4F1D-B178-B096DA8FCAB2} = {B305504D-E21D-4260-90D7-92AE364D1934} + {C0A29048-C583-4C31-8298-1F7021EF6D59} = {63A30311-A2B3-4FCD-A105-36A787D7F1F0} + {9AC47A32-9DF5-44F3-B3A1-5DE97DA51915} = {B305504D-E21D-4260-90D7-92AE364D1934} + {63A30311-A2B3-4FCD-A105-36A787D7F1F0} = {8610DC11-70E0-4D8F-8C55-FC4CFDBACE64} + {F937C86C-2F75-4005-9C5A-33C5DFB2F227} = {B305504D-E21D-4260-90D7-92AE364D1934} + {D4D82724-E86D-4EC2-9F83-C51C48ADCBEB} = {69478FB7-A9BC-4DD2-A22F-D809807F5F2D} + {17CE89EF-4EDD-43E4-BB3D-C4D5C6FC1F7E} = {D4D82724-E86D-4EC2-9F83-C51C48ADCBEB} + {AB7AEC6D-38D7-4533-B296-4E8AD4AF37BD} = {D4D82724-E86D-4EC2-9F83-C51C48ADCBEB} + {21370B47-9477-48F4-9B8E-104403C07746} = {69478FB7-A9BC-4DD2-A22F-D809807F5F2D} + {0E93312D-A195-457A-8E41-A4EAEE29D9CA} = {21370B47-9477-48F4-9B8E-104403C07746} + {5DEF4B5B-66F5-4A15-9A44-30B563304E50} = {21370B47-9477-48F4-9B8E-104403C07746} + {3BA4918C-D274-4778-987E-9FE034DA0785} = {69478FB7-A9BC-4DD2-A22F-D809807F5F2D} + {BE3B5F9F-D4B7-45BB-8626-F195C0915021} = {3BA4918C-D274-4778-987E-9FE034DA0785} + {52BAF0A0-6B15-415A-BB5D-41BB14E592E5} = {3BA4918C-D274-4778-987E-9FE034DA0785} + EndGlobalSection + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection +EndGlobal diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/ComponentLoader.cs b/ZilLion.WebApi.TaskPlatform.Controllers/ComponentLoader.cs index bbb9c400..ac34eee8 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/ComponentLoader.cs +++ b/ZilLion.WebApi.TaskPlatform.Controllers/ComponentLoader.cs @@ -1,4 +1,5 @@ -using System.Reflection; +using System.Collections.Generic; +using System.Reflection; using Autofac; using ZilLion.Core.ConfigManager.Manager; using ZilLion.WebApi.Core.AutofacWrapper; @@ -42,5 +43,10 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers #endregion } + + public override Dictionary InterceptJwtpayload(Dictionary formpayload) + { + return formpayload; + } } } \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/TaskCommandController.cs b/ZilLion.WebApi.TaskPlatform.Controllers/TaskCommandController.cs index a0b35ba3..374037b9 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/TaskCommandController.cs +++ b/ZilLion.WebApi.TaskPlatform.Controllers/TaskCommandController.cs @@ -4,13 +4,12 @@ using ZilLion.WebApi.Core.ControllerBase; using ZilLion.WebApi.Core.Domain.EntityBase; using ZilLion.WebApi.TaskPlatform.Domain.Entity; using ZilLion.WebApi.TaskPlatform.Domain.Response; -using ZilLion.WebApi.TaskPlatform.Domain.Respository; using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; namespace ZilLion.WebApi.TaskPlatform.Controllers { /// - /// 作业调度平台命令相关接口 + /// 作业调度平台命令相关接口 /// [RoutePrefix("Api/TaskCommand")] public class TaskCommandController : ApiControllerBase @@ -21,7 +20,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers { _taskCommandRespository = taskCommandRespository; } - + /// /// 获取全部command /// @@ -44,7 +43,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers [HttpGet] public async Task GetUnHandleTaskConmmandEntities(string nodeid) { - var entitys = await _taskCommandRespository.GetUnHandleTaskConmmandEntitiesAsync(nodeid); + var entitys = await _taskCommandRespository.GetUnHandleTaskConmmandEntitiesAsync(nodeid); return new TaskCommandResponse {TaskConmmands = entitys}; } @@ -54,14 +53,12 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers /// [Route("SaveTaskConmmand")] [HttpPost] - public ResponseResultInfo SaveTaskConmmandEntity(TaskConmmandEntity command) + public ResponseBase SaveTaskConmmandEntity(TaskConmmandEntity command) { if (command != null) - { _taskCommandRespository.SaveTaskConmmandEntity(command); - } - return new ResponseResultInfo(); + return new ResponseBase(); } } } \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/TaskConfigController.cs b/ZilLion.WebApi.TaskPlatform.Controllers/TaskConfigController.cs index a3cc0a72..155fe78b 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/TaskConfigController.cs +++ b/ZilLion.WebApi.TaskPlatform.Controllers/TaskConfigController.cs @@ -41,7 +41,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers [Route("SaveTaskConfig")] [HttpPost] - public ResponseResultInfo SaveTaskConfig(TaskConfig config) + public ResponseBase SaveTaskConfig(TaskConfig config) { config.UpdateTime=DateTime.UtcNow.AddHours(8); var oldconfig = _taskConfigRespository.GetjobConfigById(config.Taskid); @@ -51,7 +51,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers _taskConfigRespository.AddData(config); - return new ResponseResultInfo(); + return new ResponseBase(); } [Route("GetTaskModuleConfig/{moduleid}")] @@ -72,7 +72,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers [Route("SaveModuleConfig")] [HttpPost] - public ResponseResultInfo SaveModuleConfig(TaskModuleConfigEntity config) + public ResponseBase SaveModuleConfig(TaskModuleConfigEntity config) { var oldconfig = _taskModuleConfigRespository.GetModuleConfigById(config.TaskmoduleId); if (oldconfig != null) @@ -81,7 +81,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers _taskModuleConfigRespository.AddModuleConfig(config); - return new ResponseResultInfo(); + return new ResponseBase(); } } } \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/TaskNodeController.cs b/ZilLion.WebApi.TaskPlatform.Controllers/TaskNodeController.cs index 98a15718..5f58fd75 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/TaskNodeController.cs +++ b/ZilLion.WebApi.TaskPlatform.Controllers/TaskNodeController.cs @@ -35,7 +35,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers /// [Route("NodeHeartbeat")] [HttpPost] - public ResponseResultInfo NodeHeartbeat([FromBody] NodeInfoEntity node) + public ResponseBase NodeHeartbeat([FromBody] NodeInfoEntity node) { var nodeinfo = _nodeInfoRespository.GetNodeInfoByNodeId(node.Nodeid); if (nodeinfo != null) //当节点ID 不存在,管理平台需要自动发现此节点并且注册 @@ -62,7 +62,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers { _nodeInfoRespository.AddNodInfo(node); } - return new ResponseResultInfo(); + return new ResponseBase(); } /// @@ -72,7 +72,7 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers /// [Route("PerformanceMonitor")] [HttpPost] - public ResponseResultInfo PerformanceMonitor([FromBody] NodePerformanceMonitorEntity node) + public ResponseBase PerformanceMonitor([FromBody] NodePerformanceMonitorEntity node) { var nodeinfo = _nodeInfoRespository.GetNodeInfoByNodeId(node.Nodeid); var runMonitorInfo = _nodeRunMonitorRespository.GetNodeMonitorInfoById(node.Nodeid); @@ -85,9 +85,9 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers _nodePerformanceMonitorRespository.MotifyPerformanceMonitorInfo(node); else _nodePerformanceMonitorRespository.AddPerformanceMonitorInfo(node); - return new ResponseResultInfo(); + return new ResponseBase(); } - return new ResponseResultInfo + return new ResponseBase { Errormodel = new WebErrorModel {Errtype = "nodenotfound", ErrMessage = "节点在管理平台状态异常,停止性能监控,请联系管理员查看节点状态!"} @@ -125,20 +125,20 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers /// [Route("StopNode/{nodeid}")] [HttpGet] - public ResponseResultInfo SetNodeStop(string nodeid) + public ResponseBase SetNodeStop(string nodeid) { var node = _nodeRunMonitorRespository.GetNodeMonitorInfoById(nodeid); node.Noderunstate = 0; _nodeRunMonitorRespository.MotifyPerformanceMonitorInfo(node); - return new ResponseResultInfo(); + return new ResponseBase(); } [Route("SaveNodeInfo")] [HttpPost] - public ResponseResultInfo SetNodeStop([FromBody] NodeInfoEntity entity) + public ResponseBase SetNodeStop([FromBody] NodeInfoEntity entity) { _nodeInfoRespository.MotifyNodeInfo(entity); - return new ResponseResultInfo(); + return new ResponseBase(); } } } \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/TaskPackageDownloadController.cs b/ZilLion.WebApi.TaskPlatform.Controllers/TaskPackageDownloadController.cs index a601c9ab..4cc2c745 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/TaskPackageDownloadController.cs +++ b/ZilLion.WebApi.TaskPlatform.Controllers/TaskPackageDownloadController.cs @@ -46,11 +46,14 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers private HttpResponseMessage DownloadOneTime(string mongoId, string filename) { - var fileStream = _taskMongoGridFsRespository.GetPackageStream(mongoId); - var response = new HttpResponseMessage {Content = new StreamContent(fileStream)}; + var fileStream = _taskMongoGridFsRespository.GetPackageBytes(mongoId); + var response = new HttpResponseMessage {Content = new ByteArrayContent(fileStream)}; response.Headers.AcceptRanges.Add("bytes"); //告诉客户端接受资源为字节 - response.Content.Headers.ContentDisposition - = new ContentDispositionHeaderValue("attachment") {FileName = filename}; + + response.Content.Headers.ContentDisposition = + new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment") {FileName = filename}; + + response.Content.Headers.ContentType = new MediaTypeHeaderValue(MimeType); response.Content.Headers.ContentLength @@ -64,69 +67,69 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers /// /// /// - private HttpResponseMessage ResumeDownload(string mongoId, string filename) - { - if (Request.Headers.Range != null) - { - var firstRange = Request.Headers.Range.Ranges.FirstOrDefault(); - if ((firstRange != null) && ((firstRange.From ?? 0) != 0)) - { - var item = Request.Headers.Range.Ranges.FirstOrDefault(); - if ((item != null) && item.From.HasValue) - { - var response = GetPartialContent(mongoId, filename, item.From.Value); - return response; - } - } - } - return DownloadOneTime(mongoId, filename); //如果不支持断点续传则执行一次下载 - } + //private HttpResponseMessage ResumeDownload(string mongoId, string filename) + //{ + // if (Request.Headers.Range != null) + // { + // var firstRange = Request.Headers.Range.Ranges.FirstOrDefault(); + // if ((firstRange != null) && ((firstRange.From ?? 0) != 0)) + // { + // var item = Request.Headers.Range.Ranges.FirstOrDefault(); + // if ((item != null) && item.From.HasValue) + // { + // var response = GetPartialContent(mongoId, filename, item.From.Value); + // return response; + // } + // } + // } + // return DownloadOneTime(mongoId, filename); //如果不支持断点续传则执行一次下载 + //} - private HttpResponseMessage GetPartialContent(string mongoId, string filename, long partial) - { - var response = new HttpResponseMessage(); - var startByte = partial; - long sourceFileLen = 0; - Action pushContentAction = (outputStream, content, context) => - { - try - { - var buffer = new byte[65536]; - using (var fileStream = _taskMongoGridFsRespository.GetPackageStream(mongoId)) - { - var bytesRead = 0; - fileStream.Seek(startByte, SeekOrigin.Begin); - sourceFileLen = fileStream.Length; - - var length = Convert.ToInt32(fileStream.Length - 1 - startByte) + 1; - - while ((length > 0) && (bytesRead > 0)) - { - bytesRead = fileStream.Read(buffer, 0, Math.Min(length, buffer.Length)); - outputStream.Write(buffer, 0, bytesRead); - length -= bytesRead; - } - } - } - - finally - { - outputStream.Close(); - } - }; - - response.Content = new PushStreamContent(pushContentAction, new MediaTypeHeaderValue(MimeType)); - response.StatusCode = HttpStatusCode.PartialContent; - response.Headers.AcceptRanges.Add("bytes"); - response.Content.Headers.ContentType = new MediaTypeHeaderValue(MimeType); - response.Content.Headers.ContentLength = - sourceFileLen; - response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment") - { - FileName = filename - }; - return response; - } + //private HttpResponseMessage GetPartialContent(string mongoId, string filename, long partial) + //{ + // var response = new HttpResponseMessage(); + // var startByte = partial; + // long sourceFileLen = 0; + // Action pushContentAction = (outputStream, content, context) => + // { + // try + // { + // var buffer = new byte[65536]; + // using (var fileStream = _taskMongoGridFsRespository.GetPackageBytes(mongoId)) + // { + // var bytesRead = 0; + // fileStream.Seek(startByte, SeekOrigin.Begin); + // sourceFileLen = fileStream.Length; + + // var length = Convert.ToInt32(fileStream.Length - 1 - startByte) + 1; + + // while ((length > 0) && (bytesRead > 0)) + // { + // bytesRead = fileStream.Read(buffer, 0, Math.Min(length, buffer.Length)); + // outputStream.Write(buffer, 0, bytesRead); + // length -= bytesRead; + // } + // } + // } + + // finally + // { + // outputStream.Close(); + // } + // }; + + // response.Content = new PushStreamContent(pushContentAction, new MediaTypeHeaderValue(MimeType)); + // response.StatusCode = HttpStatusCode.PartialContent; + // response.Headers.AcceptRanges.Add("bytes"); + // response.Content.Headers.ContentType = new MediaTypeHeaderValue(MimeType); + // response.Content.Headers.ContentLength = + // sourceFileLen; + // response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment") + // { + // FileName = filename + // }; + // return response; + //} } } \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/TaskStateController.cs b/ZilLion.WebApi.TaskPlatform.Controllers/TaskStateController.cs index e31d531d..5a988c9d 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/TaskStateController.cs +++ b/ZilLion.WebApi.TaskPlatform.Controllers/TaskStateController.cs @@ -28,10 +28,10 @@ namespace ZilLion.WebApi.TaskPlatform.Controllers /// [Route("UpdateTaskState")] [HttpPost] - public ResponseResultInfo UpdateTaskState(TaskStateEntity stateEntity) + public ResponseBase UpdateTaskState(TaskStateEntity stateEntity) { _taskStateRespository.SaveTaskState(stateEntity); - return new ResponseResultInfo(); + return new ResponseBase(); } /// diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/ZilLion.WebApi.TaskPlatform.Controllers.csproj b/ZilLion.WebApi.TaskPlatform.Controllers/ZilLion.WebApi.TaskPlatform.Controllers.csproj index 9414d09c..d34ab3ee 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/ZilLion.WebApi.TaskPlatform.Controllers.csproj +++ b/ZilLion.WebApi.TaskPlatform.Controllers/ZilLion.WebApi.TaskPlatform.Controllers.csproj @@ -9,7 +9,7 @@ Properties ZilLion.WebApi.TaskPlatform.Controllers ZilLion.WebApi.TaskPlatform.Controllers - v4.5 + v4.5.2 512 @@ -47,11 +47,11 @@ True - ..\packages\ZilLion.Core.DapperWrapper.1.0.16\lib\net45\Dapper.dll + ..\packages\ZilLion.Core.DapperWrapper.1.0.21\lib\net45\Dapper.dll True - ..\packages\ZilLion.Core.DapperWrapper.1.0.16\lib\net45\DapperExtensions.dll + ..\packages\ZilLion.Core.DapperWrapper.1.0.21\lib\net45\DapperExtensions.dll True @@ -96,19 +96,19 @@ True - ..\packages\ZilLion.Core.ConfigManager.1.0.7\lib\net45\ZilLion.Core.ConfigManager.dll + ..\packages\ZilLion.Core.ConfigManager.1.0.9\lib\net45\ZilLion.Core.ConfigManager.dll True - ..\packages\ZilLion.Core.DapperWrapper.1.0.16\lib\net45\ZilLion.Core.DapperWrapper.dll + ..\packages\ZilLion.Core.DapperWrapper.1.0.21\lib\net45\ZilLion.Core.DapperWrapper.dll True - ..\packages\ZilLion.Core.MongoDbManager.1.0.1\lib\net45\ZilLion.Core.MongoDbManager.dll + ..\packages\ZilLion.Core.MongoDbManager.1.0.4\lib\net45\ZilLion.Core.MongoDbManager.dll True - ..\packages\ZilLion.Core.SqliteRepository.1.0.1\lib\net45\ZilLion.Core.SqliteRepository.dll + ..\packages\ZilLion.Core.SqliteRepository.1.0.3\lib\net45\ZilLion.Core.SqliteRepository.dll True diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/app.config b/ZilLion.WebApi.TaskPlatform.Controllers/app.config index e933c7a9..027c54c7 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/app.config +++ b/ZilLion.WebApi.TaskPlatform.Controllers/app.config @@ -1,39 +1,39 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/ZilLion.WebApi.TaskPlatform.Controllers/packages.config b/ZilLion.WebApi.TaskPlatform.Controllers/packages.config index 5b2d70eb..e968b0b9 100644 --- a/ZilLion.WebApi.TaskPlatform.Controllers/packages.config +++ b/ZilLion.WebApi.TaskPlatform.Controllers/packages.config @@ -9,9 +9,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Response/NodeInfoResponse.cs b/ZilLion.WebApi.TaskPlatform.Domain/Response/NodeInfoResponse.cs index 30af2581..23420973 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/Response/NodeInfoResponse.cs +++ b/ZilLion.WebApi.TaskPlatform.Domain/Response/NodeInfoResponse.cs @@ -4,7 +4,7 @@ using ZilLion.WebApi.TaskPlatform.Domain.Entity; namespace ZilLion.WebApi.TaskPlatform.Domain.Response { - public class NodeInfoResponse:ResponseResultInfo + public class NodeInfoResponse:ResponseBase { public IList NodeInfos { get; set; } } diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskCommandResponse.cs b/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskCommandResponse.cs index 40366170..0319ae19 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskCommandResponse.cs +++ b/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskCommandResponse.cs @@ -4,7 +4,7 @@ using ZilLion.WebApi.TaskPlatform.Domain.Entity; namespace ZilLion.WebApi.TaskPlatform.Domain.Response { - public class TaskCommandResponse : ResponseResultInfo + public class TaskCommandResponse : ResponseBase { public IEnumerable TaskConmmands { get; set; } } diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskConfigResponse.cs b/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskConfigResponse.cs index 6692db82..4c2262e9 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskConfigResponse.cs +++ b/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskConfigResponse.cs @@ -4,12 +4,12 @@ using ZilLion.WebApi.TaskPlatform.Domain.Entity; namespace ZilLion.WebApi.TaskPlatform.Domain.Response { - public class TaskModuleConfigResponse : ResponseResultInfo + public class TaskModuleConfigResponse : ResponseBase { public IEnumerable TaskModuleList { get; set; } } - public class TaskConfigResponse : ResponseResultInfo + public class TaskConfigResponse : ResponseBase { public IEnumerable TaskConfigList { get; set; } } diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskStateResponse.cs b/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskStateResponse.cs index bb31d2e5..6db37235 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskStateResponse.cs +++ b/ZilLion.WebApi.TaskPlatform.Domain/Response/TaskStateResponse.cs @@ -4,7 +4,7 @@ using ZilLion.WebApi.TaskPlatform.Domain.Entity; namespace ZilLion.WebApi.TaskPlatform.Domain.Response { - public class TaskStateResponse : ResponseResultInfo + public class TaskStateResponse : ResponseBase { public IEnumerable TaskStates { get; set; } } diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Response/UploadTaskPackageResponse.cs b/ZilLion.WebApi.TaskPlatform.Domain/Response/UploadTaskPackageResponse.cs index 41426521..88c306e1 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/Response/UploadTaskPackageResponse.cs +++ b/ZilLion.WebApi.TaskPlatform.Domain/Response/UploadTaskPackageResponse.cs @@ -2,7 +2,7 @@ namespace ZilLion.WebApi.TaskPlatform.Domain.Response { - public class UploadTaskPackageResponse : ResponseResultInfo + public class UploadTaskPackageResponse : ResponseBase { public string PackageKey { get; set; } diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/Interface/ITaskMongoGridFsRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/Interface/ITaskMongoGridFsRespository.cs index 81db274a..dda0be55 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/Interface/ITaskMongoGridFsRespository.cs +++ b/ZilLion.WebApi.TaskPlatform.Domain/Respository/Interface/ITaskMongoGridFsRespository.cs @@ -4,7 +4,7 @@ namespace ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface { public interface ITaskMongoGridFsRespository { - Stream GetPackageStream(string fileId); + byte[] GetPackageBytes(string fileId); string UploadFileToGridFs(string filename); string UploadFileToGridFs(Stream fileStream, string filename); diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodeInfoRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodeInfoRespository.cs deleted file mode 100644 index 7d60a1b5..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodeInfoRespository.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using ZilLion.Core.DapperWrapper.SqlServer; -using ZilLion.WebApi.TaskPlatform.Domain.Entity; -using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; - -namespace ZilLion.WebApi.TaskPlatform.Domain.Respository -{ - public class NodeInfoRespository : SqlServerRespository, INodeInfoRespository - - { - public NodeInfoRespository() - { - Context = new TaskRunnerContext(); - } - - public IEnumerable GetNodeInfoEntities() - { - return GetList("select * from node_info"); - } - - public NodeInfoEntity GetNodeInfoByNodeId(string nodeId) - { - return GetList("select * from node_info where nodeid=@nodeId", new {nodeId}).FirstOrDefault(); - } - - public void AddNodInfo(NodeInfoEntity node) - { - Add(node); - } - - public void MotifyNodeInfo(NodeInfoEntity node) - { - Modify(node); - } - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodePerformanceMonitorRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodePerformanceMonitorRespository.cs deleted file mode 100644 index ef377541..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodePerformanceMonitorRespository.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using ZilLion.Core.DapperWrapper.SqlServer; -using ZilLion.WebApi.TaskPlatform.Domain.Entity; -using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; - -namespace ZilLion.WebApi.TaskPlatform.Domain.Respository -{ - public class NodePerformanceMonitorRespository : SqlServerRespository, - INodePerformanceMonitorRespository - { - public NodePerformanceMonitorRespository() - { - Context = new TaskRunnerContext(); - } - - public void AddPerformanceMonitorInfo(NodePerformanceMonitorEntity entity) - { - Add(entity); - } - - public void MotifyPerformanceMonitorInfo(NodePerformanceMonitorEntity entity) - { - Modify(entity); - } - - public IEnumerable GetAllNodeMonitorInfo() - { - return GetList("select * from node_performance_monitor"); - } - - public NodePerformanceMonitorEntity GetNodeMonitorInfoById(string nodeid) - { - return - GetList("select * from node_performance_monitor where nodeid=@nodeid", new {nodeid}).FirstOrDefault(); - } - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodeRunMonitorRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodeRunMonitorRespository.cs deleted file mode 100644 index 6fdbb7c9..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/NodeRunMonitorRespository.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using ZilLion.Core.DapperWrapper.SqlServer; -using ZilLion.WebApi.TaskPlatform.Domain.Entity; -using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; - -namespace ZilLion.WebApi.TaskPlatform.Domain.Respository -{ - public class NodeRunMonitorRespository : SqlServerRespository, INodeRunMonitorRespository - { - public NodeRunMonitorRespository() - { - Context = new TaskRunnerContext(); - } - - public void AddPerformanceMonitorInfo(NodeRunMonitorInfoEntity entity) - { - Add(entity); - } - - public void MotifyPerformanceMonitorInfo(NodeRunMonitorInfoEntity entity) - { - Modify(entity); - } - - public IEnumerable GetAllNodeMonitorInfo() - { - return GetList("select * from node_run_monitor"); - } - - public NodeRunMonitorInfoEntity GetNodeMonitorInfoById(string nodeid) - { - return - GetList("select * from node_run_monitor where nodeid=@nodeid", new {nodeid}) - .FirstOrDefault(); - } - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/Sqlserver/TaskMongoGridFsRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/Sqlserver/TaskMongoGridFsRespository.cs index d5808a5d..fcb34ae8 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/Sqlserver/TaskMongoGridFsRespository.cs +++ b/ZilLion.WebApi.TaskPlatform.Domain/Respository/Sqlserver/TaskMongoGridFsRespository.cs @@ -1,4 +1,5 @@ -using System.IO; +using System; +using System.IO; using ZilLion.Core.MongoDbManager.GridFs; using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; @@ -6,9 +7,9 @@ namespace ZilLion.WebApi.TaskPlatform.Domain.Respository.Sqlserver { public class TaskMongoGridFsRespository : GridFsRepository, ITaskMongoGridFsRespository { - public Stream GetPackageStream(string fileId) + public byte[] GetPackageBytes(string fileId) { - return GetFileAsStreamByKey(fileId); + return GetFileAsBytesByKey(fileId); } public string UploadFileToGridFs(string filename) diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskCommandRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskCommandRespository.cs deleted file mode 100644 index 933ebef0..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskCommandRespository.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using ZilLion.Core.DapperWrapper.SqlServer; -using ZilLion.WebApi.TaskPlatform.Domain.Entity; -using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; - -namespace ZilLion.WebApi.TaskPlatform.Domain.Respository -{ - public class TaskCommandRespository : SqlServerRespository, ITaskCommandRespository - { - public TaskCommandRespository() - { - Context = new TaskRunnerContext(); - } - - //public async Task GetNewGuidAsync() - //{ - // return await Task.Run(() => - // { - // Thread.Sleep(5000); - // return $@"{Guid.NewGuid():N}_HashCode:{GetHashCode()}"; - // }); - //} - public IEnumerable GetAllTaskConmmandEntities(string nodeid = null) - { - return nodeid.IsNotNullOrEmpty() - ? GetList("select * from [task_command] where nodeid=@nodeid", new {nodeid}) - : GetList("select * from [task_command] "); - } - - public async Task> GetUnHandleTaskConmmandEntitiesAsync(string nodeid) - { - return - await - Task.Run( - () => - GetList("select * from [task_command] where nodeid=@nodeid and commandstate=0 ", - new {nodeid})); - } - - - public void SaveTaskConmmandEntity(TaskConmmandEntity command) - { - if (command.CommandId.IsNullOrEmpty()) - { - command.CommandId = Guid.NewGuid().ToString("N"); - Add(command); - } - - else - { - Modify(command); - } - } - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskConfigRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskConfigRespository.cs deleted file mode 100644 index c6597b78..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskConfigRespository.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using ZilLion.Core.DapperWrapper.SqlServer; -using ZilLion.WebApi.TaskPlatform.Domain.Entity; -using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; - -namespace ZilLion.WebApi.TaskPlatform.Domain.Respository -{ - public class TaskConfigRespository : SqlServerRespository, ITaskConfigRespository - { - public TaskConfigRespository() - { - Context = new TaskRunnerContext(); - } - - - public IList GetjobConfigs() - { - return GetList(@"select * from task_config where isdeleted=0").ToList(); - } - - - /// - /// 删除 - /// - /// - public void RemoveTaskConfig(TaskConfig config) - { - config.IsDeleted = 1; //置状态 - Modify(config); - } - - public void AddData(TaskConfig taskConfig) - { - Add(taskConfig); - } - - public void MotifyData(TaskConfig taskConfig) - { - Modify(taskConfig); - } - - - /// - /// 获取单条config - /// - /// - public TaskConfig GetjobConfigById(string jobid, string nodeid = null) - { - if (nodeid.IsNotNullOrEmpty()) - return - GetList("select * from task_config where taskid=@jobid and isdeleted=0 and nodeid=@nodeid", - new {jobid, nodeid}).FirstOrDefault(); - - return - GetList(@"select * from task_config where taskid=@jobid and isdeleted=0", new {jobid}) - .FirstOrDefault(); - } - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskModuleConfigRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskModuleConfigRespository.cs deleted file mode 100644 index a848dedf..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskModuleConfigRespository.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using ZilLion.Core.DapperWrapper.SqlServer; -using ZilLion.WebApi.TaskPlatform.Domain.Entity; -using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; - -namespace ZilLion.WebApi.TaskPlatform.Domain.Respository -{ - public class TaskModuleConfigRespository : SqlServerRespository, - ITaskModuleConfigRespository - { - public TaskModuleConfigRespository() - { - Context = new TaskRunnerContext(); - } - - public void AddModuleConfig(TaskModuleConfigEntity entity) - { - Add(entity); - } - - public void MotifyModuleConfig(TaskModuleConfigEntity entity) - { - Modify(entity); - } - - public IEnumerable GetAllModuleConfigs() - { - return GetList(@"select * from task_module_config"); - } - - public TaskModuleConfigEntity GetModuleConfigById(string taskmoduleId) - { - return - GetList(@"select * from task_module_config where taskmoduleId=@taskmoduleId", new {taskmoduleId}) - .FirstOrDefault(); - } - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskMongoGridFsRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskMongoGridFsRespository.cs deleted file mode 100644 index 8819bee1..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskMongoGridFsRespository.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.IO; -using ZilLion.Core.MongoDbManager.GridFs; -using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; - -namespace ZilLion.WebApi.TaskPlatform.Domain.Respository -{ - public class TaskMongoGridFsRespository : GridFsRepository, ITaskMongoGridFsRespository - { - public Stream GetPackageStream(string fileId) - { - return GetFileAsStreamByKey(fileId); - } - - public string UploadFileToGridFs(string filename) - { - return UploadFile(filename); - } - - public string UploadFileToGridFs(Stream fileStream, string filename) - { - return UploadFile(fileStream, filename); - } - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskStateRespository.cs b/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskStateRespository.cs deleted file mode 100644 index 439839ed..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/Respository/TaskStateRespository.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using ZilLion.Core.DapperWrapper.SqlServer; -using ZilLion.WebApi.TaskPlatform.Domain.Entity; -using ZilLion.WebApi.TaskPlatform.Domain.Respository.Interface; - -namespace ZilLion.WebApi.TaskPlatform.Domain.Respository -{ - public class TaskStateRespository : SqlServerRespository, ITaskStateRespository - { - public TaskStateRespository() - { - Context = new TaskRunnerContext(); - } - - /// - /// 获取当前serverid所有记录 - /// - /// - public IEnumerable GetAllTaskState(string nodeid = null) - { - if (nodeid.IsNotNullOrEmpty()) - return - GetList(@"select * from task_state where nodeid=@nodeid", - new {nodeid}).ToList(); - return GetList(@"select * from task_state " - ).ToList(); - } - - /// - /// 按ID 或者log - /// - /// - /// - /// - public TaskStateEntity GetTaskState(string taskid, string nodeid = null) - { - if (nodeid.IsNotNullOrEmpty()) - - return - GetList(@"select * from task_state where taskid=@taskid and nodeid=@nodeid", - new {nodeid, taskid}).FirstOrDefault(); - return GetList(@"select * from task_state where taskid=@taskid", - new {nodeid, taskid}).FirstOrDefault(); - } - - - /// - /// 修改 - /// - /// - public void SaveTaskState(TaskStateEntity logEntity) - { - var old = GetTaskState(logEntity.Taskid, logEntity.NodeId); - if (old != null) - Modify(logEntity); - else - Add(logEntity); - } - - /// - /// 删除 - /// - /// - public void RemoveTaskState(TaskStateEntity logEntity) - { - Remove(logEntity); - } - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/TaskRunnerContext.cs b/ZilLion.WebApi.TaskPlatform.Domain/TaskRunnerContext.cs deleted file mode 100644 index eb4cc349..00000000 --- a/ZilLion.WebApi.TaskPlatform.Domain/TaskRunnerContext.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Data; -using System.Data.Common; -using System.Data.SqlClient; -using ZilLion.Core.ConfigManager.Manager; -using ZilLion.Core.DapperWrapper; - -namespace ZilLion.WebApi.TaskPlatform.Domain -{ - public class TaskRunnerContext : IDbContext - { - private readonly string _connectionString; - public TaskRunnerContext() - { - _connectionString = - ZilLionConfigurationManager.GetConfigInstance().MangerConnectionString; - } - public IDbConnection GetConnection() - { - DbConnection connection = new SqlConnection(_connectionString); - return connection; - } - - public string ContextName => "TaskRunnerContext"; - } -} \ No newline at end of file diff --git a/ZilLion.WebApi.TaskPlatform.Domain/ZilLion.WebApi.TaskPlatform.Domain.csproj b/ZilLion.WebApi.TaskPlatform.Domain/ZilLion.WebApi.TaskPlatform.Domain.csproj index 386db559..144340fa 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/ZilLion.WebApi.TaskPlatform.Domain.csproj +++ b/ZilLion.WebApi.TaskPlatform.Domain/ZilLion.WebApi.TaskPlatform.Domain.csproj @@ -9,7 +9,7 @@ Properties ZilLion.WebApi.TaskPlatform.Domain ZilLion.WebApi.TaskPlatform.Domain - v4.5 + v4.5.2 512 @@ -46,11 +46,11 @@ True - ..\packages\ZilLion.Core.DapperWrapper.1.0.16\lib\net45\Dapper.dll + ..\packages\ZilLion.Core.DapperWrapper.1.0.21\lib\net45\Dapper.dll True - ..\packages\ZilLion.Core.DapperWrapper.1.0.16\lib\net45\DapperExtensions.dll + ..\packages\ZilLion.Core.DapperWrapper.1.0.21\lib\net45\DapperExtensions.dll True @@ -106,23 +106,23 @@ - ..\packages\ZilLion.Core.ConfigManager.1.0.7\lib\net45\ZilLion.Core.ConfigManager.dll + ..\packages\ZilLion.Core.ConfigManager.1.0.9\lib\net45\ZilLion.Core.ConfigManager.dll True - ..\packages\ZilLion.Core.DapperWrapper.1.0.16\lib\net45\ZilLion.Core.DapperWrapper.dll + ..\packages\ZilLion.Core.DapperWrapper.1.0.21\lib\net45\ZilLion.Core.DapperWrapper.dll True - ..\packages\ZilLion.Core.MongoDbManager.1.0.1\lib\net45\ZilLion.Core.MongoDbManager.dll + ..\packages\ZilLion.Core.MongoDbManager.1.0.4\lib\net45\ZilLion.Core.MongoDbManager.dll True - ..\packages\ZilLion.Core.SqliteRepository.1.0.1\lib\net45\ZilLion.Core.SqliteRepository.dll + ..\packages\ZilLion.Core.SqliteRepository.1.0.3\lib\net45\ZilLion.Core.SqliteRepository.dll True - ..\packages\ZilLion.Core.Unities.1.0.9\lib\net45\ZilLion.Core.Unities.dll + ..\packages\ZilLion.Core.Unities.1.0.16\lib\net45\ZilLion.Core.Unities.dll True @@ -177,12 +177,6 @@ - - - {982E545E-1587-4F1D-B178-B096DA8FCAB2} - ZilLion.WebApi.Core.Domain - - @@ -190,6 +184,12 @@ PreserveNewest + + + {982e545e-1587-4f1d-b178-b096da8fcab2} + ZilLion.WebApi.Core.Domain + + diff --git a/ZilLion.WebApi.TaskPlatform.Domain/app.config b/ZilLion.WebApi.TaskPlatform.Domain/app.config index 72dd2fb9..cc8499fe 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/app.config +++ b/ZilLion.WebApi.TaskPlatform.Domain/app.config @@ -1,19 +1,19 @@ - + - - + + - - + + - - + + - + diff --git a/ZilLion.WebApi.TaskPlatform.Domain/packages.config b/ZilLion.WebApi.TaskPlatform.Domain/packages.config index bb3dfe8b..8f86026a 100644 --- a/ZilLion.WebApi.TaskPlatform.Domain/packages.config +++ b/ZilLion.WebApi.TaskPlatform.Domain/packages.config @@ -11,11 +11,11 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/ZilLion.WebApiApp/ZilLion.WebApiApp.csproj b/ZilLion.WebApiApp/ZilLion.WebApiApp.csproj index c10ea89f..d479cf24 100644 --- a/ZilLion.WebApiApp/ZilLion.WebApiApp.csproj +++ b/ZilLion.WebApiApp/ZilLion.WebApiApp.csproj @@ -257,6 +257,7 @@ Always + @@ -300,13 +301,13 @@ {5def4b5b-66f5-4a15-9a44-30b563304e50} ZilLion.Webapi.ObjectStorage.Domain - - {5b724310-4753-4e52-8302-ab56b13c2c97} - ZilLion.Webapi.WeChatMall.Controllers + + {be3b5f9f-d4b7-45bb-8626-f195c0915021} + ZilLion.WebApi.TaskPlatform.Controllers - - {fafef6ec-0612-4551-b1ee-a312a4e4ad63} - ZilLion.Webapi.WeChatMall.Domain + + {52baf0a0-6b15-415a-bb5d-41bb14e592e5} + ZilLion.WebApi.TaskPlatform.Domain {17ce89ef-4edd-43e4-bb3d-c4d5c6fc1f7e} diff --git a/ZilLion.WebApiApp/ZilLion.WebApiApp.csproj.user b/ZilLion.WebApiApp/ZilLion.WebApiApp.csproj.user index 20aab824..8bc4b09e 100644 --- a/ZilLion.WebApiApp/ZilLion.WebApiApp.csproj.user +++ b/ZilLion.WebApiApp/ZilLion.WebApiApp.csproj.user @@ -2,7 +2,7 @@ true - wechatmall + TaskManagerOss ProjectFiles diff --git a/ZilLion.WebApiApp/zlsetting.json b/ZilLion.WebApiApp/zlsetting.json index ca1efb92..3130005d 100644 --- a/ZilLion.WebApiApp/zlsetting.json +++ b/ZilLion.WebApiApp/zlsetting.json @@ -16,49 +16,15 @@ "DatabaseName": "OSS", "RootName": "IMG" }, - "ElemeConfig": { - "ElemeClientid": "Oy4FxZBhH8", - "ElemeClientSecret": "86d01a439c6a8ed8d0da5b503cfed5f5" - }, "TaskManagerServiceConfig": { - "MangerConnectionString": - "data source=devserver,2003;initial catalog=z9物流中心;user id=sa;pooling=true;min pool size=1;max pool size=1;Connection Timeout=0" + "MangerConnectionString": "data source=123.57.226.114,2433;initial catalog=作业调度平台20170629;user id=sa;Password=84519741;pooling=true;min pool size=1;max pool size=50;Connection Timeout=0" }, "WebApiAppConfig": { - //"ElemeO2o", "YouzanO2O", "KouBeiO2O", "TaskPlatform", "TpO2OProxy", "MeituanO2o", "QyWeChat", "SMS" - "WebModules": ["WeChatMall", "ZilLionOss", "ObjectStorage"], + "WebModules": [ "ZilLionOss", "ObjectStorage", "TaskPlatform" ], "JwtSecretKey": "b1a5fb7e7ecd45939886c2e902fd871a", "TraceEnable": false, "SwagerEnable": true }, - "KoubeiConfig": { - "KoubeiAppPrivateKey": - "MIICXQIBAAKBgQCsKbLFA/q7uibA/Z/3/fC0o4VwNNLkbu94wi8XFAlIha+FKEHm1QATPhCZl6b5LGHpDwyM2qSgMBgV6/pBaObPVS/KajiHmEDXCGGjcxmItLM5uhXzL9a4tOGJoG7wo98Lf9WvSjQumP8XE7GLC8m0iqxIe1TomXcvf8BmFFy9swIDAQABAoGAXLCGgvPFhlSOkND70zRw55AyQ1rtP/dKDqXdXHt5FAaFnRczg+ehhrqfjVHMn9J5VFS52QvOHkBGd2b48UZdHNh9cINlSt+ItHxkbdyl7asxN2zeBOpHcCI9iSraqUt04IA/sbLzjaoGbS0r4kDDEvFMgsaCjrlOcMEoa2Nkl+ECQQDiJ6cxqQjYW/4f5vmDVOPR0lhwEf9qR2dbBGu4jVLtz7XWwlw8FswAHRrZSAZkNIekqomB2UQuk452EWuoXN03AkEAwuH+8BSSa5bO1GO4aRv0FAUqyS2G/xQEK5dS9FyjRJk3f7Bu+9ngVilMGUMCuFGOnJYEX1bc5Qhp3t44tCXBZQJBALt6dc7kOxHpSQS3XFb0M5xITMozEVLQeKzqQEaQ2ZONYkfzfbTOjTT267/+RlYheeUW/sEnFK+r4SidjmrW+QcCQEOuy6TD8EpPeQvIil5u5+kgFkkCd9UVNZGSH6xglA+aCu1c8F6lv8UM2LIZVNOA97+oVmJqP5OHxYUytozSZAUCQQCgJilIfCAAUTUpfJBzr9toxdTV8hIDvVH1+HZZ/qfO7I0EmPtmvlGCq6PaopWYNNY6sgR4NPgHmJRvYhb6jXvs", - "KoubeiAppPublicKey": - "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDI6d306Q8fIfCOaTXyiUeJHkrIvYISRcc73s3vF1ZT7XN8RNPwJxo8pWaJMmvyTn9N4HQ632qJBVHf8sxHi/fEsraprwCtzvzQETrNRwVxLO5jVmRGi60j8Ue1efIlzPXV9je9mkjzOmdssymZkh2QhUrCmZYI/FCEa3/cNMW0QIDAQAB", - "KoubeiAppid": "2017042406936011" - }, - "TpO2OProxyConfig": { - "O2Oapiversion": "1.0.0.0", - "ProxyConfigDbConnectionString": - "data source=123.57.226.114,2433;initial catalog=TpO2OProxyConfigDB20170420;user id=sa;Password=84519741;pooling=true;min pool size=1;max pool size=50;Connection Timeout=0", - "PushCallbackDbConnectionString": - "data source=123.57.226.114,2433;initial catalog=TpO2OProxyConfigDB20170420;user id=sa;Password=84519741;pooling=true;min pool size=1;max pool size=50;Connection Timeout=0", - "MaxMsgReadCount": 20 - }, - "YouzanConfig": { - "YouzanClientid": "e91fa4c583d633ca3a", - "YouzanClientSecret": "c904b7c319dbd8a71f468997dd7758d2" - }, - "SmsConfig": { - "SmsAccount": "szsms39", - "SmsPwd": "Tch544328", - "SmsUrl": "http://222.73.117.158:80/msg/HttpBatchSendSM" - }, - "MeituanConfig": { - "DeveloperId": "100344", - "SignKey": "y484oyevqjysj8q8" - }, "SelfHostConfig": { "ServiceSelfHostUrl": "http://localhost:9000/", "ServiceDescription": "用于作业节点管理,任务命令分发", @@ -66,13 +32,11 @@ "ServiceName": "TaskManagerapiService" }, "OssConfig": { - "OssDbConnectionString": - "data source=123.57.226.114,2433;initial catalog=ZilLionOssDevDbByYanzhengyu;user id=sa;Password=84519741;pooling=true;min pool size=1;max pool size=50;Connection Timeout=0" + "OssDbConnectionString": "data source=123.57.226.114,2433;initial catalog=20170926OSSDEV;user id=sa;Password=84519741;pooling=true;min pool size=1;max pool size=50;Connection Timeout=0" }, "WechatMallConfig": { "GaodeMapKey": "6a81e7261533472a311f4abcb56ea28f", "WechatCrmApiGetway": "http://123.57.226.114:9005", - "DbConnectionString": - "data source=123.57.226.114,2433;initial catalog=微商城170906;user id=sa;Password=84519741;pooling=true;min pool size=1;max pool size=50;Connection Timeout=0" + "DbConnectionString": "data source=123.57.226.114,2433;initial catalog=微商城170906;user id=sa;Password=84519741;pooling=true;min pool size=1;max pool size=50;Connection Timeout=0" } } \ No newline at end of file diff --git a/ZilLion.Webapi.WeChatMall.Controllers/OrderController.cs b/ZilLion.Webapi.WeChatMall.Controllers/OrderController.cs index a9458fba..6b37c149 100644 --- a/ZilLion.Webapi.WeChatMall.Controllers/OrderController.cs +++ b/ZilLion.Webapi.WeChatMall.Controllers/OrderController.cs @@ -63,6 +63,21 @@ namespace ZilLion.Webapi.WeChatMall.Controllers return new OrderResponse {Order = dto}; } + /// + /// 获取订单列表 + /// + /// + /// + [Route("GetPrePayOrderList")] + [HttpGet] + public OrderListResponse GetPrePayOrderList( string token = null) + + + { + return new OrderListResponse {List = new List()}; + } + + /// /// 获取订单列表 /// @@ -74,7 +89,7 @@ namespace ZilLion.Webapi.WeChatMall.Controllers [HttpGet] public OrderListResponse GetOrderList(string maxSno = "", int count = 15, string token = null) { - return new OrderListResponse {List = new List()}; + return new OrderListResponse { List = new List() }; } /// diff --git a/ZilLion.Webapi.WeChatMall.Domain/Repositorys/Order/PrepayOrderMainRepository.cs b/ZilLion.Webapi.WeChatMall.Domain/Repositorys/Order/PrepayOrderMainRepository.cs index 1f16479f..a230f63f 100644 --- a/ZilLion.Webapi.WeChatMall.Domain/Repositorys/Order/PrepayOrderMainRepository.cs +++ b/ZilLion.Webapi.WeChatMall.Domain/Repositorys/Order/PrepayOrderMainRepository.cs @@ -48,7 +48,7 @@ namespace ZilLion.Webapi.WeChatMall.Domain.Repositorys.Order public IList GetOrders() { - throw new NotImplementedException(); + return GetAll().ToList(); } } } \ No newline at end of file diff --git a/ZilLion.Webapi.WeChatMall.Domain/Services/Interface/IOrderService.cs b/ZilLion.Webapi.WeChatMall.Domain/Services/Interface/IOrderService.cs index cc69e188..66644afe 100644 --- a/ZilLion.Webapi.WeChatMall.Domain/Services/Interface/IOrderService.cs +++ b/ZilLion.Webapi.WeChatMall.Domain/Services/Interface/IOrderService.cs @@ -1,4 +1,5 @@ -using ZilLion.Webapi.WeChatMall.Domain.CrmProxy; +using System.Collections.Generic; +using ZilLion.Webapi.WeChatMall.Domain.CrmProxy; using ZilLion.Webapi.WeChatMall.Domain.Entitys.Orders; using ZilLion.Webapi.WeChatMall.Domain.Repositorys.Interface.CrmProxy; using ZilLion.Webapi.WeChatMall.Domain.Responses.CrmProxy; @@ -24,5 +25,12 @@ namespace ZilLion.Webapi.WeChatMall.Domain.Services.Interface OrderCompletedInfoDto CashPay(AccCashPayResponse payResult, OrderCompletedInfoDto orderInfo, AccInfo accinfo, string passport, PassportType passporttype); + + + /// + /// 获取未付款订单 + /// + /// + IList GetPrePayOrders(); } } \ No newline at end of file diff --git a/ZilLion.Webapi.WeChatMall.Domain/Services/OrderService.cs b/ZilLion.Webapi.WeChatMall.Domain/Services/OrderService.cs index 5435c4c5..23ad2b16 100644 --- a/ZilLion.Webapi.WeChatMall.Domain/Services/OrderService.cs +++ b/ZilLion.Webapi.WeChatMall.Domain/Services/OrderService.cs @@ -168,5 +168,10 @@ namespace ZilLion.Webapi.WeChatMall.Domain.Services } return orderInfo; } + + public IList GetPrePayOrders() + { + throw new NotImplementedException(); + } } } \ No newline at end of file -- Gitee