diff --git a/TEMUKJD/KJD.csproj.user b/TEMUKJD/KJD.csproj.user
index 47f1da8..af56d8a 100644
--- a/TEMUKJD/KJD.csproj.user
+++ b/TEMUKJD/KJD.csproj.user
@@ -10,7 +10,7 @@
zh-CN
false
- Development
+ Production
false
@@ -38,6 +38,9 @@
Form
+
+ Component
+
Form
@@ -187,7 +190,7 @@
Form
-
+
Form
diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs
index 246063b..51fa9af 100644
--- a/TEMUKJD/MainForm.cs
+++ b/TEMUKJD/MainForm.cs
@@ -311,8 +311,8 @@ namespace TemuKJD
Task.Run(()=>
{
ReadWxCate();
- //ReadWxCateBound();
- ReadWxCateBound60323();
+ //ReadWxCateBound();
+ ReadWxCateBound60921();
ReadPddCate();
while(!StartUp.IsShopInit)
@@ -332,7 +332,7 @@ namespace TemuKJD
void ReadWxCate()
{
- string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808");
+ string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920");
if (!File.Exists(filePath))
return;
using (StreamReader sr = new StreamReader(filePath, System.Text.Encoding.UTF8))
@@ -472,7 +472,25 @@ namespace TemuKJD
GlobalConfig.WxCatBoundList = new ConcurrentList();
}
- public void SetTitle()
+ void ReadWxCateBound60921()
+ {
+ string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921");
+ if (!File.Exists(filePath))
+ return;
+ try
+ {
+ var catTxt = FileBase.ReadAllText(filePath, System.Text.Encoding.UTF8);
+ GlobalConfig.WxCatBoundList = [.. JsonHelper.DeserializeJsonToList(catTxt)];
+ }
+ catch (Exception ex)
+ {
+ BaseMsgForm.ShowError("类目价格获取失败:" + ex.Message);
+ }
+ if (GlobalConfig.WxCatBoundList == null)
+ GlobalConfig.WxCatBoundList = new ConcurrentList();
+ }
+
+ public void SetTitle()
{
lblVersionInfo.Text = BaseClass.ToolName + " V" + BaseClass.Varsion + " - " + BaseClass.NickName;
lblVersionInfo.ForeColor = GlobalConfig.MainColorLight;
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
index 3e7964a..84235eb 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
@@ -1714,7 +1714,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.panelEx1.TabIndex = 787;
this.panelEx1.Text = "类目保证金转换";
- this.panelEx1.Visible = false;
this.panelEx1.Click += new System.EventHandler(this.btnCatBound_Click);
//
// btnGetAllCate
@@ -1739,7 +1738,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnGetAllCate.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnGetAllCate.TabIndex = 777;
this.btnGetAllCate.Text = "取微信全类目";
- this.btnGetAllCate.Visible = false;
this.btnGetAllCate.Click += new System.EventHandler(this.btnGetAllCate_Click);
//
// pnlEditExtCodePrice
@@ -2230,6 +2228,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucSplitPage1.IsShowTotalCount = false;
this.ucSplitPage1.Location = new System.Drawing.Point(985, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
+ this.ucSplitPage1.MaxPageSizeValue = 5000;
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.ucSplitPage1.PageSize = 100;
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
index 37241c8..a7f1e0a 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
@@ -2710,8 +2710,51 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void btnCatBound_Click(object sender, EventArgs e)
{
+ List WxCatBoundInfolst = new List();
+
+ foreach (var cat in GlobalConfig.WxCatList)
+ {
+ var index = GlobalConfig.WxCatList.IndexOf(cat);
+ if (cat.leaf)
+ {
+ var url1 = BaseClass.BuildWXObjString("product/Wx_api_get_wx_cate_bound");
+ var data1 = UserLogin.GetSignaturex();
+ data1 += "&token=" + new WxApiBLL().GetRandomWxToken().accessToken;
+ data1 += "&cat_id=" + cat.cat_id;
+ var html1 = GetHtml.PostUtf8(url1, data1);
+ while (string.IsNullOrEmpty(html1) || BaseRegex.GetIntJson(ref html1, "deposit").IsNullOrZero())
+ {
+ Thread.Sleep(100);
+ data1 = UserLogin.GetSignaturex();
+ //data1 += "&token=" + GlobalConfig.WxGlobalTokenList.OrderBy(x => Guid.NewGuid()).FirstOrDefault()?.accessToken;
+ data1 += "&token=" + new WxApiBLL().GetRandomWxToken().accessToken;
+ data1 += "&cat_id=" + cat.cat_id;
+ html1 = GetHtml.PostUtf8(url1, data1);
+ }
- }
+
+ WxCatBoundInfo wxCatBoundInfo = new WxCatBoundInfo();
+ wxCatBoundInfo.leaf_id = cat.cat_id.ParseToLong();
+ wxCatBoundInfo.full_cat_name = cat.name;
+ wxCatBoundInfo.leaf_name = cat.name;
+ wxCatBoundInfo.cat_bound = BaseRegex.GetIntJson(ref html1, "deposit") / 100;
+ var parentCat = cat;
+ while (!parentCat.f_cat_id.ParseToLong().IsNullOrZero())
+ {
+ parentCat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == parentCat.f_cat_id);
+
+ if (parentCat == null)
+ break;
+
+ wxCatBoundInfo.full_cat_name = parentCat.name + "/" + wxCatBoundInfo.full_cat_name;
+ }
+ if (wxCatBoundInfo.cat_bound > 0)
+ WxCatBoundInfolst.Add(wxCatBoundInfo);
+ }
+ }
+ var catBoundStr = JsonHelper.SerializeObject(WxCatBoundInfolst);
+
+ }
private void btnExportIdImg_Click(object sender, EventArgs e)
{
diff --git a/Work/Initialization.cs b/Work/Initialization.cs
index 1a6913a..f297368 100644
--- a/Work/Initialization.cs
+++ b/Work/Initialization.cs
@@ -690,13 +690,13 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
// File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat.zip"));
// }
//}
- if (!FileBase.Exists("temp\\wxCat60808"))
+ if (!FileBase.Exists("temp\\wxCat60920"))
{
- if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCat60808.zip", "temp\\wxCat60808.dll" + ".bak"))
+ if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCat60920.zip", "temp\\wxCat60920.dll" + ".bak"))
{
- FileBase.Move("temp\\wxCat60808.dll" + ".bak", "temp\\wxCat60808.zip");
- ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
- File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808.zip"));
+ FileBase.Move("temp\\wxCat60920.dll" + ".bak", "temp\\wxCat60920.zip");
+ ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
+ File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920.zip"));
}
}
//if (!FileBase.Exists("temp\\wxCatBound"))
@@ -708,13 +708,13 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
// File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound.zip"));
// }
//}
- if (!FileBase.Exists("temp\\wxCatBound60810"))
+ if (!FileBase.Exists("temp\\wxCatBound60921"))
{
- if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCatBound60810.zip", "temp\\wxCatBound60810.dll" + ".bak"))
+ if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCatBound60921.zip", "temp\\wxCatBound60921.dll" + ".bak"))
{
- FileBase.Move("temp\\wxCatBound60810.dll" + ".bak", "temp\\wxCatBound60810.zip");
- ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60810.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
- File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60810.zip"));
+ FileBase.Move("temp\\wxCatBound60921.dll" + ".bak", "temp\\wxCatBound60921.zip");
+ ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
+ File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921.zip"));
}
}