|
|
@ -222,6 +222,7 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
public void DeliveryCallbackFrom1688(string jsonStr) |
|
|
|
{ |
|
|
|
logger.Info(jsonStr); |
|
|
|
var orderJObject = JObject.Parse(jsonStr); |
|
|
|
var purchaseOrderId = orderJObject["data"].Value<string>("orderId"); |
|
|
|
Task.Factory.StartNew(() => DeliveryCallback(purchaseOrderId, Enums.Platform.阿里巴巴), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); |
|
|
@ -253,10 +254,8 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
#region 查询采购账号
|
|
|
|
currentProgress = "查询采购账号"; |
|
|
|
var purchaseAccountExp = orderDropshipping.PurchaseAccountId != 0 ? |
|
|
|
new Func<PurchaseAccount, bool>(pa => pa.Id == orderDropshipping.PurchaseAccountId) : |
|
|
|
new Func<PurchaseAccount, bool>(pa => pa.AccountName == orderDropshipping.BuyerAccount); |
|
|
|
var purchaseAccount = fsql.Select<PurchaseAccount>().Where(pa => purchaseAccountExp(pa)) |
|
|
|
var purchaseAccount = fsql.Select<PurchaseAccount>().WhereIf(orderDropshipping.PurchaseAccountId != 0, pa => pa.Id == orderDropshipping.PurchaseAccountId) |
|
|
|
.WhereIf(orderDropshipping.PurchaseAccountId == 0, pa => pa.AccountName == orderDropshipping.BuyerAccount) |
|
|
|
.Where(pa => pa.PurchasePlatformId == callbackPlatform).ToOne(); |
|
|
|
if (purchaseAccount == null) |
|
|
|
throw new Exception($"未查询到采购账号{orderDropshipping.BuyerAccount}"); |
|
|
|