chenwenkai 2 months ago
commit 19f9dfc849

@ -36,7 +36,7 @@ namespace APIClients.ShopifyAPI
public ShopifyAPIClient()
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
{
BaseUrl = "http://192.168.1.54:3000/";
BaseUrl = "http://192.168.1.51:3000/";
Initialize();
}
@ -1338,19 +1338,19 @@ namespace APIClients.ShopifyAPI
/// 产品重量(g)
/// </summary>
[Newtonsoft.Json.JsonProperty("Weight", Required = Newtonsoft.Json.Required.Always)]
public double Weight { get; set; }
public decimal Weight { get; set; }
/// <summary>
/// 产品价格
/// </summary>
[Newtonsoft.Json.JsonProperty("JYPrice", Required = Newtonsoft.Json.Required.Always)]
public double JYPrice { get; set; }
public decimal JYPrice { get; set; }
/// <summary>
/// 运费
/// </summary>
[Newtonsoft.Json.JsonProperty("ShippingFee", Required = Newtonsoft.Json.Required.Always)]
public double ShippingFee { get; set; }
public decimal ShippingFee { get; set; }
private System.Collections.Generic.IDictionary<string, object> _additionalProperties;
@ -2196,7 +2196,7 @@ namespace APIClients.ShopifyAPI
/// 产品ID
/// </summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double? Id { get; set; }
public string Id { get; set; }
private System.Collections.Generic.IDictionary<string, object> _additionalProperties;
@ -2216,7 +2216,7 @@ namespace APIClients.ShopifyAPI
/// Shopify商品ID
/// </summary>
[Newtonsoft.Json.JsonProperty("shoifyGoodsId", Required = Newtonsoft.Json.Required.Always)]
public double ShoifyGoodsId { get; set; }
public string ShoifyGoodsId { get; set; }
/// <summary>
/// 产品SKU
@ -2254,19 +2254,19 @@ namespace APIClients.ShopifyAPI
/// 产品重量(g)
/// </summary>
[Newtonsoft.Json.JsonProperty("Weight", Required = Newtonsoft.Json.Required.Always)]
public double Weight { get; set; }
public decimal Weight { get; set; }
/// <summary>
/// 产品价格
/// </summary>
[Newtonsoft.Json.JsonProperty("JYPrice", Required = Newtonsoft.Json.Required.Always)]
public double JYPrice { get; set; }
public decimal JYPrice { get; set; }
/// <summary>
/// 运费
/// </summary>
[Newtonsoft.Json.JsonProperty("ShippingFee", Required = Newtonsoft.Json.Required.Always)]
public double ShippingFee { get; set; }
public decimal ShippingFee { get; set; }
private System.Collections.Generic.IDictionary<string, object> _additionalProperties;

@ -33,10 +33,12 @@ using Newtonsoft.Json.Serialization;
using NPOI.HSSF.Record.Formula.Functions;
using static NPOI.HSSF.Util.HSSFColor;
using System.Linq.Expressions;
using APIClients.ShopifyAPI;
using LinqToDB;
using Match = System.Text.RegularExpressions.Match;
using TradeManageNew.APIClients.FedexApi.Tests;
using TradeManageNew.APIClients.FedexAPI.Models.RatesAndTransitTimes;
using TradeManageNew.Models.ShopifyUsedSale;
namespace TradeManageNew
{
@ -28727,18 +28729,337 @@ namespace TradeManageNew
}
[WebMethod(EnableSession = true)]
public int OrderUsedSalePlatformPrint(int Id)
public APIReturnModel OrderUsedSalePlatformPrint(List<int> Ids)
{
// PagesNew.Login(base.Session);
using (var db = new TradeUsedSale.Repositories.ErpDbContext())
{
var orderUsedSalePlatform = db.DT_OrderUsedSalePlatform
.Where(x => x.Id == Id)
db.DT_OrderUsedSalePlatform
.Where(x => Ids.Contains(x.Id))
.Set(x => x.IsPrinted, true)
.Update();
return orderUsedSalePlatform;
return new APIReturnModel
{
Code = 1,
Message = "Success",
Datas = null
};
}
}
[WebMethod(EnableSession = true)]
public APIReturnModel OrderUsedSalePlatformPublish(List<int> Ids)
{
// PagesNew.Login(base.Session);
using (var db = new TradeUsedSale.Repositories.ErpDbContext())
{
var orderUsedSalePlatformList = db.DT_OrderUsedSalePlatform.Where(x => Ids.Contains(x.Id)).ToList();
foreach (var orderUsedSalePlatform in orderUsedSalePlatformList)
{
if (orderUsedSalePlatform.Status != TradeUsedSale.Enums.UsedSalePlatformStatus.NotListed)
{
continue;
}
//系统产品信息
var product = db.HW_GoodsInfo.FirstOrDefault(x => x.GoodsId == orderUsedSalePlatform.ProductId);
if (product is null)
{
var message = $"系统中不存在编码为[{orderUsedSalePlatform.ProductCode}]的产品信息无法推送至Shopify";
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, message)
.Update();
continue;
}
//毛重
if (product.Weight is null || product.Weight <= 0)
{
var message = $"产品[{product.GoodsCode}]无毛重信息无法推送至Shopify";
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, message)
.Update();
continue;
}
//建议售价
if (product.JYPrice is null || product.JYPrice <= 0)
{
var message = $"产品[{product.GoodsCode}]无建议售价无法推送至Shopify";
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, message)
.Update();
continue;
}
//预估运费
var postFee = db.HW_PostFee.FirstOrDefault(x => x.GoodsId == orderUsedSalePlatform.ProductId);
if (postFee is null)
{
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, $"产品[{product.GoodsCode}]无预估运费无法推送至Shopify")
.Update();
continue;
}
var fees = new List<decimal?>()
{
postFee.Fee1,
//postFee.Fee2,
postFee.Fee3,
postFee.Fee4,
postFee.Fee5,
//postFee.Fee6,
postFee.Fee7,
postFee.Fee8,
}.Where(x => x != null).ToList();
var feeCost = fees.Any() ? fees.Min() : 0;
if (feeCost <= 0)
{
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, $"产品[{product.GoodsCode}]预估运费小于0无法推送至Shopify")
.Update();
continue;
}
string shopifyProductId;
//判断时候在Shopify已创建过产品
var shopifyProductGoodsMap =
db.DT_ShopifyProductGoodsMap.FirstOrDefault(x => x.SkuId == orderUsedSalePlatform.SkuId);
//获取SKU的资料信息
var shopifyProductProfile =
db.DT_ShopifyUsedSaleProduct.FirstOrDefault(x => x.Sku == orderUsedSalePlatform.SkuCode);
//Shopify客户端
var shopifyApiClient = new ShopifyAPIClient();
if (shopifyProductGoodsMap is null)
{
try
{
//在Shopify创建产品信息
var createShopifyProductParameter = new Body2
{
ProductBaseData = new ProductBaseData
{
SKU = shopifyProductProfile?.Sku ?? orderUsedSalePlatform.SkuCode,
Title = shopifyProductProfile?.Title ?? product.GoodsEnglisgName,
ImagePath = shopifyProductProfile?.ImagePath ?? product.FirstImgUrl,
ProductType = shopifyProductProfile?.Category,
Tags = shopifyProductProfile?.Tags,
Weight = product.Weight.Value,
JYPrice = product.JYPrice.Value,
ShippingFee = feeCost.Value,
}
};
var shopifyProductRes = shopifyApiClient.CreateProductAsync(createShopifyProductParameter)
.ConfigureAwait(false)
.GetAwaiter()
.GetResult();
if (string.IsNullOrWhiteSpace(shopifyProductRes?.Data?.Id))
{
var message = $"产品[{product.GoodsCode}]推送Shopify产品失败原因{shopifyProductRes.Message}";
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, message)
.Update();
continue;
}
shopifyProductId = shopifyProductRes.Data.Id;
var newMap = new TradeUsedSale.Repositories.Models.DT_ShopifyProductGoodsMap
{
ShopifyProductId = shopifyProductId,
SkuId = orderUsedSalePlatform.SkuId,
SkuCode = orderUsedSalePlatform.SkuCode,
CreationTime = DateTime.Now
};
db.InsertWithInt32Identity(newMap);
}
catch (Exception ex)
{
var message = $"产品[{product.GoodsCode}]推送Shopify产品失败原因{ex.Message}";
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, message)
.Update();
continue;
}
}
else
{
shopifyProductId = shopifyProductGoodsMap.ShopifyProductId;
}
try
{
var imageUrls = JsonConvert.DeserializeObject<List<string>>(orderUsedSalePlatform.ImageUrls);
//在Shopify创建产品变体信息
var createShopifyVariantParameter = new AddVariantRequest
{
ProductBaseData = new ProductBaseData2
{
ShoifyGoodsId = shopifyProductId,
SKU = shopifyProductProfile?.Sku ?? orderUsedSalePlatform.SkuCode,
Title = shopifyProductProfile?.Title ?? product.GoodsEnglisgName,
ImagePath = shopifyProductProfile?.ImagePath ?? product.FirstImgUrl,
ProductType = shopifyProductProfile?.Category,
Tags = shopifyProductProfile?.Tags,
Weight = product.Weight.Value,
JYPrice = product.JYPrice.Value,
ShippingFee = feeCost.Value
},
Variants = new Variants
{
Return_quantity = 1,
ImgUrl = imageUrls.Count > 0 ? imageUrls[0] : null,
ImgUrl2 = imageUrls.Count > 0 ? imageUrls[0] : null,
ImgUrl3 = imageUrls.Count > 0 ? imageUrls[0] : null,
ImgUrl4 = imageUrls.Count > 0 ? imageUrls[0] : null,
ImgUrl5 = imageUrls.Count > 0 ? imageUrls[0] : null,
StoreName = orderUsedSalePlatform.WarehouseLocation ==
TradeUsedSale.Enums.WarehouseLocation.East
? "E"
: "W",
Code = orderUsedSalePlatform.BarCode,
},
};
var productVariantRes = shopifyApiClient.AddProductVariantAsync(createShopifyVariantParameter).ConfigureAwait(false)
.GetAwaiter()
.GetResult();
if (productVariantRes.Success == false)
{
var message = $"产品[{product.GoodsCode}]推送Shopify变体失败原因{productVariantRes.Message}";
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, message)
.Update();
continue;
}
//推送Shopify成功
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.Status, TradeUsedSale.Enums.UsedSalePlatformStatus.Listed)
.Set(x => x.PublishMessage, "推送成功")
.Update();
}
catch (Exception ex)
{
var message = $"产品[{product.GoodsCode}]推送Shopify变体失败原因{ex.Message}";
db.DT_OrderUsedSalePlatform.Where(x => x.Id == orderUsedSalePlatform.Id)
.Set(x => x.PublishMessage, message)
.Update();
continue;
}
}
}
return new APIReturnModel
{
Code = 1,
Message = "Success",
Datas = null
};
}
[WebMethod(EnableSession = true)]
public APIReturnModel PlaceShopifyUsedSaleOrderCallback(string originJson)
{
if (string.IsNullOrWhiteSpace(originJson))
{
return new APIReturnModel
{
Code = 0,
Message = "下单Json数据为空请检查",
Datas = null
};
}
var originJsonData = ShopifyUsedSaleOrderDto.FromJson(originJson);
using (var db = new TradeUsedSale.Repositories.ErpDbContext())
{
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
};
var dtShopifyUsedSaleOrderId = db.InsertWithInt32Identity(newDtShopifyUsedSaleOrder);
foreach (var item in originJsonData.Items)
{
var newDtShopifyUsedSaleOrderItem =
new TradeUsedSale.Repositories.Models.DT_ShopifyUsedSaleOrderItem
{
DtShopifyUsedSaleOrderId = dtShopifyUsedSaleOrderId,
OriginSku = item.OriginSku,
Sku = item.Sku,
ProductCode = item.ProductCode,
Quantity = item.Quantity,
Price = item.Price,
Title = item.Title,
VariantTitle = item.VariantTitle,
ProductId = item.ProductId,
VariantId = item.VariantId,
Image = item.Image,
ShippingMethod = item.ShippingMethod
};
db.InsertWithInt32Identity(newDtShopifyUsedSaleOrderItem);
}
}
return new APIReturnModel
{
Code = 1,
Message = "Success",
Datas = null
};
}
#endregion

@ -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 }
},
};
}
}

@ -1389,7 +1389,8 @@ namespace TradeManageNew.OuterService
x.SKU2 == input.SkuCode ||
x.SKU3 == input.SkuCode ||
x.SKU4 == input.SkuCode ||
x.SKU5 == input.SkuCode);
x.SKU5 == input.SkuCode ||
x.Barcode == input.SkuCode);
if (sku is null)
{

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

@ -27,5 +27,10 @@ namespace TradeUsedSale.Repositories
public ITable<JC_Shop> JC_Shop => this.GetTable<JC_Shop>();
public ITable<JC_UserInfo> JC_UserInfo => this.GetTable<JC_UserInfo>();
public ITable<CK_StorePostion> CK_StorePostion => this.GetTable<CK_StorePostion>();
public ITable<DT_ShopifyUsedSaleProduct> DT_ShopifyUsedSaleProduct => this.GetTable<DT_ShopifyUsedSaleProduct>();
public ITable<DT_ShopifyProductGoodsMap> DT_ShopifyProductGoodsMap => this.GetTable<DT_ShopifyProductGoodsMap>();
public ITable<HW_PostFee> HW_PostFee => this.GetTable<HW_PostFee>();
public ITable<DT_ShopifyUsedSaleOrder> DT_ShopifyUsedSaleOrder => this.GetTable<DT_ShopifyUsedSaleOrder>();
public ITable<DT_ShopifyUsedSaleOrderItem> DT_ShopifyUsedSaleOrderItem => this.GetTable<DT_ShopifyUsedSaleOrderItem>();
}
}

@ -92,5 +92,10 @@ namespace TradeUsedSale.Repositories.Models
/// 修改人
/// </summary>
public int? LastModifierId { get; set; }
/// <summary>
/// 推送至平台信息
/// </summary>
public string PublishMessage { get; set; }
}
}

@ -0,0 +1,30 @@
using System;
using LinqToDB.Mapping;
namespace TradeUsedSale.Repositories.Models
{
/// <summary>
/// Shopify产品与系统SKU映射
/// </summary>
public class DT_ShopifyProductGoodsMap
{
[PrimaryKey, Identity] public int Id { get; set; }
/// <summary>
/// Shopify产品Id
/// </summary>
public string ShopifyProductId { get; set; }
/// <summary>
/// 系统SKU ID
/// </summary>
public int SkuId { get; set; }
public string SkuCode { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreationTime { get; set; }
}
}

@ -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; }
}
}

@ -0,0 +1,17 @@
using LinqToDB.Mapping;
namespace TradeUsedSale.Repositories.Models
{
/// <summary>
/// Shopify产品资料
/// </summary>
public class DT_ShopifyUsedSaleProduct
{
[PrimaryKey, Identity] public int Id { get; set; }
public string Sku { get; set; }
public string Title { get; set; }
public string ImagePath { get; set; }
public string Category { get; set; }
public string Tags { get; set; }
}
}

@ -0,0 +1,19 @@
using LinqToDB.Mapping;
namespace TradeUsedSale.Repositories.Models
{
public class HW_PostFee
{
[PrimaryKey, Identity]
public int Id { get; set; }
public int? GoodsId { get; set; }
public decimal? Fee1 { get; set; }
public decimal? Fee2 { get; set; }
public decimal? Fee3 { get; set; }
public decimal? Fee4 { get; set; }
public decimal? Fee5 { get; set; }
public decimal? Fee6 { get; set; }
public decimal? Fee7 { get; set; }
public decimal? Fee8 { get; set; }
}
}

@ -56,8 +56,13 @@
<Compile Include="Repositories\Models\DT_OrderReturn.cs" />
<Compile Include="Repositories\Models\DT_OrderUsedSalePlatform.cs" />
<Compile Include="Repositories\Models\DT_OrderXXInfo.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\HW_GoodsDetail.cs" />
<Compile Include="Repositories\Models\HW_GoodsInfo.cs" />
<Compile Include="Repositories\Models\HW_PostFee.cs" />
<Compile Include="Repositories\Models\JC_Shop.cs" />
<Compile Include="Repositories\Models\JC_UserInfo.cs" />
<Compile Include="Repositories\Utils\ExpressionExtensions.cs" />

Loading…
Cancel
Save