From c1b9b2a316cdd59393bd55cae18a0c55fa5717e2 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Thu, 14 Dec 2023 09:07:54 +0800 Subject: [PATCH 1/2] CNTRTOTAL --- .../Service/BookingOrder/BookingOrderService.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 0bf860a3..fc7dffb2 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -1124,10 +1124,13 @@ namespace Myshipping.Application } //把前端传递的已修改字段转换为属性名称 + var lstPropName = new List + { + "CNTRTOTAL" + }; if (input.ChangedFields != null && input.ChangedFields.Count > 0) { var propsOrder = typeof(BookingOrder).GetProperties(); - var lstPropName = new List(); input.ChangedFields.ForEach(x => { var pchg = propsOrder.FirstOrDefault(p => p.Name.ToLower() == x.ToLower()); @@ -1137,11 +1140,9 @@ namespace Myshipping.Application } }); - if (lstPropName.Count > 0) - { - await _rep.AsUpdateable(entity).UpdateColumns(lstPropName.ToArray()).ExecuteCommandAsync(); - } } + + await _rep.AsUpdateable(entity).UpdateColumns(lstPropName.ToArray()).ExecuteCommandAsync(); //await _rep.AsUpdateable(entity).IgnoreColumns(it => new //{ // it.ParentId, @@ -1266,7 +1267,7 @@ namespace Myshipping.Application _logger.LogInformation($"数据有变化,更新运踪订阅"); //更改提单号重新订阅运踪 await _publisher.PublishAsync(new ChannelEventSource("BillTrace:Update", new { BookingId = entity.Id, TenentId = UserManager.TENANT_ID, UserId = UserManager.UserId, UserName = UserManager.Name, DjyUserId = UserManager.DjyUserId })); - + if (!string.IsNullOrEmpty(reqId)) { _logger.LogWarning($"保存请求[{reqId}],更新运踪完成"); From 5566d6a30c91ebc3b95fe0f3410b67eaaf9b49be Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Thu, 14 Dec 2023 11:35:24 +0800 Subject: [PATCH 2/2] header --- Myshipping.Web.Core/applicationconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Myshipping.Web.Core/applicationconfig.json b/Myshipping.Web.Core/applicationconfig.json index 0d5c0159..f709c330 100644 --- a/Myshipping.Web.Core/applicationconfig.json +++ b/Myshipping.Web.Core/applicationconfig.json @@ -1,7 +1,7 @@ { //如果前端不代理的话,又是axios请求的话,需要添加以下代码 "CorsAccessorSettings": { - "WithExposedHeaders": [ "Content-Disposition" ] + "WithExposedHeaders": [ "Content-Disposition", "access-token", "x-access-token", "need-modify-password" ] }, //动态api配置 //"DynamicApiControllerSettings": {