1活动逻辑调整 2拼多多买手号存储
This commit is contained in:
1 parent
2df3769153
commit
fa96cc1444
22 files changed
+3251
-1167
No files matched your search
+37
-19
@@ -41,6 +41,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.chkRandomCompanyProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.chkUseWXComplateProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.chkSaveBound = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.chkAiShortTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
@@ -96,17 +97,17 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.pbSelectProd = new System.Windows.Forms.PictureBox();
|
||||
this.cmbSourceType = new System.Windows.Forms.ComboBox();
|
||||
this.cmbJstInitSet = new System.Windows.Forms.ComboBox();
|
||||
this.cmbCateFilter3 = new System.Windows.Forms.ComboBox();
|
||||
this.cmbCateFilter3 = new TemuKJD.UserComponent.UcComboBoxMutiSelect();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.cmbGroupFilter = new System.Windows.Forms.ComboBox();
|
||||
this.txtIdFilter = new System.Windows.Forms.TextBox();
|
||||
this.cmbCateFilter2 = new System.Windows.Forms.ComboBox();
|
||||
this.cmbCateFilter2 = new TemuKJD.UserComponent.UcComboBoxMutiSelect();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.btnClearFilter = new DevComponents.DotNetBar.PanelEx();
|
||||
this.lblGoodsCount = new System.Windows.Forms.Label();
|
||||
this.cmbWxSafe = new System.Windows.Forms.ComboBox();
|
||||
this.btnClearUpload = new DevComponents.DotNetBar.PanelEx();
|
||||
this.cmbCateFilter1 = new System.Windows.Forms.ComboBox();
|
||||
this.cmbCateFilter1 = new TemuKJD.UserComponent.UcComboBoxMutiSelect();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.lblWaitToUp = new System.Windows.Forms.Label();
|
||||
this.btnRandomAdd = new DevComponents.DotNetBar.PanelEx();
|
||||
@@ -186,7 +187,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.btnClear = new DevComponents.DotNetBar.PanelEx();
|
||||
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.chkRandomCompanyProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -295,6 +295,18 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.ucGroupBoxEx2.TabStop = false;
|
||||
this.ucGroupBoxEx2.Text = "商品上传";
|
||||
//
|
||||
// chkRandomCompanyProd
|
||||
//
|
||||
this.chkRandomCompanyProd.Checked = true;
|
||||
this.chkRandomCompanyProd.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkRandomCompanyProd.Location = new System.Drawing.Point(856, 110);
|
||||
this.chkRandomCompanyProd.Name = "chkRandomCompanyProd";
|
||||
this.chkRandomCompanyProd.Size = new System.Drawing.Size(87, 21);
|
||||
this.chkRandomCompanyProd.TabIndex = 889;
|
||||
this.chkRandomCompanyProd.Text = "随机工厂商品";
|
||||
this.chkRandomCompanyProd.UseVisualStyleBackColor = true;
|
||||
this.chkRandomCompanyProd.Visible = false;
|
||||
//
|
||||
// chkUseWXComplateProd
|
||||
//
|
||||
this.chkUseWXComplateProd.Location = new System.Drawing.Point(727, 42);
|
||||
@@ -1075,12 +1087,18 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// cmbCateFilter3
|
||||
//
|
||||
this.cmbCateFilter3.DefaultText = "全部";
|
||||
this.cmbCateFilter3.DropDownHeight = 1;
|
||||
this.cmbCateFilter3.DropDownWidth = 1;
|
||||
this.cmbCateFilter3.FormattingEnabled = true;
|
||||
this.cmbCateFilter3.IntegralHeight = false;
|
||||
this.cmbCateFilter3.Location = new System.Drawing.Point(309, 20);
|
||||
this.cmbCateFilter3.Name = "cmbCateFilter3";
|
||||
this.cmbCateFilter3.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbCateFilter3.TabIndex = 710;
|
||||
this.cmbCateFilter3.Text = "全部";
|
||||
this.cmbCateFilter3.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter3_SelectedIndexChanged);
|
||||
this.cmbCateFilter3.TextChanged += new System.EventHandler(this.cmbCateFilter3_TextChanged);
|
||||
//
|
||||
// label21
|
||||
//
|
||||
@@ -1113,12 +1131,18 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// cmbCateFilter2
|
||||
//
|
||||
this.cmbCateFilter2.DefaultText = "全部";
|
||||
this.cmbCateFilter2.DropDownHeight = 1;
|
||||
this.cmbCateFilter2.DropDownWidth = 1;
|
||||
this.cmbCateFilter2.FormattingEnabled = true;
|
||||
this.cmbCateFilter2.IntegralHeight = false;
|
||||
this.cmbCateFilter2.Location = new System.Drawing.Point(178, 20);
|
||||
this.cmbCateFilter2.Name = "cmbCateFilter2";
|
||||
this.cmbCateFilter2.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbCateFilter2.TabIndex = 708;
|
||||
this.cmbCateFilter2.Text = "全部";
|
||||
this.cmbCateFilter2.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter2_SelectedIndexChanged);
|
||||
this.cmbCateFilter2.TextChanged += new System.EventHandler(this.cmbCateFilter2_TextChanged);
|
||||
//
|
||||
// label19
|
||||
//
|
||||
@@ -1208,12 +1232,18 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
// cmbCateFilter1
|
||||
//
|
||||
this.cmbCateFilter1.DefaultText = "全部";
|
||||
this.cmbCateFilter1.DropDownHeight = 1;
|
||||
this.cmbCateFilter1.DropDownWidth = 1;
|
||||
this.cmbCateFilter1.FormattingEnabled = true;
|
||||
this.cmbCateFilter1.IntegralHeight = false;
|
||||
this.cmbCateFilter1.Location = new System.Drawing.Point(47, 20);
|
||||
this.cmbCateFilter1.Name = "cmbCateFilter1";
|
||||
this.cmbCateFilter1.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbCateFilter1.TabIndex = 663;
|
||||
this.cmbCateFilter1.Text = "全部";
|
||||
this.cmbCateFilter1.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter1_SelectedIndexChanged);
|
||||
this.cmbCateFilter1.TextChanged += new System.EventHandler(this.cmbCateFilter1_TextChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
@@ -2292,18 +2322,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.panel1.Size = new System.Drawing.Size(873, 86);
|
||||
this.panel1.TabIndex = 189;
|
||||
//
|
||||
// chkRandomCompanyProd
|
||||
//
|
||||
this.chkRandomCompanyProd.Checked = true;
|
||||
this.chkRandomCompanyProd.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkRandomCompanyProd.Location = new System.Drawing.Point(856, 110);
|
||||
this.chkRandomCompanyProd.Name = "chkRandomCompanyProd";
|
||||
this.chkRandomCompanyProd.Size = new System.Drawing.Size(87, 21);
|
||||
this.chkRandomCompanyProd.TabIndex = 889;
|
||||
this.chkRandomCompanyProd.Text = "随机工厂商品";
|
||||
this.chkRandomCompanyProd.UseVisualStyleBackColor = true;
|
||||
this.chkRandomCompanyProd.Visible = false;
|
||||
//
|
||||
// WXDBProdUploadForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -2403,7 +2421,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private DevComponents.DotNetBar.PanelEx panelEx1;
|
||||
private System.Windows.Forms.TextBox txtIdFilter;
|
||||
private System.Windows.Forms.Label lblIdFilter;
|
||||
private System.Windows.Forms.ComboBox cmbCateFilter1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
public System.Windows.Forms.Label lblWaitToUp;
|
||||
private System.Windows.Forms.Label label7;
|
||||
@@ -2431,9 +2448,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private System.Windows.Forms.PictureBox pbLoadingShop;
|
||||
private System.Windows.Forms.ComboBox cmbJstInitSet;
|
||||
private System.Windows.Forms.Label lblJstInitSet;
|
||||
private System.Windows.Forms.ComboBox cmbCateFilter3;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.ComboBox cmbCateFilter2;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.PictureBox pbLoading;
|
||||
private DevComponents.DotNetBar.PanelEx btnFilterBound;
|
||||
@@ -2505,5 +2520,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private UserComponent.UcCheckBox chkUseWXComplateProd;
|
||||
private DevComponents.DotNetBar.PanelEx btnProdDb;
|
||||
private UserComponent.UcCheckBox chkRandomCompanyProd;
|
||||
private UserComponent.UcComboBoxMutiSelect cmbCateFilter1;
|
||||
private UserComponent.UcComboBoxMutiSelect cmbCateFilter3;
|
||||
private UserComponent.UcComboBoxMutiSelect cmbCateFilter2;
|
||||
}
|
||||
}
|
||||
@@ -1173,7 +1173,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}));
|
||||
}
|
||||
|
||||
public static KJDDBProduct GetProductDetail(string prodDbId, out string errMsg)
|
||||
public static KJDDBProduct GetProductDetail(string prodDbId, out string errMsg, bool noViolationProduct = false)
|
||||
{
|
||||
errMsg = "";
|
||||
|
||||
@@ -1186,9 +1186,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
List<KJDDBProduct> list = new List<KJDDBProduct>();
|
||||
|
||||
var url = BaseClass.BuildObjString("product/get_pdd_product_detail_list");
|
||||
var data = "";
|
||||
|
||||
data = UserLogin.GetSignaturex() + "&search_db_ids=" + prodDbId;
|
||||
var data = UserLogin.GetSignaturex() + "&search_db_ids=" + prodDbId;
|
||||
if (noViolationProduct)
|
||||
data += "&wx_safe_status=安全商品,未校验";
|
||||
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
@@ -4227,7 +4227,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
private void btnRandomAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnRandomAdd.Enabled = false;
|
||||
pbSelectProd.Visible = true;
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(5000);
|
||||
@@ -4236,6 +4235,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
btnRandomAdd.Enabled = true;
|
||||
}));
|
||||
});
|
||||
|
||||
pbSelectProd.Visible = true;
|
||||
int addCount = txtAddCount.Text.Trim().ParseToInt();
|
||||
if (getProdTokenSource != null)
|
||||
getProdTokenSource.Cancel();
|
||||
@@ -4245,18 +4246,19 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
List<KJDDBProduct> prodLst = new List<KJDDBProduct>();
|
||||
int index = 0;
|
||||
int pageSize = 50;
|
||||
int prodCount = 99999999;
|
||||
while (addCount > 0)
|
||||
{
|
||||
if (getProdTokenSource.IsCancellationRequested)
|
||||
break;
|
||||
|
||||
index++;
|
||||
int prodCount = 0;
|
||||
// 如果产品数量在0到50之间,说明数据库商品数量不足,无需再重复筛选,直接随机打乱
|
||||
if (prodLst.Count == 0 || prodLst.Count == Math.Min(pageSize, addCount))
|
||||
if (prodLst.Count == 0 || prodCount > pageSize)
|
||||
{
|
||||
if (index > 1 && prodCount > 0)
|
||||
if (prodCount != 99999999)
|
||||
{
|
||||
//不重复筛选
|
||||
prodLst = GetRandomProductList(out prodCount, 1, Math.Min(pageSize, addCount), true, prodCount);
|
||||
}
|
||||
else
|
||||
@@ -4282,7 +4284,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
var selectProd = JsonHelper.DeserializeJsonToObject<TemuDBProductSelect>(JsonHelper.SerializeObject(prod));
|
||||
selectProd.out_product_Id = prod.id.ToString();
|
||||
selectProd.id = 1;
|
||||
if(lstTemuDBProductSelect.Count > 0)
|
||||
if (lstTemuDBProductSelect.Count > 0)
|
||||
selectProd.id = lstTemuDBProductSelect.Max(p => p.id) + 1;
|
||||
this.lstTemuDBProductSelect.Add(selectProd);
|
||||
|
||||
@@ -4328,28 +4330,49 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
data += "&in_ext_codes=" + txtExtCodeFilter.Text;
|
||||
data += "&in_spu_ids=" + txtIdFilter.Text;
|
||||
data += "&in_groups=" + cmbGroupFilter.Text;
|
||||
|
||||
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
|
||||
data += "&in_cates=" + cmbCateFilter1.Text;
|
||||
data += "&in_cates=" + (cmbCateFilter1.Text == "全部" ? "" : cmbCateFilter1.Text);
|
||||
else
|
||||
{
|
||||
var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim());
|
||||
var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList();
|
||||
var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim());
|
||||
var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList();
|
||||
var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCateFilter3.Text.Trim());
|
||||
//var selectCate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim());
|
||||
//var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == selectCate1?.cat_id).ToList();
|
||||
//var selectCate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim());
|
||||
//var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == selectCate2?.cat_id).ToList();
|
||||
//var selectCate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCateFilter3.Text.Trim());
|
||||
|
||||
if (!string.IsNullOrEmpty(cmbCateFilter1.Text) && cate1 != null)
|
||||
data += "&wx_cat_1=" + cate1.cat_id;
|
||||
else if (chkSkipQualification.Checked)
|
||||
//if (!string.IsNullOrEmpty(cmbCateFilter1.Text) && selectCate1 != null)
|
||||
// data += "&wx_cat_1=" + selectCate1.cat_id;
|
||||
//else if (chkSkipQualification.Checked)
|
||||
//{
|
||||
// // 厂商直采普通店铺不要随特殊商品
|
||||
// data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c=>c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品"))
|
||||
// .Select(c => c.cat_id));
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(cmbCateFilter2.Text) && selectCate2 != null)
|
||||
// data += "&wx_cat_2=" + selectCate2.cat_id;
|
||||
//if (!string.IsNullOrEmpty(cmbCateFilter3.Text) && selectCate3 != null)
|
||||
// data += "&wx_cat_3=" + selectCate3.cat_id;
|
||||
|
||||
var selectCate1 = GlobalConfig.WxCatList.Where(c => c.level == 1 && (";" + cmbCateFilter1.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList();
|
||||
var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList();
|
||||
var selectCate2 = cates2.Where(c => c.level == 2 && (";" + cmbCateFilter2.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList();
|
||||
var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList();
|
||||
var selectCate3 = cates3.Where(c => c.level == 3 && (";" + cmbCateFilter3.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList();
|
||||
|
||||
if (selectCate1?.Count == 0 && chkSkipQualification.Checked)
|
||||
{
|
||||
// 厂商直采普通店铺不要随特殊商品
|
||||
data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c=>c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品"))
|
||||
data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c => c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品"))
|
||||
.Select(c => c.cat_id));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cmbCateFilter2.Text) && cate2 != null)
|
||||
data += "&wx_cat_2=" + cate2.cat_id;
|
||||
if (!string.IsNullOrEmpty(cmbCateFilter3.Text) && cate3 != null)
|
||||
data += "&wx_cat_3=" + cate3.cat_id;
|
||||
|
||||
if (!string.IsNullOrEmpty(cmbCateFilter1.Text) && selectCate1?.Count > 0)
|
||||
data += "&wx_cat_1=" + string.Join(",", selectCate1.Select(c => c.cat_id).ToList());
|
||||
if (!string.IsNullOrEmpty(cmbCateFilter2.Text) && selectCate2?.Count > 0)
|
||||
data += "&wx_cat_2=" + string.Join(",", selectCate2.Select(c => c.cat_id).ToList());
|
||||
if (!string.IsNullOrEmpty(cmbCateFilter3.Text) && selectCate3?.Count > 0)
|
||||
data += "&wx_cat_3=" + string.Join(",", selectCate3.Select(c => c.cat_id).ToList());
|
||||
}
|
||||
data += "&product_get_type=" + cmbSourceType.Text.Trim();
|
||||
data += "&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验");
|
||||
@@ -4777,46 +4800,97 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
private void cmbCateFilter1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采")
|
||||
return;
|
||||
|
||||
cmbCateFilter2.Text = "";
|
||||
cmbCateFilter2.Items.Clear();
|
||||
var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim());
|
||||
var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList();
|
||||
foreach (var cate2 in cates2)
|
||||
{
|
||||
cmbCateFilter2.Items.Add(cate2.name);
|
||||
}
|
||||
//if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采")
|
||||
// return;
|
||||
|
||||
//cmbCateFilter2.Text = "";
|
||||
//cmbCateFilter2.Items.Clear();
|
||||
//var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim());
|
||||
//var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList();
|
||||
//foreach (var cate2 in cates2)
|
||||
//{
|
||||
// cmbCateFilter2.Items.Add(cate2.name);
|
||||
//}
|
||||
}
|
||||
|
||||
private void cmbCateFilter2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采")
|
||||
return;
|
||||
//if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采")
|
||||
// return;
|
||||
|
||||
cmbCateFilter3.Text = "";
|
||||
cmbCateFilter3.Items.Clear();
|
||||
var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim());
|
||||
var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList();
|
||||
var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim());
|
||||
var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList();
|
||||
foreach (var cate3 in cates3)
|
||||
{
|
||||
cmbCateFilter3.Items.Add(cate3.name);
|
||||
}
|
||||
//cmbCateFilter3.Text = "";
|
||||
//cmbCateFilter3.Items.Clear();
|
||||
//var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim());
|
||||
//var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList();
|
||||
//var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim());
|
||||
//var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList();
|
||||
//foreach (var cate3 in cates3)
|
||||
//{
|
||||
// cmbCateFilter3.Items.Add(cate3.name);
|
||||
//}
|
||||
}
|
||||
|
||||
private void cmbCateFilter3_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim());
|
||||
var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList();
|
||||
var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim());
|
||||
var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList();
|
||||
var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCateFilter3.Text.Trim());
|
||||
//var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCateFilter1.Text.Trim());
|
||||
//var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList();
|
||||
//var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCateFilter2.Text.Trim());
|
||||
//var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList();
|
||||
//var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCateFilter3.Text.Trim());
|
||||
}
|
||||
|
||||
private void cmbCateFilter1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
|
||||
return;
|
||||
|
||||
cmbCateFilter2.Text = "";
|
||||
cmbCateFilter2.Items.Clear();
|
||||
cmbCateFilter3.Text = "";
|
||||
cmbCateFilter3.Items.Clear();
|
||||
var selectCate1 = GlobalConfig.WxCatList
|
||||
.Where(c => c.level == 1 && (cmbCateFilter1.Text.Trim() == cmbCateFilter1.DefaultText || (";" + cmbCateFilter1.Text.Trim() + ";")
|
||||
.Contains(";" + c.name + ";"))).ToList();
|
||||
var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList();
|
||||
//foreach (var cate2 in cates2)
|
||||
//{
|
||||
// cmbCat2.Items.Add(cate2.name);
|
||||
//}
|
||||
cmbCateFilter2.Items.AddRange(cates2.Select(c => c.name).ToArray());
|
||||
}
|
||||
|
||||
private void cmbCateFilter2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
|
||||
return;
|
||||
|
||||
cmbCateFilter3.Text = "";
|
||||
cmbCateFilter3.Items.Clear();
|
||||
var selectCate1 = GlobalConfig.WxCatList
|
||||
.Where(c => c.level == 1 && (cmbCateFilter1.Text.Trim() == cmbCateFilter1.DefaultText || (";" + cmbCateFilter1.Text.Trim() + ";")
|
||||
.Contains(";" + c.name + ";"))).ToList();
|
||||
var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList();
|
||||
var selectCate2 = cates2
|
||||
.Where(c => c.level == 2 && (cmbCateFilter2.Text.Trim() == cmbCateFilter1.DefaultText || (";" + cmbCateFilter2.Text.Trim() + ";")
|
||||
.Contains(c.name))).ToList();
|
||||
var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList();
|
||||
//foreach (var cate3 in cates3)
|
||||
//{
|
||||
// cmbCat3.Items.Add(cate3.name);
|
||||
//}
|
||||
cmbCateFilter3.Items.AddRange(cates3.Select(c => c.name).ToArray());
|
||||
}
|
||||
|
||||
private void cmbCateFilter3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCat1.Text.Trim());
|
||||
//var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList();
|
||||
//var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCat1.Text.Trim());
|
||||
//var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList();
|
||||
//var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCat1.Text.Trim());
|
||||
}
|
||||
|
||||
|
||||
private void btnFilterBound_Click(object sender, EventArgs e)
|
||||
{
|
||||
var boundMax = txtFilterBoundMax.Text.Trim().ParseToInt();
|
||||
@@ -5023,6 +5097,15 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string searchProductWithTitle(ShopLoginInfo shop, string urlEncodeTitle)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/searchProduct?" +
|
||||
"token=&lang=zh_CN&pageSize=20&productStatus[]=-1&productSource=[1,16,32]&searchSource=1&useNew=true&pageNum=1&status[]=-1&title=" + urlEncodeTitle;
|
||||
string refere = "https://store.weixin.qq.com/shop/goods/list";
|
||||
var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, refere);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string getUploadTempImgAuth(ShopLoginInfo shop, int uploadScene = 3)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmecchannelspicture/cgi/getUploadTempImgAuth?token=&lang=zh_CN&uploadScene=" + uploadScene;
|
||||
|
||||
+6
-6
@@ -404,7 +404,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.cmbCat3.DropDownWidth = 1;
|
||||
this.cmbCat3.FormattingEnabled = true;
|
||||
this.cmbCat3.IntegralHeight = false;
|
||||
this.cmbCat3.Location = new System.Drawing.Point(733, 5);
|
||||
this.cmbCat3.Location = new System.Drawing.Point(733, 7);
|
||||
this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.cmbCat3.Name = "cmbCat3";
|
||||
this.cmbCat3.Size = new System.Drawing.Size(151, 25);
|
||||
@@ -432,7 +432,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.cmbCat2.DropDownWidth = 1;
|
||||
this.cmbCat2.FormattingEnabled = true;
|
||||
this.cmbCat2.IntegralHeight = false;
|
||||
this.cmbCat2.Location = new System.Drawing.Point(525, 5);
|
||||
this.cmbCat2.Location = new System.Drawing.Point(525, 7);
|
||||
this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.cmbCat2.Name = "cmbCat2";
|
||||
this.cmbCat2.Size = new System.Drawing.Size(151, 25);
|
||||
@@ -460,7 +460,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.cmbCat1.DropDownWidth = 1;
|
||||
this.cmbCat1.FormattingEnabled = true;
|
||||
this.cmbCat1.IntegralHeight = false;
|
||||
this.cmbCat1.Location = new System.Drawing.Point(298, 5);
|
||||
this.cmbCat1.Location = new System.Drawing.Point(298, 7);
|
||||
this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.cmbCat1.Name = "cmbCat1";
|
||||
this.cmbCat1.Size = new System.Drawing.Size(151, 25);
|
||||
@@ -520,7 +520,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
"安全+未校验",
|
||||
"安全商品",
|
||||
"未校验"});
|
||||
this.cmbWxSafe.Location = new System.Drawing.Point(71, 40);
|
||||
this.cmbWxSafe.Location = new System.Drawing.Point(71, 42);
|
||||
this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.cmbWxSafe.Name = "cmbWxSafe";
|
||||
this.cmbWxSafe.Size = new System.Drawing.Size(151, 25);
|
||||
@@ -543,7 +543,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//
|
||||
this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmbGroupFilter.FormattingEnabled = true;
|
||||
this.cmbGroupFilter.Location = new System.Drawing.Point(934, 7);
|
||||
this.cmbGroupFilter.Location = new System.Drawing.Point(934, 5);
|
||||
this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.cmbGroupFilter.Name = "cmbGroupFilter";
|
||||
this.cmbGroupFilter.Size = new System.Drawing.Size(151, 25);
|
||||
@@ -564,7 +564,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
"机会商品",
|
||||
"以图搜品",
|
||||
"外部数据"});
|
||||
this.cmbSourceType.Location = new System.Drawing.Point(733, 40);
|
||||
this.cmbSourceType.Location = new System.Drawing.Point(733, 42);
|
||||
this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
|
||||
this.cmbSourceType.Name = "cmbSourceType";
|
||||
this.cmbSourceType.Size = new System.Drawing.Size(151, 25);
|
||||
|
||||
Reference in new issue
Block a user