diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json index e2aab069..bc139af1 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json @@ -7,7 +7,7 @@ "launchUrl": "swagger", "applicationUrl": "http://localhost:44314", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Production" } } } diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Production.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Production.json index 3f557e88..11ae9e2d 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Production.json +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Production.json @@ -15,7 +15,7 @@ }, "Routes": [ { - "DownstreamPathTemplate": "/swagger/ProjectName/swagger.json", + "DownstreamPathTemplate": "/{url}", "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { @@ -23,7 +23,7 @@ "Port": 44315 } ], - "UpstreamPathTemplate": "/ProjectName/swagger.json", + "UpstreamPathTemplate": "/gateway/{url}", "UpstreamHttpMethod": [ "Get", "Post", @@ -33,14 +33,14 @@ }, { "DownstreamPathTemplate": "/{url}", - "DownstreamScheme": "http", + "DownstreamScheme": "ws", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44315 } ], - "UpstreamPathTemplate": "/{url}", + "UpstreamPathTemplate": "/ws/{url}", "UpstreamHttpMethod": [ "Get", "Post", diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/Notifications/DapperNotificationRepository.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/Notifications/DapperNotificationRepository.cs index b2133f6e..0522a5bf 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/Notifications/DapperNotificationRepository.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/Notifications/DapperNotificationRepository.cs @@ -101,7 +101,7 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not + $"left join {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b on b.NotificationId=a.Id " + "where a.IsDeleted=0 " + "and a.MessageType=20 " - + "and b.ReceiveId=@userId " + + "and b.ReceiveId=?userId " + "order by b.Read, CreationTime desc "; } @@ -113,7 +113,7 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not + $"left join {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b on b.NotificationId=a.Id " + "where a.IsDeleted=0 " + "and a.MessageType=20 " - + "and b.ReceiveId=@userId "; + + "and b.ReceiveId=?userId "; } private string BuildPageBroadCastCountSql() @@ -126,7 +126,7 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not + "and a.Id not in " + " (select NotificationId " + $"from {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b " - + " where b.ReceiveId = @userId) " + + " where b.ReceiveId = ?userId) " + "union " + " select a.Id, a.Title, a.Content, a.CreationTime, a.SenderId, true as \"Read\" " + $"from {NotificationManagementDbProperties.DbTablePrefix}Notification a " @@ -135,7 +135,7 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not + "and a.Id in " + $" (select {NotificationManagementDbProperties.DbTablePrefix}NotificationId " + $"from {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b " - + "where b.ReceiveId = @userId) " + + "where b.ReceiveId = ?userId) " + " ) as tt "; } @@ -149,7 +149,7 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not + "and a.Id not in " + " (select NotificationId " + $"from {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b " - + " where b.ReceiveId = @userId) " + + " where b.ReceiveId = ?userId) " + "union" + " select a.Id, a.Title, a.Content, a.CreationTime, a.SenderId, true as \"Read\" " + $"from {NotificationManagementDbProperties.DbTablePrefix}Notification a " @@ -158,7 +158,7 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not + "and a.Id in " + " (select NotificationId " + $"from {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b " - + "where b.ReceiveId = @userId)" + + "where b.ReceiveId = ?userId)" + " ) as tt order by tt.Read,tt.CreationTime "; } } diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json index d1785b53..ec45c5f9 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json @@ -5,7 +5,7 @@ "launchBrowser": true, "applicationUrl": "http://localhost:44315", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Production" } } }