diff --git a/TEMUKJD CEFv138.sln b/TEMUKJD CEFv138.sln index adef3e5..81b0c98 100644 --- a/TEMUKJD CEFv138.sln +++ b/TEMUKJD CEFv138.sln @@ -61,14 +61,14 @@ Global {B8EE868D-56CD-4647-BBA5-04BEF24FF9F6}.Release|x86.Build.0 = Release|Any CPU {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Debug|x64.ActiveCfg = Debug|Any CPU - {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Debug|x64.Build.0 = Debug|Any CPU + {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Debug|x64.ActiveCfg = Debug|x64 + {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Debug|x64.Build.0 = Debug|x64 {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Debug|x86.ActiveCfg = Debug|Any CPU {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Debug|x86.Build.0 = Debug|Any CPU {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Release|Any CPU.Build.0 = Release|Any CPU - {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Release|x64.ActiveCfg = Release|Any CPU - {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Release|x64.Build.0 = Release|Any CPU + {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Release|x64.ActiveCfg = Release|x64 + {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Release|x64.Build.0 = Release|x64 {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Release|x86.ActiveCfg = Release|Any CPU {9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 44ee7d5..9aa730d 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -12,7 +12,7 @@ false x64 false - + AnyCPU;x64 diff --git a/TEMUKJD/KJD.csproj.user b/TEMUKJD/KJD.csproj.user index 08513e6..65196af 100644 --- a/TEMUKJD/KJD.csproj.user +++ b/TEMUKJD/KJD.csproj.user @@ -10,12 +10,26 @@ zh-CN false - Development + Production false ProjectDebugger + + false + ProjectDebugger + + + false + ProjectDebugger + + + ProjectDebugger + + + ProjectDebugger + diff --git a/TEMUKJD/WXForms/AdminForms/WXSaleAssistantForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXSaleAssistantForm.Designer.cs index 479f81a..152c2b0 100644 --- a/TEMUKJD/WXForms/AdminForms/WXSaleAssistantForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXSaleAssistantForm.Designer.cs @@ -938,7 +938,6 @@ namespace TemuKJD.ToolForms this.ClientSize = new System.Drawing.Size(1404, 478); this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.KeyPreview = true; this.Name = "WXSaleAssistantForm"; this.Text = "微信带货助手"; diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 93043d7..8807bed 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -4212,13 +4212,6 @@ namespace TemuKJD.WXForms.ProductForms } Thread.Sleep(Randomx.GetId(100, 300)); - var maxSkuSpecCnt = prodInfo.detail.sku.Max(x => x.spec?.Count).ParseToInt(); - foreach(var skuTmp in prodInfo.detail.sku.ToList()) - { - if (skuTmp.spec?.Count != maxSkuSpecCnt) - prodInfo.detail.sku.Remove(skuTmp); - } - upProdParam.product.info.productSaleAttrs = new List(); if (prodInfo.detail.sku == null) prodInfo.detail.sku = new List(); @@ -4231,6 +4224,13 @@ namespace TemuKJD.WXForms.ProductForms if (prodInfo.detail.sku.FirstOrDefault().thumb_url.IsNullOrEmpty()) prodInfo.detail.sku.FirstOrDefault().thumb_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url; + var maxSkuSpecCnt = prodInfo.detail.sku.Max(x => x.spec?.Count).ParseToInt(); + foreach (var skuTmp in prodInfo.detail.sku.ToList()) + { + if (skuTmp.spec?.Count != maxSkuSpecCnt) + prodInfo.detail.sku.Remove(skuTmp); + } + // 处理系统指定的规格名称 //if ((upProdParam.product.info.category.FirstOrDefault()?.name == "食品饮料" || prodInfo.detail.cats.FirstOrDefault() == "食品饮料") && // (selectProd.cat_name == "坚果炒货" || selectProd.cat_name == "果干")) diff --git a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs index 57b159a..e1a86d2 100644 --- a/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WxShopStatisticsForm.cs @@ -327,7 +327,7 @@ namespace TemuKJD.WXForms.ShopForms statistics.WxShopAmount.totalAmount * 0.01m, // 货款金额 statistics.WxShopAmount.availableAmount * 0.01m, // 可提现余额 statistics.WxShopAmount.pendingAmount * 0.01m, // 待结算金额 - statistics.WxShopAmount.DepositBalance * 0.01m // 抱枕金 + statistics.WxShopAmount.DepositBalance * 0.01m // 保证金 ); row = dgvShop.Rows[rowId]; (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; @@ -795,6 +795,7 @@ namespace TemuKJD.WXForms.ShopForms statistics.WxShopSaleInfo1Day.LastRefreshDate = DateTime.MinValue; statistics.WxShopSaleInfo7Day.LastRefreshDate = DateTime.MinValue; statistics.WxShopSaleInfo30Day.LastRefreshDate = DateTime.MinValue; + statistics.WxShopAmount.LastRefreshDate = DateTime.MinValue; statistics.lastRefreshDate = DateTime.MinValue; } //this.lstSubOrderInfo.RemoveAll(o => o.supplierId.ParseToString() == shop.ShopId); diff --git a/Update/Update/MainForm.cs b/Update/Update/MainForm.cs index ae754e5..d13581f 100644 --- a/Update/Update/MainForm.cs +++ b/Update/Update/MainForm.cs @@ -6,6 +6,8 @@ using System.Drawing; using System.IO; using System.IO.Compression; using System.Linq; +using System.Net; +using System.Reflection.Emit; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -69,22 +71,37 @@ namespace Update progressBar1.Visible = true; progressBar1.Maximum = 100;//fileNameArr.Count(); progressBar1.Value = 0; - new TaskFactory().StartNew(() => + Task.Run(async() => { string tempFile = upTempPath + "\\" + Program.updateUrl.Substring(Program.updateUrl.LastIndexOf("/") + 1); - bool result = Program.DownloadFile(Program.updateUrl, tempFile); + //bool result = Program.DownloadFile(Program.updateUrl, tempFile); - while (true) + //while (true) + //{ + // Invoke(new Action(() => + // { + // progressBar1.Value = Program.progress; + // })); + // if (Program.progress == 100) + // break; + //} + + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + using (var downloadClient = new WebClient()) { - Invoke(new Action(() => + downloadClient.Proxy = null; + + downloadClient.DownloadProgressChanged += (s, args) => { - progressBar1.Value = Program.progress; - })); - if (Program.progress == 100) - break; + Invoke(new Action(() => { progressBar1.Value = args.ProgressPercentage; })); + + }; + + await downloadClient.DownloadFileTaskAsync(new Uri(Program.updateUrl), tempFile); } - if (result) + if (1 == 1) + //if (result) { ZipFile.ExtractToDirectory(tempFile, upTempPath); File.Delete(tempFile); diff --git a/test/KJD.Test/KJD.Test.csproj b/test/KJD.Test/KJD.Test.csproj index b3a3ab5..ca792d5 100644 --- a/test/KJD.Test/KJD.Test.csproj +++ b/test/KJD.Test/KJD.Test.csproj @@ -6,6 +6,7 @@ enable enable false + AnyCPU;x64