保证金 更新

This commit is contained in:
wule committed 2026-09-21 10:39:32 +08:00
1 parent 8c11794884
commit d1001d5623
5 files changed
+82 -19

No files matched your search

+5 -2
View File
@@ -10,7 +10,7 @@
<ErrorReportUrlHistory />
<FallbackCulture>zh-CN</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
<ActiveDebugProfile>Development</ActiveDebugProfile>
<ActiveDebugProfile>Production</ActiveDebugProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
@@ -38,6 +38,9 @@
<Compile Update="ChangeForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Extension\BindingExtensions.cs">
<SubType>Component</SubType>
</Compile>
<Compile Update="InitForm.cs">
<SubType>Form</SubType>
</Compile>
@@ -187,7 +190,7 @@
</Compile>
<Compile Update="WXForms\ShopForms\WXShopOemWithdrawalForm.cs">
<SubType>Form</SubType>
</Compile>
</Compile>
<Compile Update="WXForms\ShopForms\WXShopOemRebateRecordsForm.cs">
<SubType>Form</SubType>
</Compile>
+22 -4
View File
@@ -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<WxCatBoundInfo>();
}
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<WxCatBoundInfo>(catTxt)];
}
catch (Exception ex)
{
BaseMsgForm.ShowError("类目价格获取失败:" + ex.Message);
}
if (GlobalConfig.WxCatBoundList == null)
GlobalConfig.WxCatBoundList = new ConcurrentList<WxCatBoundInfo>();
}
public void SetTitle()
{
lblVersionInfo.Text = BaseClass.ToolName + " V" + BaseClass.Varsion + " - " + BaseClass.NickName;
lblVersionInfo.ForeColor = GlobalConfig.MainColorLight;
@@ -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;
@@ -2710,8 +2710,51 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void btnCatBound_Click(object sender, EventArgs e)
{
List<WxCatBoundInfo> WxCatBoundInfolst = new List<WxCatBoundInfo>();
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)
{
+10 -10
View File
@@ -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"));
}
}