From 76b05e5879b02d9c15768f469781c2928d98ed6c Mon Sep 17 00:00:00 2001 From: cjy Date: Tue, 3 Sep 2024 09:12:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9B=E6=B5=B7=E8=BF=90=E5=87=BA=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HangfireMiddleware.cs | 2 +- .../WorkServiceHangfireModuleInstall.cs | 14 ++--- .../HangfireJob/Method/OpJobService.cs | 20 +++---- .../Info/Dtos/ControllerClientRes.cs | 6 ++ .../DS.WMS.Core/Op/Dtos/SeaExportReq.cs | 5 ++ .../DS.WMS.Core/Op/Dtos/SeaExportRes.cs | 5 ++ .../DS.WMS.Core/Op/Entity/SeaExport.cs | 6 ++ .../Sys/Method/ClientCommonService.cs | 1 - ds-wms-service/DS.WMS.JobService/Program.cs | 17 ++++-- .../WindowsBackgroundService.cs | 54 ++++++++++++++++++ ds-wms-service/DS.WMS.JobService/Worker.cs | 56 ++++++++++++++++--- .../DS.WMS.JobServiceApi.csproj | 41 -------------- .../DS.WMS.JobServiceApi.http | 6 -- .../ExceptionHandlingMiddleware.cs | 56 ------------------- .../DS.WMS.JobServiceApi/Program.cs | 46 --------------- .../Properties/launchSettings.json | 31 ---------- .../appsettings.Development.json | 8 --- .../DS.WMS.JobServiceApi/appsettings.json | 29 ---------- .../DS.WMS.JobServiceApi/nlog.config | 36 ------------ ds-wms-service/ds-wms-service.sln | 7 --- 20 files changed, 155 insertions(+), 291 deletions(-) create mode 100644 ds-wms-service/DS.WMS.JobService/WindowsBackgroundService.cs delete mode 100644 ds-wms-service/DS.WMS.JobServiceApi/DS.WMS.JobServiceApi.csproj delete mode 100644 ds-wms-service/DS.WMS.JobServiceApi/DS.WMS.JobServiceApi.http delete mode 100644 ds-wms-service/DS.WMS.JobServiceApi/ExceptionHandlingMiddleware.cs delete mode 100644 ds-wms-service/DS.WMS.JobServiceApi/Program.cs delete mode 100644 ds-wms-service/DS.WMS.JobServiceApi/Properties/launchSettings.json delete mode 100644 ds-wms-service/DS.WMS.JobServiceApi/appsettings.Development.json delete mode 100644 ds-wms-service/DS.WMS.JobServiceApi/appsettings.json delete mode 100644 ds-wms-service/DS.WMS.JobServiceApi/nlog.config diff --git a/ds-wms-service/DS.Module.HangfireModule/HangfireMiddleware.cs b/ds-wms-service/DS.Module.HangfireModule/HangfireMiddleware.cs index a0943309..47fc7c9f 100644 --- a/ds-wms-service/DS.Module.HangfireModule/HangfireMiddleware.cs +++ b/ds-wms-service/DS.Module.HangfireModule/HangfireMiddleware.cs @@ -20,7 +20,7 @@ namespace DS.Module.HangfireModule { if (app == null) throw new ArgumentNullException(nameof(app)); - app.UseHangfireServer(); // 用于将 Hangfire 任务处理服务器添加到请求处理管道中 + //app.UseHangfireServer(); // 用于将 Hangfire 任务处理服务器添加到请求处理管道中 // 将 Hangfire 仪表板添加到应用程序的请求处理管道中 app.UseHangfireDashboard("/hangfire", new DashboardOptions { diff --git a/ds-wms-service/DS.Module.HangfireModule/WorkServiceHangfireModuleInstall.cs b/ds-wms-service/DS.Module.HangfireModule/WorkServiceHangfireModuleInstall.cs index ac17e61a..a70d24b9 100644 --- a/ds-wms-service/DS.Module.HangfireModule/WorkServiceHangfireModuleInstall.cs +++ b/ds-wms-service/DS.Module.HangfireModule/WorkServiceHangfireModuleInstall.cs @@ -40,13 +40,13 @@ public static class WorkServiceHangfireModuleInstall TransactionTimeout = TimeSpan.FromMinutes(1), //- 交易超时。默认为1分钟。 TablesPrefix = "Hangfire" }))); - services.AddHangfireServer(options => - { - options.WorkerCount = AppSetting.app(new string[] { "HangfireSettings", "WorkerCount" }).ToInt(); - options.ServerName = AppSetting.app(new string[] { "HangfireSettings", "ServerName" }); - options.Queues = AppSetting.app(new string[] { "HangfireSettings", "Queues" }).Split(','); - }); - GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute { Attempts = 5 }); + //services.AddHangfireServer(options => + //{ + // options.WorkerCount = AppSetting.app(new string[] { "HangfireSettings", "WorkerCount" }).ToInt(); + // options.ServerName = AppSetting.app(new string[] { "HangfireSettings", "ServerName" }); + // options.Queues = AppSetting.app(new string[] { "HangfireSettings", "Queues" }).Split(','); + //}); + //GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute { Attempts = 5 }); services.AddHangfireServer(); } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/HangfireJob/Method/OpJobService.cs b/ds-wms-service/DS.WMS.Core/HangfireJob/Method/OpJobService.cs index 480a2506..7ec7bb06 100644 --- a/ds-wms-service/DS.WMS.Core/HangfireJob/Method/OpJobService.cs +++ b/ds-wms-service/DS.WMS.Core/HangfireJob/Method/OpJobService.cs @@ -44,7 +44,7 @@ namespace DS.WMS.Core.HangfireJob.Method jobComService = _serviceProvider.GetRequiredService(); } - public async void VgmLinkJob(BaseJobReq req) + public void VgmLinkJob(BaseJobReq req) { var tenantDb = saasService.GetBizJobDbScopeById(req); tenantDb.QueryFilter.Clear(); @@ -64,7 +64,7 @@ namespace DS.WMS.Core.HangfireJob.Method { BusinessId = bookingId }; - await tenantDb.Insertable(orderUrl).ExecuteCommandAsync(); + tenantDb.Insertable(orderUrl).ExecuteCommand(); } //if (!string.IsNullOrEmpty(orderUrl.UrlVgm)) @@ -134,7 +134,7 @@ namespace DS.WMS.Core.HangfireJob.Method throw new Exception("箱型EDI配置未找到:{0}\", $\"{string.Join(',', expCode)}(VGM)!"); } - var userInfo = await db.Queryable().Filter(null, true).FirstAsync(x => x.Id == req.UserId); + var userInfo = db.Queryable().Filter(null, true).First(x => x.Id == req.UserId); var tenant = db.Queryable().Filter(null, true).First(x => x.Id == req.TenantId); var destinationCode = jobComService.GetPortCode(order.DestinationId, tenantDb); @@ -216,7 +216,7 @@ namespace DS.WMS.Core.HangfireJob.Method var memoData = jobjResp.GetJObjectValue("memoData"); orderUrl.UrlVgm = memoData.GetStringValue("vgmUrl"); orderUrl.UrlVgmSi = memoData.GetStringValue("vgmAndSiUrl"); - await tenantDb.Updateable(orderUrl).ExecuteCommandAsync(); + tenantDb.Updateable(orderUrl).ExecuteCommand(); //货运动态 @@ -228,10 +228,10 @@ namespace DS.WMS.Core.HangfireJob.Method OpTime = DateTime.Now, MBLNO = order.MBLNO }; - await tenantDb.Insertable(bookingStatus).ExecuteCommandAsync(); + tenantDb.Insertable(bookingStatus).ExecuteCommand(); } - public async void TxxpLinkJob(BaseJobReq req) + public void TxxpLinkJob(BaseJobReq req) { var tenantDb = saasService.GetBizJobDbScopeById(req); tenantDb.QueryFilter.Clear(); @@ -246,7 +246,7 @@ namespace DS.WMS.Core.HangfireJob.Method { BusinessId = bookingId }; - await tenantDb.Insertable(orderUrl).ExecuteCommandAsync(); + tenantDb.Insertable(orderUrl).ExecuteCommand(); } //校验船公司 @@ -326,7 +326,7 @@ namespace DS.WMS.Core.HangfireJob.Method throw new Exception("箱型EDI配置未找到:{0}\", $\"{string.Join(',', expCode)}(提箱小票)!"); } - var userInfo = await db.Queryable().Filter(null, true).FirstAsync(x => x.Id == req.UserId); + var userInfo = db.Queryable().Filter(null, true).First(x => x.Id == req.UserId); var tenant = db.Queryable().Filter(null, true).First(x => x.Id == req.TenantId); //调用小票服务 @@ -384,7 +384,7 @@ namespace DS.WMS.Core.HangfireJob.Method //保存url var txxpUrl = jobjResp.GetStringValue("data"); orderUrl.UrlTxxp = txxpUrl; - await tenantDb.Updateable(orderUrl).ExecuteCommandAsync(); + tenantDb.Updateable(orderUrl).ExecuteCommand(); //货运动态 @@ -396,7 +396,7 @@ namespace DS.WMS.Core.HangfireJob.Method OpTime = DateTime.Now, MBLNO = order.MBLNO }; - await tenantDb.Insertable(bookingStatus).ExecuteCommandAsync(); + tenantDb.Insertable(bookingStatus).ExecuteCommand(); } } } diff --git a/ds-wms-service/DS.WMS.Core/Info/Dtos/ControllerClientRes.cs b/ds-wms-service/DS.WMS.Core/Info/Dtos/ControllerClientRes.cs index 69c9d735..09d97e4b 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Dtos/ControllerClientRes.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Dtos/ControllerClientRes.cs @@ -1,4 +1,5 @@ using DS.Module.Core.Extensions; +using SqlSugar; using System; using System.Collections.Generic; using System.Linq; @@ -126,5 +127,10 @@ namespace DS.WMS.Core.Info.Dtos /// 往来单位默认联系人 /// public ClientContactRes ClientContact { get; set; } + + /// + /// 服务项目 + /// + public string? ServiceItem { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportReq.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportReq.cs index 3d735ce5..dea1c5a5 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportReq.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportReq.cs @@ -1235,6 +1235,11 @@ public class SeaExportReq /// 所属业务部门名称 /// public string SaleDeptName { get; set; } + + /// + /// 服务项目 + /// + public string? ServiceItem { get; set; } } /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportRes.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportRes.cs index 57c68bdb..c928fb91 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportRes.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportRes.cs @@ -1453,4 +1453,9 @@ public class SeaExportRes /// 拆票或合票标志 1-拆票 2-合票 /// public int SplitOrMergeFlag { get; set; } + + /// + /// 服务项目 + /// + public string? ServiceItem { get; set; } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExport.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExport.cs index dcfc0c9b..441057e5 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExport.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExport.cs @@ -1620,4 +1620,10 @@ public class SeaExport : BaseOrgModel /// [SqlSugar.SugarColumn(ColumnDescription = "所属业务部门名称", IsNullable = true, Length = 100)] public string SaleDeptName { get; set; } + + /// + /// 服务项目 + /// + [SugarColumn(ColumnDescription = "服务项目", ColumnDataType = "text", IsNullable = true)] + public string? ServiceItem { get; set; } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs index 342c0089..c8a98cc5 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs @@ -141,7 +141,6 @@ public class ClientCommonService : IClientCommonService /// public async Task>> GetCarrierSelectList(string queryKey = "") { - var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var list = await tenantDb.Queryable() .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.Code.Contains(queryKey) || a.CnName.Contains(queryKey)) diff --git a/ds-wms-service/DS.WMS.JobService/Program.cs b/ds-wms-service/DS.WMS.JobService/Program.cs index af9f1240..d76204b2 100644 --- a/ds-wms-service/DS.WMS.JobService/Program.cs +++ b/ds-wms-service/DS.WMS.JobService/Program.cs @@ -10,12 +10,17 @@ using Hangfire; using DS.WMS.Core.HangfireJob.Interface; using DS.WMS.Core.HangfireJob.Method; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; using NLog.Web; var builder = Host.CreateApplicationBuilder(args); -//ӦΪ Windows -builder.Services.AddWindowsService(); +builder.Services.AddWindowsService(options => +{ + options.ServiceName = ".NET Work Service"; +}); //ע builder.Configuration .AddJsonFile(path: "appsettings.json", optional: false, reloadOnChange: true) @@ -38,15 +43,19 @@ builder.Services.AddSqlSugarInstall(); builder.Services.AddSaasDbInstall();//ֿ //עhangfire builder.Services.AddWorkServiceHangfireModuleInstall(); - -builder.Services.AddHostedService(); +//ӦΪ Windows +//builder.Services.AddWindowsService(); +builder.Services.AddHostedService(); // BackgroundService дδ쳣ֹͣ builder.Services.Configure(hostOptions => { hostOptions.BackgroundServiceExceptionBehavior = BackgroundServiceExceptionBehavior.Ignore; + hostOptions.ServicesStartConcurrently = true; + hostOptions.ServicesStopConcurrently = true; }); + var host = builder.Build(); host.Run(); diff --git a/ds-wms-service/DS.WMS.JobService/WindowsBackgroundService.cs b/ds-wms-service/DS.WMS.JobService/WindowsBackgroundService.cs new file mode 100644 index 00000000..e0bcc0d7 --- /dev/null +++ b/ds-wms-service/DS.WMS.JobService/WindowsBackgroundService.cs @@ -0,0 +1,54 @@ +using DS.WMS.Core.Code.Entity; +using Hangfire; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DS.WMS.JobService +{ + public sealed class WindowsBackgroundService( + ILogger logger) : BackgroundService + { + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + try + { + while (!stoppingToken.IsCancellationRequested) + { + + var _OpServer = new BackgroundJobServer(new BackgroundJobServerOptions + { + SchedulePollingInterval = TimeSpan.FromMinutes(1), + ServerName = "OpWorkService", + Queues = new[] { "op" } + }); + + //logger.LogWarning("{Joke}", joke); + + await Task.Delay(TimeSpan.FromMinutes(1), stoppingToken); + } + } + catch (OperationCanceledException) + { + // When the stopping token is canceled, for example, a call made from services.msc, + // we shouldn't exit with a non-zero exit code. In other words, this is expected... + } + catch (Exception ex) + { + logger.LogError(ex, "{Message}", ex.Message); + + // Terminates this process and returns an exit code to the operating system. + // This is required to avoid the 'BackgroundServiceExceptionBehavior', which + // performs one of two scenarios: + // 1. When set to "Ignore": will do nothing at all, errors cause zombie services. + // 2. When set to "StopHost": will cleanly stop the host, and log errors. + // + // In order for the Windows Service Management system to leverage configured + // recovery options, we need to terminate the process with a non-zero exit code. + Environment.Exit(1); + } + } + } +} diff --git a/ds-wms-service/DS.WMS.JobService/Worker.cs b/ds-wms-service/DS.WMS.JobService/Worker.cs index d7ba9e07..e0fa1e89 100644 --- a/ds-wms-service/DS.WMS.JobService/Worker.cs +++ b/ds-wms-service/DS.WMS.JobService/Worker.cs @@ -1,4 +1,5 @@ using DS.Module.Core; +using DS.WMS.Core.Code.Entity; using Hangfire; using Hangfire.MySql; @@ -7,25 +8,64 @@ namespace DS.WMS.JobService public class Worker : BackgroundService { private readonly ILogger _logger; - private BackgroundJobServer _server; + private BackgroundJobServer _OpServer; public Worker(ILogger logger) { _logger = logger; } - protected override async Task ExecuteAsync(CancellationToken stoppingToken) + + public override async Task StartAsync(CancellationToken stoppingToken) { - var options = new BackgroundJobServerOptions + try + { + while (!stoppingToken.IsCancellationRequested) + { + _OpServer = new BackgroundJobServer(new BackgroundJobServerOptions + { + SchedulePollingInterval = TimeSpan.FromMinutes(1), + ServerName = "OpWorkService", + Queues = new[] { "op" } + }); + await Task.Delay(TimeSpan.FromMinutes(1), stoppingToken); + } + } + catch (OperationCanceledException ex) + { + Console.WriteLine(ex.ToString()); + } + catch (Exception ex) { - SchedulePollingInterval = TimeSpan.FromMinutes(1), - ServerName = "WorkService", - Queues = new[] { "op", "task" } - }; + Console.WriteLine(ex.ToString()); + //Environment.Exit(1); + } + + } + //protected override async Task StopAsync(CancellationToken stoppingToken) + //{ + + + //} + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + //var options = new BackgroundJobServerOptions + //{ + // SchedulePollingInterval = TimeSpan.FromMinutes(1), + // ServerName = "WorkService", + // Queues = new[] { "op", "task" } + //}; while (!stoppingToken.IsCancellationRequested) { try { - _server = new BackgroundJobServer(options); + //_server = new BackgroundJobServer(options); + //_server = new BackgroundJobServer(new BackgroundJobServerOptions + //{ + // SchedulePollingInterval = TimeSpan.FromMinutes(1), + // ServerName = "WorkService", + // Queues = new[] { "op", "task" } + //}); + //_server = new BackgroundJobServer(); await DoWork(stoppingToken); Console.WriteLine("Hangfire Server started. Press any key to exit..."); diff --git a/ds-wms-service/DS.WMS.JobServiceApi/DS.WMS.JobServiceApi.csproj b/ds-wms-service/DS.WMS.JobServiceApi/DS.WMS.JobServiceApi.csproj deleted file mode 100644 index 8bfca7e9..00000000 --- a/ds-wms-service/DS.WMS.JobServiceApi/DS.WMS.JobServiceApi.csproj +++ /dev/null @@ -1,41 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - - - - - - - - - - - - - PreserveNewest - true - PreserveNewest - - - PreserveNewest - true - PreserveNewest - - - PreserveNewest - true - PreserveNewest - - - - diff --git a/ds-wms-service/DS.WMS.JobServiceApi/DS.WMS.JobServiceApi.http b/ds-wms-service/DS.WMS.JobServiceApi/DS.WMS.JobServiceApi.http deleted file mode 100644 index cb36f4a5..00000000 --- a/ds-wms-service/DS.WMS.JobServiceApi/DS.WMS.JobServiceApi.http +++ /dev/null @@ -1,6 +0,0 @@ -@DS.WMS.JobServiceApi_HostAddress = http://localhost:5063 - -GET {{DS.WMS.JobServiceApi_HostAddress}}/weatherforecast/ -Accept: application/json - -### diff --git a/ds-wms-service/DS.WMS.JobServiceApi/ExceptionHandlingMiddleware.cs b/ds-wms-service/DS.WMS.JobServiceApi/ExceptionHandlingMiddleware.cs deleted file mode 100644 index 8135b09f..00000000 --- a/ds-wms-service/DS.WMS.JobServiceApi/ExceptionHandlingMiddleware.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Net; -using System.Text.Json; - -namespace DS.WMS.JobServiceApi -{ - public class ExceptionHandlingMiddleware - { - - - private readonly RequestDelegate _next; // 用来处理上下文请求 - public ExceptionHandlingMiddleware(RequestDelegate next) - { - _next = next; - } - - public async Task InvokeAsync(HttpContext httpContext) - { - try - { - await _next(httpContext); //要么在中间件中处理,要么被传递到下一个中间件中去 - } - catch (Exception ex) - { - await HandleExceptionAsync(httpContext, ex); // 捕获异常了 在HandleExceptionAsync中处理 - } - } - private async Task HandleExceptionAsync(HttpContext context, Exception exception) - { - context.Response.ContentType = "application/json"; // 返回json 类型 - var response = context.Response; - - var errorResponse = new ErrorResponse - { - Success = false, - }; // 自定义的异常错误信息类型 - - switch (exception) - { - - - default: - response.StatusCode = (int)HttpStatusCode.InternalServerError; - errorResponse.Message = exception.Message;// "Internal Server errors. Check Logs!"; - break; - } - var result = JsonSerializer.Serialize(errorResponse); - await context.Response.WriteAsync(result); - } - - private class ErrorResponse - { - public bool Success { get; set; } = true; - public string Message { get; set; } - } - } -} diff --git a/ds-wms-service/DS.WMS.JobServiceApi/Program.cs b/ds-wms-service/DS.WMS.JobServiceApi/Program.cs deleted file mode 100644 index f76dce91..00000000 --- a/ds-wms-service/DS.WMS.JobServiceApi/Program.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Autofac; -using Autofac.Extensions.DependencyInjection; -using DS.Module.AutofacModule; -using DS.Module.HangfireModule; -using DS.Module.RedisModule; -using DS.Module.SqlSugar; -using DS.Module.UserModule; -using DS.WMS.JobServiceApi; -using NLog.Web; - -var builder = WebApplication.CreateBuilder(args); -//ע -builder.Configuration - .AddJsonFile(path: "appsettings.json", optional: false, reloadOnChange: true) - .Build(); -builder.Configuration.AddEnvironmentVariables(); -builder.Logging.AddNLog("nlog.config"); -// Add services to the container. -//Autofacע -builder.Host - .UseServiceProviderFactory(new AutofacServiceProviderFactory()) - .ConfigureContainer(builder => { builder.RegisterModule(new AutofacModuleRegister()); }); - -builder.Services.AddUserModuleInstall(); //û -builder.Services.AddRedisModuleInstall();//redis -builder.Services.AddSqlSugarInstall(); -builder.Services.AddSaasDbInstall();//ֿ -builder.Services.AddWorkServiceHangfireModuleInstall();//Hangfire -// BackgroundService дδ쳣ֹͣ -builder.Services.Configure(hostOptions => -{ - hostOptions.BackgroundServiceExceptionBehavior = BackgroundServiceExceptionBehavior.Ignore; -}); //ӦΪ Windows -builder.Services.AddWindowsService(); - -var app = builder.Build(); - -//app.UseHangfireMiddleware(); - - -//쳣м -app.UseMiddleware(); - -//app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); - -app.Run(); \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.JobServiceApi/Properties/launchSettings.json b/ds-wms-service/DS.WMS.JobServiceApi/Properties/launchSettings.json deleted file mode 100644 index 977ef097..00000000 --- a/ds-wms-service/DS.WMS.JobServiceApi/Properties/launchSettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:62943", - "sslPort": 0 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "weatherforecast", - "applicationUrl": "http://localhost:5063", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "weatherforecast", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/ds-wms-service/DS.WMS.JobServiceApi/appsettings.Development.json b/ds-wms-service/DS.WMS.JobServiceApi/appsettings.Development.json deleted file mode 100644 index b2dcdb67..00000000 --- a/ds-wms-service/DS.WMS.JobServiceApi/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/ds-wms-service/DS.WMS.JobServiceApi/appsettings.json b/ds-wms-service/DS.WMS.JobServiceApi/appsettings.json deleted file mode 100644 index 25870cfa..00000000 --- a/ds-wms-service/DS.WMS.JobServiceApi/appsettings.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "DBInfo": { - "DefaultDbConnId": "1288018625843826688", - "DefaultDbType": 0, - "DefaultDbString": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_dev", - "DBS": [ - { - "ConnId": "1288018625843826680", - "DBType": 0, - "Enabled": false, - "HitRate": 40, - "Connection": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_log" - } - ] - }, - - "HangfireSettings": { - "DbString": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_hangfire;Allow User Variables=true", - "WorkerCount": 10, - "ServerName": "WorkService", - "Queues": "op" - } -} diff --git a/ds-wms-service/DS.WMS.JobServiceApi/nlog.config b/ds-wms-service/DS.WMS.JobServiceApi/nlog.config deleted file mode 100644 index 46e6f7cb..00000000 --- a/ds-wms-service/DS.WMS.JobServiceApi/nlog.config +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ds-wms-service/ds-wms-service.sln b/ds-wms-service/ds-wms-service.sln index 9427db25..3000f802 100644 --- a/ds-wms-service/ds-wms-service.sln +++ b/ds-wms-service/ds-wms-service.sln @@ -76,8 +76,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DS.Module.HangfireModule", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DS.WMS.JobService", "DS.WMS.JobService\DS.WMS.JobService.csproj", "{99B79A25-3732-4023-BD56-ABD169CE43AD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.WMS.JobServiceApi", "DS.WMS.JobServiceApi\DS.WMS.JobServiceApi.csproj", "{7D66E0AA-92B3-45B6-8E12-058A9F2DC272}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -212,10 +210,6 @@ Global {99B79A25-3732-4023-BD56-ABD169CE43AD}.Debug|Any CPU.Build.0 = Debug|Any CPU {99B79A25-3732-4023-BD56-ABD169CE43AD}.Release|Any CPU.ActiveCfg = Release|Any CPU {99B79A25-3732-4023-BD56-ABD169CE43AD}.Release|Any CPU.Build.0 = Release|Any CPU - {7D66E0AA-92B3-45B6-8E12-058A9F2DC272}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7D66E0AA-92B3-45B6-8E12-058A9F2DC272}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7D66E0AA-92B3-45B6-8E12-058A9F2DC272}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7D66E0AA-92B3-45B6-8E12-058A9F2DC272}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -253,7 +247,6 @@ Global {7C3E248A-DF40-46AC-A8DF-224DD7C4EEF7} = {65D75DB2-12D5-4D1F-893D-9750905CE5E4} {BDF89987-3B7B-4CC6-88A9-DA4765F6FF62} = {518DB9B5-80A8-4B2C-8570-52BD406458DE} {99B79A25-3732-4023-BD56-ABD169CE43AD} = {65D75DB2-12D5-4D1F-893D-9750905CE5E4} - {7D66E0AA-92B3-45B6-8E12-058A9F2DC272} = {65D75DB2-12D5-4D1F-893D-9750905CE5E4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {66115F23-94B4-43C0-838E-33B5CF77F788}