From 1f144dba29ba41b184b79c331baf28d4dc46b6af Mon Sep 17 00:00:00 2001
From: shanj <18996038927@163.com>
Date: Mon, 15 Apr 2024 14:18:37 +0800
Subject: [PATCH] 1
---
.../PurchaseOrder/PurchaseOrderBusiness.cs | 42 +++++++------------
1 file changed, 15 insertions(+), 27 deletions(-)
diff --git a/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs b/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
index cb16449..8900f37 100644
--- a/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
+++ b/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
@@ -2396,16 +2396,16 @@ namespace BBWYB.Server.Business
{
case "ORDER_BUYER_VIEW_PART_PART_SENDGOODS": //部分发货
case "ORDER_BUYER_VIEW_ANNOUNCE_SENDGOODS": //发货
- DeliveryCallbackFrom1688(jObject, _1688ConcurrentKey);
+ DeliveryCallbackFrom1688(jObject);
break;
case "ORDER_BUYER_VIEW_ORDER_PRICE_MODIFY":
- OrderPriceModificationCallbackFrom1688(jObject, _1688ConcurrentKey); //订单改价
+ OrderPriceModificationCallbackFrom1688(jObject); //订单改价
break;
case "LOGISTICS_BUYER_VIEW_TRACE":
// LogisticsUpdateCallbackFrom1688(jObject);//1688物流信息变更
break;
case "ORDER_BUYER_VIEW_ORDER_PAY":
- OrderPayFrom1688(jObject, _1688ConcurrentKey);
+ OrderPayFrom1688(jObject);
break;
default:
break;
@@ -2416,21 +2416,19 @@ namespace BBWYB.Server.Business
/// 1688发货回调
///
///
- /// 并发key
- private void DeliveryCallbackFrom1688(JObject jObject, string _1688ConcurrentKey)
+ private void DeliveryCallbackFrom1688(JObject jObject)
{
var purchaseOrderId = jObject["data"].Value("orderId");
- Task.Factory.StartNew(() => DeliveryCallbackFrom1688(purchaseOrderId, _1688ConcurrentKey), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler);
+ Task.Factory.StartNew(() => DeliveryCallbackFrom1688(purchaseOrderId), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler);
}
///
/// 1688发货回调
///
///
- ///
///
///
- private void DeliveryCallbackFrom1688(string purchaseOrderId, string _1688ConcurrentKey)
+ private void DeliveryCallbackFrom1688(string purchaseOrderId)
{
string orderId = string.Empty;
long? shopId = null;
@@ -2668,11 +2666,6 @@ namespace BBWYB.Server.Business
{
nLogManager.Default().Error(ex, $"DeliveryCallback 回调平台1688,订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo}");
}
- finally
- {
- if (!string.IsNullOrEmpty(_1688ConcurrentKey))
- memoryCache.Remove(_1688ConcurrentKey);
- }
}
///
@@ -2680,16 +2673,16 @@ namespace BBWYB.Server.Business
///
///
///
- private void OrderPriceModificationCallbackFrom1688(JObject jObject, string _1688ConcurrentKey)
+ private void OrderPriceModificationCallbackFrom1688(JObject jObject)
{
var purchaseOrderId = jObject["data"].Value("orderId");
- Task.Factory.StartNew(() => OrderPriceModificationCallback(purchaseOrderId, Enums.Platform.阿里巴巴, _1688ConcurrentKey), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler);
+ Task.Factory.StartNew(() => OrderPriceModificationCallback(purchaseOrderId, Enums.Platform.阿里巴巴), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler);
}
- private void OrderPayFrom1688(JObject jObject, string _1688ConcurrentKey)
+ private void OrderPayFrom1688(JObject jObject)
{
var purchaseOrderId = jObject["data"].Value("orderId");
- Task.Factory.StartNew(() => OrderPayCallback(purchaseOrderId, Enums.Platform.阿里巴巴, _1688ConcurrentKey), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler);
+ Task.Factory.StartNew(() => OrderPayCallback(purchaseOrderId, Enums.Platform.阿里巴巴), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler);
}
#endregion
@@ -2700,9 +2693,9 @@ namespace BBWYB.Server.Business
///
///
///
- private void OrderPriceModificationCallback(string purchaseOrderId, Enums.Platform callbackPlatform, string concurrentKey)
+ private void OrderPriceModificationCallback(string purchaseOrderId, Enums.Platform callbackPlatform)
{
- OnSomeOnePurchaseOrderChanged(purchaseOrderId, true, concurrentKey);
+ OnSomeOnePurchaseOrderChanged(purchaseOrderId, true);
}
///
@@ -2711,9 +2704,9 @@ namespace BBWYB.Server.Business
///
///
///
- private void OrderPayCallback(string purchaseOrderId, Enums.Platform callbackPlatform, string concurrentKey)
+ private void OrderPayCallback(string purchaseOrderId, Enums.Platform callbackPlatform)
{
- OnSomeOnePurchaseOrderChanged(purchaseOrderId, false, concurrentKey);
+ OnSomeOnePurchaseOrderChanged(purchaseOrderId, false);
}
public void KuaiDi100Publish(string param)
@@ -2986,7 +2979,7 @@ namespace BBWYB.Server.Business
/// 采购单Id
/// 当不需要触发订单改价时是否继续走流程
/// 并发key
- public void OnSomeOnePurchaseOrderChanged(string purchaseOrderId, bool keepRunWhenNoEditOrderPirce, string concurrentKey)
+ public void OnSomeOnePurchaseOrderChanged(string purchaseOrderId, bool keepRunWhenNoEditOrderPirce)
{
bool isEditOrderPrice = true;
try
@@ -3241,11 +3234,6 @@ namespace BBWYB.Server.Business
{
nLogManager.Default().Error(ex, $"OrderPriceModificationCallback 采购单号{purchaseOrderId}");
}
- finally
- {
- if (!string.IsNullOrEmpty(concurrentKey))
- memoryCache.Remove(concurrentKey);
- }
}
private void SendDingDing(string content)