|
|
@ -30,15 +30,21 @@ namespace BBWY.Client.ViewModels |
|
|
|
{ |
|
|
|
var j = JObject.Parse(msg); |
|
|
|
var buyerAccount = j.Value<string>("user"); |
|
|
|
var orderId = j.Value<string>("orderId"); |
|
|
|
if (string.IsNullOrEmpty(buyerAccount) && string.IsNullOrEmpty(orderId)) |
|
|
|
return; |
|
|
|
|
|
|
|
var phone = j.Value<string>("phone"); |
|
|
|
if (!string.IsNullOrEmpty(buyerAccount) && !string.IsNullOrEmpty(phone)) |
|
|
|
{ |
|
|
|
var key = $"{buyerAccount}_{phone}"; |
|
|
|
if (!dongdongBuyerDictionary.TryAdd(key, phone)) |
|
|
|
if (!dongdongBuyerDictionary.TryAdd(msg, phone)) |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var order = OrderList.FirstOrDefault(o => !string.IsNullOrEmpty(o.BuyerAccount) && o.BuyerAccount == buyerAccount); |
|
|
|
var order = OrderList.FirstOrDefault(o => o.Id == orderId); |
|
|
|
if (order == null) |
|
|
|
order = OrderList.FirstOrDefault(o => !string.IsNullOrEmpty(o.BuyerAccount) && o.BuyerAccount == buyerAccount); |
|
|
|
|
|
|
|
if (order == null || order.Consignee == null || order.Consignee.IsDecode) |
|
|
|
return; //已经解密过
|
|
|
|
|
|
|
|