master
wufan 2 months ago
parent c0b3c4b27c
commit 356982014b

@ -0,0 +1,162 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace TradeManageNew.Models.ShopifyUsedSale
{
public partial class ShopifyUsedSaleOrderDto
{
[JsonProperty("order")] public Order Order { get; set; }
[JsonProperty("recipient")] 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("remark")] public Remark Remark { get; set; }
}
public class Customer
{
[JsonProperty("email")] public string Email { get; set; }
[JsonProperty("phone")] public string Phone { get; set; }
[JsonProperty("first_name")] public string FirstName { get; set; }
[JsonProperty("last_name")] public string LastName { get; set; }
[JsonProperty("customer_id")] public string CustomerId { get; set; }
}
public class Financial
{
[JsonProperty("currency")] public string Currency { get; set; }
[JsonProperty("total_price")] public decimal TotalPrice { get; set; }
[JsonProperty("subtotal_price")] public decimal SubtotalPrice { get; set; }
[JsonProperty("total_tax")] public decimal TotalTax { get; set; }
[JsonProperty("total_discounts")] public decimal TotalDiscounts { get; set; }
[JsonProperty("shipping_price")] public decimal ShippingPrice { get; set; }
[JsonProperty("payment_method")] public string PaymentMethod { get; set; }
[JsonProperty("financial_status")] public string FinancialStatus { get; set; }
[JsonProperty("refunded_amount")] public decimal RefundedAmount { get; set; }
}
public class Item
{
[JsonProperty("origin_sku")] public string OriginSku { get; set; }
[JsonProperty("sku")] public string Sku { get; set; }
[JsonProperty("product_code")] public string ProductCode { get; set; }
[JsonProperty("quantity")] public int Quantity { get; set; }
[JsonProperty("price")] public decimal Price { get; set; }
[JsonProperty("title")] public string Title { get; set; }
[JsonProperty("variant_title")] public string VariantTitle { get; set; }
[JsonProperty("product_id")] public string ProductId { get; set; }
[JsonProperty("variant_id")] public string VariantId { get; set; }
[JsonProperty("properties")] public List<string> Properties { get; set; }
[JsonProperty("image")] public string Image { get; set; }
[JsonProperty("shipping_method")] public string ShippingMethod { get; set; }
}
public class Order
{
[JsonProperty("order_id")] public string OrderId { get; set; }
[JsonProperty("order_number")] public string OrderNumber { get; set; }
[JsonProperty("order_name")] public string OrderName { get; set; }
[JsonProperty("created_at")] public DateTimeOffset CreatedAt { get; set; }
[JsonProperty("updated_at")] public DateTimeOffset UpdatedAt { get; set; }
[JsonProperty("processed_at")] public DateTimeOffset ProcessedAt { get; set; }
}
public class Recipient
{
[JsonProperty("name")] public string Name { get; set; }
[JsonProperty("phone")] public string Phone { get; set; }
[JsonProperty("address")] public Address Address { get; set; }
}
public class Address
{
[JsonProperty("full")] public string Full { get; set; }
[JsonProperty("detail")] public string Detail { get; set; }
[JsonProperty("detail2")] public string Detail2 { get; set; }
[JsonProperty("city")] public string City { get; set; }
[JsonProperty("province")] public string Province { get; set; }
[JsonProperty("province_code")] public string ProvinceCode { get; set; }
[JsonProperty("zip")] public string Zip { get; set; }
[JsonProperty("country")] public string Country { get; set; }
[JsonProperty("country_code")] public string CountryCode { get; set; }
}
public partial class Remark
{
[JsonProperty("note")] public string Note { get; set; }
[JsonProperty("tags")] public string Tags { get; set; }
}
public partial class ShopifyUsedSaleOrderDto
{
public static ShopifyUsedSaleOrderDto FromJson(string json) =>
JsonConvert.DeserializeObject<ShopifyUsedSaleOrderDto>(json,
TradeManageNew.Models.ShopifyUsedSale.Converter.Settings);
}
public static class Serialize
{
public static string ToJson(this ShopifyUsedSaleOrderDto self) =>
JsonConvert.SerializeObject(self, TradeManageNew.Models.ShopifyUsedSale.Converter.Settings);
}
internal static class Converter
{
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
{
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
DateParseHandling = DateParseHandling.None,
Converters =
{
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
},
};
}
}

@ -2920,6 +2920,7 @@
<Compile Include="Models\Shage\GetOrderUsedSalePlatformDto.cs" /> <Compile Include="Models\Shage\GetOrderUsedSalePlatformDto.cs" />
<Compile Include="Models\Shage\GetOrderUsedSalePlatformInput.cs" /> <Compile Include="Models\Shage\GetOrderUsedSalePlatformInput.cs" />
<Compile Include="Models\Shage\OrderUsedSalePlatformInput.cs" /> <Compile Include="Models\Shage\OrderUsedSalePlatformInput.cs" />
<Compile Include="Models\ShopifyUsedSale\ShopifyUsedSaleOrderDto.cs" />
<Compile Include="OrderAPI.ashx.cs"> <Compile Include="OrderAPI.ashx.cs">
<DependentUpon>OrderAPI.ashx</DependentUpon> <DependentUpon>OrderAPI.ashx</DependentUpon>
</Compile> </Compile>

@ -0,0 +1,100 @@
using System;
using LinqToDB.Mapping;
namespace TradeUsedSale.Repositories.Models
{
public class DT_ShopifyUsedSaleOrder
{
[PrimaryKey, Identity] public int Id { get; set; }
public string OrderId { get; set; }
public string OrderNumber { get; set; }
public string OrderName { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public DateTime ProcessedAt { get; set; }
/// <summary>
/// 收件人
/// </summary>
public string Name { get; set; }
/// <summary>
/// 收件人电话
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 完整地址
/// </summary>
public string Full { get; set; }
/// <summary>
/// 地址1
/// </summary>
public string Detail { get; set; }
/// <summary>
/// 地址2
/// </summary>
public string Detail2 { get; set; }
/// <summary>
/// 城市
/// </summary>
public string City { get; set; }
/// <summary>
/// 省
/// </summary>
public string Province { get; set; }
/// <summary>
/// 省编码
/// </summary>
public string ProvinceCode { get; set; }
/// <summary>
/// 邮编
/// </summary>
public string Zip { get; set; }
/// <summary>
/// 国家
/// </summary>
public string Country { get; set; }
/// <summary>
/// 国家编码
/// </summary>
public string CountryCode { get; set; }
public string Currency { get; set; }
public decimal TotalPrice { get; set; }
public decimal SubtotalPrice { get; set; }
public decimal TotalTax { get; set; }
public decimal TotalDiscounts { get; set; }
public decimal ShippingPrice { get; set; }
public string PaymentMethod { get; set; }
public string FinancialStatus { get; set; }
public decimal RefundedAmount { get; set; }
/// <summary>
/// 原始Json
/// </summary>
public string OriginJson { get; set; }
}
}

@ -0,0 +1,33 @@
using LinqToDB.Mapping;
namespace TradeUsedSale.Repositories.Models
{
public class DT_ShopifyUsedSaleOrderItem
{
[PrimaryKey, Identity] public int Id { get; set; }
public int DtShopifyUsedSaleOrderId { get; set; }
public string OriginSku { get; set; }
public string Sku { get; set; }
public string ProductCode { get; set; }
public int Quantity { get; set; }
public decimal Price { get; set; }
public string Title { get; set; }
public string VariantTitle { get; set; }
public string ProductId { get; set; }
public string VariantId { get; set; }
public string Image { get; set; }
public string ShippingMethod { get; set; }
}
}

@ -57,6 +57,8 @@
<Compile Include="Repositories\Models\DT_OrderUsedSalePlatform.cs" /> <Compile Include="Repositories\Models\DT_OrderUsedSalePlatform.cs" />
<Compile Include="Repositories\Models\DT_OrderXXInfo.cs" /> <Compile Include="Repositories\Models\DT_OrderXXInfo.cs" />
<Compile Include="Repositories\Models\DT_ShopifyProductGoodsMap.cs" /> <Compile Include="Repositories\Models\DT_ShopifyProductGoodsMap.cs" />
<Compile Include="Repositories\Models\DT_ShopifyUsedSaleOrder.cs" />
<Compile Include="Repositories\Models\DT_ShopifyUsedSaleOrderItem.cs" />
<Compile Include="Repositories\Models\DT_ShopifyUsedSaleProduct.cs" /> <Compile Include="Repositories\Models\DT_ShopifyUsedSaleProduct.cs" />
<Compile Include="Repositories\Models\HW_GoodsDetail.cs" /> <Compile Include="Repositories\Models\HW_GoodsDetail.cs" />
<Compile Include="Repositories\Models\HW_GoodsInfo.cs" /> <Compile Include="Repositories\Models\HW_GoodsInfo.cs" />

Loading…
Cancel
Save