|
|
|
@ -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 =
|
|
|
|
|