From d920942220c26a6c28c01b134e6e754f5fb5db8a Mon Sep 17 00:00:00 2001 From: wufan Date: Thu, 16 Jan 2025 09:38:15 +0800 Subject: [PATCH] :ambulance: --- .../APIClients/ShopifyApi/ShopifyAPIClient.cs | 187 ++++++++++++------ TradeManageNew/DD_OrderServiceNew.asmx.cs | 2 +- 2 files changed, 125 insertions(+), 64 deletions(-) diff --git a/TradeManageNew/APIClients/ShopifyApi/ShopifyAPIClient.cs b/TradeManageNew/APIClients/ShopifyApi/ShopifyAPIClient.cs index ce541ad..7e86c54 100644 --- a/TradeManageNew/APIClients/ShopifyApi/ShopifyAPIClient.cs +++ b/TradeManageNew/APIClients/ShopifyApi/ShopifyAPIClient.cs @@ -18,10 +18,8 @@ #pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" #pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)." -namespace APIClients.ShopifyAPI +namespace TradeManageNew.APIClients.ShopifyAPI { - using System = global::System; - [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ShopifyAPIClient { @@ -36,7 +34,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.51:3000/"; + BaseUrl = "http://192.168.1.43:3000/"; Initialize(); } @@ -458,7 +456,7 @@ namespace APIClients.ShopifyAPI /// /// 成功删除产品变体 /// A server side error occurred. - public virtual System.Threading.Tasks.Task DeleteProductVariantAsync(Body3 body) + public virtual System.Threading.Tasks.Task DeleteProductVariantAsync(Body3 body) { return DeleteProductVariantAsync(body, System.Threading.CancellationToken.None); } @@ -472,7 +470,7 @@ namespace APIClients.ShopifyAPI /// /// 成功删除产品变体 /// A server side error occurred. - public virtual async System.Threading.Tasks.Task DeleteProductVariantAsync(Body3 body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task DeleteProductVariantAsync(Body3 body, System.Threading.CancellationToken cancellationToken) { if (body == null) throw new System.ArgumentNullException("body"); @@ -520,7 +518,7 @@ namespace APIClients.ShopifyAPI var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -528,6 +526,16 @@ namespace APIClients.ShopifyAPI return objectResponse_.Object; } else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ShopifyAPIException("\u8bf7\u6c42\u53c2\u6570\u9519\u8bef", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ShopifyAPIException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); @@ -555,7 +563,7 @@ namespace APIClients.ShopifyAPI /// /// 成功下载图片 /// A server side error occurred. - public virtual System.Threading.Tasks.Task DownloadAllProductsImageAsync() + public virtual System.Threading.Tasks.Task DownloadAllProductsImageAsync() { return DownloadAllProductsImageAsync(System.Threading.CancellationToken.None); } @@ -569,7 +577,7 @@ namespace APIClients.ShopifyAPI /// /// 成功下载图片 /// A server side error occurred. - public virtual async System.Threading.Tasks.Task DownloadAllProductsImageAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task DownloadAllProductsImageAsync(System.Threading.CancellationToken cancellationToken) { var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; @@ -611,7 +619,7 @@ namespace APIClients.ShopifyAPI var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -646,7 +654,7 @@ namespace APIClients.ShopifyAPI /// /// 成功导出Excel文件 /// A server side error occurred. - public virtual System.Threading.Tasks.Task ExportProductsToExcelAsync() + public virtual System.Threading.Tasks.Task ExportProductsToExcelAsync() { return ExportProductsToExcelAsync(System.Threading.CancellationToken.None); } @@ -660,7 +668,7 @@ namespace APIClients.ShopifyAPI /// /// 成功导出Excel文件 /// A server side error occurred. - public virtual async System.Threading.Tasks.Task ExportProductsToExcelAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ExportProductsToExcelAsync(System.Threading.CancellationToken cancellationToken) { var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; @@ -702,7 +710,7 @@ namespace APIClients.ShopifyAPI var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -734,7 +742,7 @@ namespace APIClients.ShopifyAPI /// /// 创建结果 /// A server side error occurred. - public virtual System.Threading.Tasks.Task CreateAsync(Body4 body) + public virtual System.Threading.Tasks.Task CreateAsync(Body4 body) { return CreateAsync(body, System.Threading.CancellationToken.None); } @@ -745,7 +753,7 @@ namespace APIClients.ShopifyAPI /// /// 创建结果 /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CreateAsync(Body4 body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task CreateAsync(Body4 body, System.Threading.CancellationToken cancellationToken) { if (body == null) throw new System.ArgumentNullException("body"); @@ -793,7 +801,7 @@ namespace APIClients.ShopifyAPI var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -825,7 +833,7 @@ namespace APIClients.ShopifyAPI /// /// 获取成功 /// A server side error occurred. - public virtual System.Threading.Tasks.Task ListAsync() + public virtual System.Threading.Tasks.Task ListAsync() { return ListAsync(System.Threading.CancellationToken.None); } @@ -836,7 +844,7 @@ namespace APIClients.ShopifyAPI /// /// 获取成功 /// A server side error occurred. - public virtual async System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken) { var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; @@ -878,7 +886,7 @@ namespace APIClients.ShopifyAPI var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -910,7 +918,7 @@ namespace APIClients.ShopifyAPI /// /// 删除成功 /// A server side error occurred. - public virtual System.Threading.Tasks.Task DeleteAsync(Body5 body) + public virtual System.Threading.Tasks.Task DeleteAsync(Body5 body) { return DeleteAsync(body, System.Threading.CancellationToken.None); } @@ -921,7 +929,7 @@ namespace APIClients.ShopifyAPI /// /// 删除成功 /// A server side error occurred. - public virtual async System.Threading.Tasks.Task DeleteAsync(Body5 body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task DeleteAsync(Body5 body, System.Threading.CancellationToken cancellationToken) { if (body == null) throw new System.ArgumentNullException("body"); @@ -969,7 +977,7 @@ namespace APIClients.ShopifyAPI var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1001,7 +1009,7 @@ namespace APIClients.ShopifyAPI /// /// 连接测试结果 /// A server side error occurred. - public virtual System.Threading.Tasks.Task TestAsync() + public virtual System.Threading.Tasks.Task TestAsync() { return TestAsync(System.Threading.CancellationToken.None); } @@ -1012,7 +1020,7 @@ namespace APIClients.ShopifyAPI /// /// 连接测试结果 /// A server side error occurred. - public virtual async System.Threading.Tasks.Task TestAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task TestAsync(System.Threading.CancellationToken cancellationToken) { var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; @@ -1053,7 +1061,7 @@ namespace APIClients.ShopifyAPI var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1063,12 +1071,12 @@ namespace APIClients.ShopifyAPI else if (status_ == 500) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ShopifyAPIException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ShopifyAPIException("\u670d\u52a1\u5668\u9519\u8bef", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ShopifyAPIException("\u670d\u52a1\u5668\u9519\u8bef", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -1431,13 +1439,13 @@ namespace APIClients.ShopifyAPI /// 变体ID /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Id { get; set; } + public string Id { get; set; } /// /// 产品ID /// [Newtonsoft.Json.JsonProperty("product_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Product_id { get; set; } + public string Product_id { get; set; } /// /// 变体标题 @@ -1455,7 +1463,7 @@ namespace APIClients.ShopifyAPI /// 排序位置 /// [Newtonsoft.Json.JsonProperty("position", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Position { get; set; } + public decimal? Position { get; set; } /// /// 库存策略 @@ -1521,7 +1529,7 @@ namespace APIClients.ShopifyAPI /// 重量(克) /// [Newtonsoft.Json.JsonProperty("grams", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Grams { get; set; } + public decimal? Grams { get; set; } /// /// 库存管理 @@ -1545,7 +1553,7 @@ namespace APIClients.ShopifyAPI /// 重量 /// [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Weight { get; set; } + public decimal? Weight { get; set; } /// /// 重量单位 @@ -1557,19 +1565,19 @@ namespace APIClients.ShopifyAPI /// 库存项ID /// [Newtonsoft.Json.JsonProperty("inventory_item_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Inventory_item_id { get; set; } + public decimal? Inventory_item_id { get; set; } /// /// 库存数量 /// [Newtonsoft.Json.JsonProperty("inventory_quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Inventory_quantity { get; set; } + public decimal? Inventory_quantity { get; set; } /// /// 旧库存数量 /// [Newtonsoft.Json.JsonProperty("old_inventory_quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Old_inventory_quantity { get; set; } + public decimal? Old_inventory_quantity { get; set; } /// /// GraphQL API ID @@ -1581,7 +1589,7 @@ namespace APIClients.ShopifyAPI /// 图片ID /// [Newtonsoft.Json.JsonProperty("image_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Image_id { get; set; } + public decimal? Image_id { get; set; } private System.Collections.Generic.IDictionary _additionalProperties; @@ -1601,13 +1609,13 @@ namespace APIClients.ShopifyAPI /// 选项ID /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Id { get; set; } + public string Id { get; set; } /// /// 产品ID /// [Newtonsoft.Json.JsonProperty("product_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Product_id { get; set; } + public string Product_id { get; set; } /// /// 选项名称 @@ -1619,7 +1627,7 @@ namespace APIClients.ShopifyAPI /// 排序位置 /// [Newtonsoft.Json.JsonProperty("position", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Position { get; set; } + public decimal? Position { get; set; } /// /// 选项值列表 @@ -1913,7 +1921,7 @@ namespace APIClients.ShopifyAPI /// 状态码 /// [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Code { get; set; } + public decimal? Code { get; set; } /// /// 响应信息 @@ -1947,6 +1955,58 @@ namespace APIClients.ShopifyAPI [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? Success { get; set; } + /// + /// 被删除的变体ID列表 + /// + [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Data { get; set; } + + /// + /// 操作结果描述 + /// + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response3 + { + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Success { get; set; } + + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response4 + { + /// + /// 操作是否成功 + /// + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Success { get; set; } + /// /// 响应信息 /// @@ -1957,7 +2017,7 @@ namespace APIClients.ShopifyAPI /// 下载失败的SKU数量 /// [Newtonsoft.Json.JsonProperty("totalFailedSkus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? TotalFailedSkus { get; set; } + public decimal? TotalFailedSkus { get; set; } /// /// 下载失败的SKU列表 @@ -1977,7 +2037,7 @@ namespace APIClients.ShopifyAPI } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response3 + public partial class Response5 { /// /// 操作是否成功 @@ -2007,7 +2067,7 @@ namespace APIClients.ShopifyAPI /// 导出的产品总数 /// [Newtonsoft.Json.JsonProperty("totalProducts", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? TotalProducts { get; set; } + public decimal? TotalProducts { get; set; } private System.Collections.Generic.IDictionary _additionalProperties; @@ -2021,7 +2081,7 @@ namespace APIClients.ShopifyAPI } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response4 + public partial class Response6 { /// /// 操作是否成功 @@ -2053,7 +2113,7 @@ namespace APIClients.ShopifyAPI } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response5 + public partial class Response7 { /// /// 操作是否成功 @@ -2068,7 +2128,7 @@ namespace APIClients.ShopifyAPI /// 脚本标签总数 /// [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Total { get; set; } + public decimal? Total { get; set; } /// /// 响应信息 @@ -2088,7 +2148,7 @@ namespace APIClients.ShopifyAPI } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response6 + public partial class Response8 { /// /// 操作是否成功 @@ -2117,7 +2177,7 @@ namespace APIClients.ShopifyAPI } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response7 + public partial class Response9 { /// /// 测试是否成功 @@ -2149,7 +2209,7 @@ namespace APIClients.ShopifyAPI } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response8 + public partial class Response10 { [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? Success { get; set; } @@ -2224,6 +2284,7 @@ namespace APIClients.ShopifyAPI /// Shopify商品ID /// [Newtonsoft.Json.JsonProperty("shoifyGoodsId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ShoifyGoodsId { get; set; } /// @@ -2294,7 +2355,7 @@ namespace APIClients.ShopifyAPI /// 变体ID /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Id { get; set; } + public string Id { get; set; } /// /// 店铺名称 @@ -2312,7 +2373,7 @@ namespace APIClients.ShopifyAPI /// 订单ID /// [Newtonsoft.Json.JsonProperty("orderid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Orderid { get; set; } + public decimal? Orderid { get; set; } /// /// 订单编号 @@ -2348,7 +2409,7 @@ namespace APIClients.ShopifyAPI /// 退货数量 /// [Newtonsoft.Json.JsonProperty("return_quantity", Required = Newtonsoft.Json.Required.Always)] - public double Return_quantity { get; set; } + public decimal Return_quantity { get; set; } /// /// 解决方案 @@ -2366,13 +2427,13 @@ namespace APIClients.ShopifyAPI /// 订单金额 /// [Newtonsoft.Json.JsonProperty("order_amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Order_amount { get; set; } + public decimal? Order_amount { get; set; } /// /// 退款金额 /// [Newtonsoft.Json.JsonProperty("refund_amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Refund_amount { get; set; } + public decimal? Refund_amount { get; set; } /// /// 物流跟踪号 @@ -2390,7 +2451,7 @@ namespace APIClients.ShopifyAPI /// 标签成本 /// [Newtonsoft.Json.JsonProperty("label_cost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Label_cost { get; set; } + public decimal? Label_cost { get; set; } /// /// 订单日期 @@ -2432,7 +2493,7 @@ namespace APIClients.ShopifyAPI /// 扫描用户ID /// [Newtonsoft.Json.JsonProperty("ScanUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? ScanUserId { get; set; } + public decimal? ScanUserId { get; set; } /// /// 备注 @@ -2450,7 +2511,7 @@ namespace APIClients.ShopifyAPI /// 详情ID /// [Newtonsoft.Json.JsonProperty("detailid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Detailid { get; set; } + public decimal? Detailid { get; set; } /// /// 条形码 @@ -2499,13 +2560,13 @@ namespace APIClients.ShopifyAPI /// 是否上架 /// [Newtonsoft.Json.JsonProperty("IsOfferUp", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? IsOfferUp { get; set; } + public decimal? IsOfferUp { get; set; } /// /// 是否市场 /// [Newtonsoft.Json.JsonProperty("IsMaketPlace", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? IsMaketPlace { get; set; } + public decimal? IsMaketPlace { get; set; } /// /// 是否二手 @@ -2523,7 +2584,7 @@ namespace APIClients.ShopifyAPI /// 二手类型 /// [Newtonsoft.Json.JsonProperty("SecondHandType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? SecondHandType { get; set; } + public decimal? SecondHandType { get; set; } /// /// 二手图片URL @@ -2559,13 +2620,13 @@ namespace APIClients.ShopifyAPI /// 店铺ID /// [Newtonsoft.Json.JsonProperty("ShopId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? ShopId { get; set; } + public decimal? ShopId { get; set; } /// /// 二手销售价格 /// [Newtonsoft.Json.JsonProperty("SecondHandSalePrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? SecondHandSalePrice { get; set; } + public decimal? SecondHandSalePrice { get; set; } /// /// 变体代码 @@ -2592,7 +2653,7 @@ namespace APIClients.ShopifyAPI /// 被删除的变体ID列表 /// [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Ids { get; set; } + public System.Collections.Generic.ICollection Ids { get; set; } private System.Collections.Generic.IDictionary _additionalProperties; diff --git a/TradeManageNew/DD_OrderServiceNew.asmx.cs b/TradeManageNew/DD_OrderServiceNew.asmx.cs index 7c07d97..4e74fb0 100644 --- a/TradeManageNew/DD_OrderServiceNew.asmx.cs +++ b/TradeManageNew/DD_OrderServiceNew.asmx.cs @@ -33,7 +33,7 @@ using Newtonsoft.Json.Serialization; using NPOI.HSSF.Record.Formula.Functions; using static NPOI.HSSF.Util.HSSFColor; using System.Linq.Expressions; -using APIClients.ShopifyAPI; +using TradeManageNew.APIClients.ShopifyAPI; using LinqToDB; using Match = System.Text.RegularExpressions.Match; using TradeManageNew.APIClients.FedexApi.Tests;