cmj 6 hours ago
commit fd8125bf5c

@ -28959,8 +28959,8 @@ namespace TradeManageNew
ProductType = shopifyProductProfile?.Category,
Tags = shopifyProductProfile?.Tags,
Weight = product.Weight.Value,
JYPrice = 5m, //product.JYPrice.Value,
ShippingFee = 5m, //feeCost.Value,
JYPrice = product.JYPrice.Value, //product.JYPrice.Value,
ShippingFee = feeCost.Value, //feeCost.Value,
}
};
var shopifyProductRes = shopifyApiClient
@ -29025,8 +29025,8 @@ namespace TradeManageNew
ProductType = shopifyProductProfile?.Category,
Tags = shopifyProductProfile?.Tags,
Weight = product.Weight.Value,
JYPrice =5m,// product.JYPrice.Value,
ShippingFee= 5m,// feeCost.Value
JYPrice = product.JYPrice.Value,// product.JYPrice.Value,
ShippingFee= feeCost.Value,// feeCost.Value
},
Variants = new Variants
{
@ -29114,44 +29114,83 @@ namespace TradeManageNew
};
}
var originJsonData = JsonConvert.DeserializeObject<ShopifyUsedSaleOrderDto>(originJson);
using (var db = new TradeUsedSale.Repositories.ErpDbContext())
{
var includeUsedSale = false;
var errorMessage = string.Empty;
//Shopify二手订单
var newDtShopifyUsedSaleOrder = new TradeUsedSale.Repositories.Models.DT_ShopifyUsedSaleOrder
{
OrderId = originJsonData.Order.OrderId,
OrderNumber = originJsonData.Order.OrderNumber,
OrderName = originJsonData.Order.OrderName,
CreatedAt = originJsonData.Order.CreatedAt.DateTime,
UpdatedAt = originJsonData.Order.UpdatedAt.DateTime,
ProcessedAt = originJsonData.Order.ProcessedAt.DateTime,
Name = originJsonData.Recipient.Name,
Phone = originJsonData.Recipient.Phone,
Full = originJsonData.Recipient.Address.Full,
Detail = originJsonData.Recipient.Address.Detail,
Detail2 = originJsonData.Recipient.Address.Detail2,
City = originJsonData.Recipient.Address.City,
Province = originJsonData.Recipient.Address.Province,
ProvinceCode = originJsonData.Recipient.Address.ProvinceCode,
Zip = originJsonData.Recipient.Address.Zip,
Country = originJsonData.Recipient.Address.Country,
CountryCode = originJsonData.Recipient.Address.CountryCode,
Currency = originJsonData.Financial.Currency,
TotalPrice = originJsonData.Financial.TotalPrice,
SubtotalPrice = originJsonData.Financial.SubtotalPrice,
TotalTax = originJsonData.Financial.TotalTax,
TotalDiscounts = originJsonData.Financial.TotalDiscounts,
ShippingPrice = originJsonData.Financial.ShippingPrice,
PaymentMethod = originJsonData.Financial.PaymentMethod,
FinancialStatus = originJsonData.Financial.FinancialStatus,
RefundedAmount = originJsonData.Financial.RefundedAmount,
OriginJson = originJson,
IsPlaceOrderSuccess = false
};
var newDtShopifyUsedSaleOrder = new TradeUsedSale.Repositories.Models.DT_ShopifyUsedSaleOrder();
if (originJsonData.Recipient !=null)
{
newDtShopifyUsedSaleOrder = new TradeUsedSale.Repositories.Models.DT_ShopifyUsedSaleOrder
{
OrderId = originJsonData.Order.OrderId,
OrderNumber = originJsonData.Order.OrderNumber,
OrderName = originJsonData.Order.OrderName,
CreatedAt = originJsonData.Order.CreatedAt.DateTime,
UpdatedAt = originJsonData.Order.UpdatedAt.DateTime,
ProcessedAt = originJsonData.Order.ProcessedAt.DateTime,
Name = originJsonData.Recipient.Name,
Phone = originJsonData.Recipient.Phone,
Full = originJsonData.Recipient.Address.Full,
Detail = originJsonData.Recipient.Address.Detail,
Detail2 = originJsonData.Recipient.Address.Detail2,
City = originJsonData.Recipient.Address.City,
Province = originJsonData.Recipient.Address.Province,
ProvinceCode = originJsonData.Recipient.Address.ProvinceCode,
Zip = originJsonData.Recipient.Address.Zip,
Country = originJsonData.Recipient.Address.Country,
CountryCode = originJsonData.Recipient.Address.CountryCode,
Currency = originJsonData.Financial.Currency,
TotalPrice = originJsonData.Financial.TotalPrice,
SubtotalPrice = originJsonData.Financial.SubtotalPrice,
TotalTax = originJsonData.Financial.TotalTax,
TotalDiscounts = originJsonData.Financial.TotalDiscounts,
ShippingPrice = originJsonData.Financial.ShippingPrice,
PaymentMethod = originJsonData.Financial.PaymentMethod,
FinancialStatus = originJsonData.Financial.FinancialStatus,
RefundedAmount = originJsonData.Financial.RefundedAmount,
OriginJson = originJson,
IsPlaceOrderSuccess = false
};
}
else
{
newDtShopifyUsedSaleOrder = new TradeUsedSale.Repositories.Models.DT_ShopifyUsedSaleOrder
{
OrderId = originJsonData.Order.OrderId,
OrderNumber = originJsonData.Order.OrderNumber,
OrderName = originJsonData.Order.OrderName,
CreatedAt = originJsonData.Order.CreatedAt.DateTime,
UpdatedAt = originJsonData.Order.UpdatedAt.DateTime,
ProcessedAt = originJsonData.Order.ProcessedAt.DateTime,
Name = originJsonData.Customer.FirstName+" "+ originJsonData.Customer.LastName,
Phone = originJsonData.Customer.Phone,
Full = "",
Detail = "",
Detail2 = "",
City = "",
Province = "",
ProvinceCode = "",
Zip = "",
Country = "",
CountryCode = "",
Currency = originJsonData.Financial.Currency,
TotalPrice = originJsonData.Financial.TotalPrice,
SubtotalPrice = originJsonData.Financial.SubtotalPrice,
TotalTax = originJsonData.Financial.TotalTax,
TotalDiscounts = originJsonData.Financial.TotalDiscounts,
ShippingPrice = originJsonData.Financial.ShippingPrice,
PaymentMethod = originJsonData.Financial.PaymentMethod,
FinancialStatus = originJsonData.Financial.FinancialStatus,
RefundedAmount = originJsonData.Financial.RefundedAmount,
OriginJson = originJson,
IsPlaceOrderSuccess = false
};
}
//Shopify二手订单明细
var newDtShopifyUsedSaleOrderItems =

@ -8,13 +8,13 @@ namespace TradeManageNew.Models.ShopifyUsedSale
{
[JsonProperty("order")] public Order Order { get; set; }
[JsonProperty("recipient")] public Recipient Recipient { get; set; }
[JsonProperty("recipient", NullValueHandling = NullValueHandling.Ignore)] public Recipient Recipient { get; set; }
[JsonProperty("items")] public List<Item> Items { get; set; }
[JsonProperty("financial")] public Financial Financial { get; set; }
[JsonProperty("customer")] public Customer Customer { get; set; }
[JsonProperty("customer", NullValueHandling = NullValueHandling.Ignore)]public Customer Customer { get; set; }
[JsonProperty("remark")] public Remark Remark { get; set; }
}

Loading…
Cancel
Save