保证金 更新
This commit is contained in:
1 parent
8c11794884
commit
d1001d5623
5 files changed
+78
-15
No files matched your search
@@ -10,7 +10,7 @@
|
|||||||
<ErrorReportUrlHistory />
|
<ErrorReportUrlHistory />
|
||||||
<FallbackCulture>zh-CN</FallbackCulture>
|
<FallbackCulture>zh-CN</FallbackCulture>
|
||||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||||
<ActiveDebugProfile>Development</ActiveDebugProfile>
|
<ActiveDebugProfile>Production</ActiveDebugProfile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||||
@@ -38,6 +38,9 @@
|
|||||||
<Compile Update="ChangeForm.cs">
|
<Compile Update="ChangeForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="Extension\BindingExtensions.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="InitForm.cs">
|
<Compile Update="InitForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
+20
-2
@@ -312,7 +312,7 @@ namespace TemuKJD
|
|||||||
{
|
{
|
||||||
ReadWxCate();
|
ReadWxCate();
|
||||||
//ReadWxCateBound();
|
//ReadWxCateBound();
|
||||||
ReadWxCateBound60323();
|
ReadWxCateBound60921();
|
||||||
ReadPddCate();
|
ReadPddCate();
|
||||||
|
|
||||||
while(!StartUp.IsShopInit)
|
while(!StartUp.IsShopInit)
|
||||||
@@ -332,7 +332,7 @@ namespace TemuKJD
|
|||||||
|
|
||||||
void ReadWxCate()
|
void ReadWxCate()
|
||||||
{
|
{
|
||||||
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808");
|
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920");
|
||||||
if (!File.Exists(filePath))
|
if (!File.Exists(filePath))
|
||||||
return;
|
return;
|
||||||
using (StreamReader sr = new StreamReader(filePath, System.Text.Encoding.UTF8))
|
using (StreamReader sr = new StreamReader(filePath, System.Text.Encoding.UTF8))
|
||||||
@@ -472,6 +472,24 @@ namespace TemuKJD
|
|||||||
GlobalConfig.WxCatBoundList = new ConcurrentList<WxCatBoundInfo>();
|
GlobalConfig.WxCatBoundList = new ConcurrentList<WxCatBoundInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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()
|
public void SetTitle()
|
||||||
{
|
{
|
||||||
lblVersionInfo.Text = BaseClass.ToolName + " V" + BaseClass.Varsion + " - " + BaseClass.NickName;
|
lblVersionInfo.Text = BaseClass.ToolName + " V" + BaseClass.Varsion + " - " + BaseClass.NickName;
|
||||||
|
|||||||
@@ -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.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||||
this.panelEx1.TabIndex = 787;
|
this.panelEx1.TabIndex = 787;
|
||||||
this.panelEx1.Text = "类目保证金转换";
|
this.panelEx1.Text = "类目保证金转换";
|
||||||
this.panelEx1.Visible = false;
|
|
||||||
this.panelEx1.Click += new System.EventHandler(this.btnCatBound_Click);
|
this.panelEx1.Click += new System.EventHandler(this.btnCatBound_Click);
|
||||||
//
|
//
|
||||||
// btnGetAllCate
|
// 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.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||||
this.btnGetAllCate.TabIndex = 777;
|
this.btnGetAllCate.TabIndex = 777;
|
||||||
this.btnGetAllCate.Text = "取微信全类目";
|
this.btnGetAllCate.Text = "取微信全类目";
|
||||||
this.btnGetAllCate.Visible = false;
|
|
||||||
this.btnGetAllCate.Click += new System.EventHandler(this.btnGetAllCate_Click);
|
this.btnGetAllCate.Click += new System.EventHandler(this.btnGetAllCate_Click);
|
||||||
//
|
//
|
||||||
// pnlEditExtCodePrice
|
// pnlEditExtCodePrice
|
||||||
@@ -2230,6 +2228,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
this.ucSplitPage1.IsShowTotalCount = false;
|
this.ucSplitPage1.IsShowTotalCount = false;
|
||||||
this.ucSplitPage1.Location = new System.Drawing.Point(985, 0);
|
this.ucSplitPage1.Location = new System.Drawing.Point(985, 0);
|
||||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.ucSplitPage1.MaxPageSizeValue = 5000;
|
||||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||||
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
||||||
this.ucSplitPage1.PageSize = 100;
|
this.ucSplitPage1.PageSize = 100;
|
||||||
|
|||||||
@@ -2710,6 +2710,49 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
|||||||
|
|
||||||
private void btnCatBound_Click(object sender, EventArgs e)
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -690,13 +690,13 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
|
|||||||
// File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat.zip"));
|
// 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");
|
FileBase.Move("temp\\wxCat60920.dll" + ".bak", "temp\\wxCat60920.zip");
|
||||||
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
|
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
|
||||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808.zip"));
|
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920.zip"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if (!FileBase.Exists("temp\\wxCatBound"))
|
//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"));
|
// 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");
|
FileBase.Move("temp\\wxCatBound60921.dll" + ".bak", "temp\\wxCatBound60921.zip");
|
||||||
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60810.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
|
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
|
||||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60810.zip"));
|
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921.zip"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user