1temu用户选择商品三个表及数据库id映射draftid分表操作 2拼多多读取商品显示总数 3temu可以修改单店备注

This commit is contained in:
wule committed 2025-12-19 19:47:53 +08:00
1 parent a61b8786d1
commit 4fd2a4d579
47 files changed
+2146 -1042

No files matched your search

@@ -71,7 +71,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMinus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPlus = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -526,7 +526,7 @@ namespace TemuKJD.PDDForms.AdminForms
this.colLoginName,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colMinus,
this.colProductRemaining,
this.colPlus,
@@ -628,11 +628,11 @@ namespace TemuKJD.PDDForms.AdminForms
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colMinus
//
@@ -915,7 +915,7 @@ namespace TemuKJD.PDDForms.AdminForms
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colMinus;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductRemaining;
private System.Windows.Forms.DataGridViewTextBoxColumn colPlus;
@@ -129,7 +129,7 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMinus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -372,6 +372,11 @@ namespace TemuKJD.PDDForms.ProductForms
int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt();
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询... 店铺:" + shop.ShopAccount + " 共有 " + cmbStatus.Text + " 商品:" + total;
}));
}
}
@@ -403,7 +408,8 @@ namespace TemuKJD.PDDForms.ProductForms
sRst = "已取消查询!";
BaseMsgForm.ShowInfo(sRst);
this.statusBar.lblTaskStatus.Text = sRst;
//this.statusBar.lblTaskStatus.Text = sRst;
this.statusBar.lblTaskStatus.Text = this.statusBar.lblTaskStatus.Text.Replace("正在查询...", sRst);
}));
}, cancellationTokenSource.Token);
}
@@ -64,8 +64,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
url = BaseClass.BuildObjString("product/mdy_product_select_notes");
else
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProdSelect.id + "&user_notes=" + this.cmbUserNotes.Text.Trim();
var data = UserLogin.GetSignaturex();
data += "&db_id=";
data += "&select_add_time=" + dbProdSelect.add_time.ToString("yyyy-MM-dd HH:mm:ss");
data += dbProdSelect.id + "&user_notes=" + this.cmbUserNotes.Text.Trim();
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -30,14 +30,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.chkUseExtCodePrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.pbUpgradeVersion = new System.Windows.Forms.PictureBox();
this.lblUpgradeVersion = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
@@ -118,6 +119,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.pbLoading = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -140,11 +145,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.chkUseExtCodePrice = new TemuKJD.UserComponent.UcCheckBox(this.components);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -251,6 +251,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品上传";
//
// chkUseExtCodePrice
//
this.chkUseExtCodePrice.AutoSize = true;
this.chkUseExtCodePrice.Checked = true;
this.chkUseExtCodePrice.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkUseExtCodePrice.Location = new System.Drawing.Point(780, 22);
this.chkUseExtCodePrice.Name = "chkUseExtCodePrice";
this.chkUseExtCodePrice.Size = new System.Drawing.Size(147, 21);
this.chkUseExtCodePrice.TabIndex = 717;
this.chkUseExtCodePrice.Text = "使用货号价格做基础价";
this.chkUseExtCodePrice.UseVisualStyleBackColor = true;
this.chkUseExtCodePrice.CheckedChanged += new System.EventHandler(this.chkUseExtCodePrice_CheckedChanged);
//
// pbUpgradeVersion
//
this.pbUpgradeVersion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@@ -1166,19 +1179,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1346,19 +1359,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.dgvSelectProduct.AllowUserToAddRows = false;
this.dgvSelectProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvSelectProduct.AutoRowNumber = true;
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1393,185 +1406,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
//
// colCheck
//
this.colCheck.Frozen = true;
this.colCheck.HeaderText = "选择";
this.colCheck.Name = "colCheck";
this.colCheck.ReadOnly = true;
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCheck.Width = 30;
//
// colSelectId
//
this.colSelectId.HeaderText = "认领Id";
this.colSelectId.Name = "colSelectId";
this.colSelectId.ReadOnly = true;
this.colSelectId.Visible = false;
//
// colSupplierId
//
this.colSupplierId.Frozen = true;
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
//
// colSupplierName
//
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle11;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
//
// colLogin
//
this.colLogin.HeaderText = "登录";
this.colLogin.Name = "colLogin";
this.colLogin.ReadOnly = true;
this.colLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLogin.Width = 45;
//
// colInShop
//
this.colInShop.HeaderText = "进店";
this.colInShop.Name = "colInShop";
this.colInShop.ReadOnly = true;
this.colInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colInShop.Width = 45;
//
// colSpuId
//
this.colSpuId.HeaderText = "商品ID";
this.colSpuId.Name = "colSpuId";
this.colSpuId.ReadOnly = true;
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSpuId.Width = 80;
//
// colSkcId
//
this.colSkcId.FillWeight = 150F;
this.colSkcId.HeaderText = "商品SKC";
this.colSkcId.Name = "colSkcId";
this.colSkcId.ReadOnly = true;
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkcId.Visible = false;
this.colSkcId.Width = 80;
//
// colImgUrl
//
this.colImgUrl.HeaderText = "图片地址";
this.colImgUrl.Name = "colImgUrl";
this.colImgUrl.ReadOnly = true;
this.colImgUrl.Visible = false;
//
// colProductSkcPic
//
this.colProductSkcPic.HeaderText = "图片";
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colProductSkcPic.Name = "colProductSkcPic";
this.colProductSkcPic.ReadOnly = true;
this.colProductSkcPic.Width = 60;
//
// colSkuFakeImgUrl
//
this.colSkuFakeImgUrl.HeaderText = "SKU替换图地址";
this.colSkuFakeImgUrl.Name = "colSkuFakeImgUrl";
this.colSkuFakeImgUrl.ReadOnly = true;
this.colSkuFakeImgUrl.Visible = false;
//
// colSkuFakeImg
//
this.colSkuFakeImg.HeaderText = "SKU替换图";
this.colSkuFakeImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colSkuFakeImg.Name = "colSkuFakeImg";
this.colSkuFakeImg.ReadOnly = true;
this.colSkuFakeImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkuFakeImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkuFakeImg.Visible = false;
this.colSkuFakeImg.Width = 60;
//
// colProductName
//
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle12;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 160;
//
// colProductCat
//
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
this.colProductCat.Width = 90;
//
// colExtCode
//
this.colExtCode.HeaderText = "商品货号";
this.colExtCode.Name = "colExtCode";
this.colExtCode.ReadOnly = true;
//
// colMsg
//
this.colMsg.HeaderText = "状态";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
//
// colDraftId
//
this.colDraftId.HeaderText = "上传商品Id";
this.colDraftId.Name = "colDraftId";
this.colDraftId.ReadOnly = true;
this.colDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.colDraftId.Width = 80;
//
// colNotes
//
this.colNotes.HeaderText = "上传备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
this.colNotes.Visible = false;
//
// colUserNotes
//
this.colUserNotes.HeaderText = "重上/已买";
this.colUserNotes.Name = "colUserNotes";
this.colUserNotes.ReadOnly = true;
this.colUserNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colUserNotes.Visible = false;
this.colUserNotes.Width = 75;
//
// ColDelete
//
this.ColDelete.HeaderText = "删除";
this.ColDelete.Name = "ColDelete";
this.ColDelete.ReadOnly = true;
this.ColDelete.Visible = false;
this.ColDelete.Width = 75;
//
// colAddTime
//
this.colAddTime.FillWeight = 110F;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
//
// colOpResult
//
this.colOpResult.HeaderText = "操作结果";
this.colOpResult.Name = "colOpResult";
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 260;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1652,18 +1486,183 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.panelEx1.Text = "停止当前操作";
this.panelEx1.Visible = false;
//
// chkUseExtCodePrice
// colCheck
//
this.chkUseExtCodePrice.AutoSize = true;
this.chkUseExtCodePrice.Checked = true;
this.chkUseExtCodePrice.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkUseExtCodePrice.Location = new System.Drawing.Point(780, 22);
this.chkUseExtCodePrice.Name = "chkUseExtCodePrice";
this.chkUseExtCodePrice.Size = new System.Drawing.Size(147, 21);
this.chkUseExtCodePrice.TabIndex = 717;
this.chkUseExtCodePrice.Text = "使用货号价格做基础价";
this.chkUseExtCodePrice.UseVisualStyleBackColor = true;
this.chkUseExtCodePrice.CheckedChanged += new System.EventHandler(this.chkUseExtCodePrice_CheckedChanged);
this.colCheck.Frozen = true;
this.colCheck.HeaderText = "选择";
this.colCheck.Name = "colCheck";
this.colCheck.ReadOnly = true;
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCheck.Width = 30;
//
// colSelectId
//
this.colSelectId.HeaderText = "认领Id";
this.colSelectId.Name = "colSelectId";
this.colSelectId.ReadOnly = true;
this.colSelectId.Visible = false;
//
// colSupplierId
//
this.colSupplierId.Frozen = true;
this.colSupplierId.HeaderText = "店铺Id";
this.colSupplierId.Name = "colSupplierId";
this.colSupplierId.ReadOnly = true;
//
// colSupplierName
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
this.colSupplierName.ReadOnly = true;
//
// colLogin
//
this.colLogin.HeaderText = "登录";
this.colLogin.Name = "colLogin";
this.colLogin.ReadOnly = true;
this.colLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colLogin.Width = 40;
//
// colInShop
//
this.colInShop.HeaderText = "进店";
this.colInShop.Name = "colInShop";
this.colInShop.ReadOnly = true;
this.colInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colInShop.Width = 40;
//
// colSpuId
//
this.colSpuId.HeaderText = "源商品ID";
this.colSpuId.Name = "colSpuId";
this.colSpuId.ReadOnly = true;
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colSkcId
//
this.colSkcId.FillWeight = 150F;
this.colSkcId.HeaderText = "商品SKC";
this.colSkcId.Name = "colSkcId";
this.colSkcId.ReadOnly = true;
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkcId.Visible = false;
this.colSkcId.Width = 80;
//
// colImgUrl
//
this.colImgUrl.HeaderText = "图片地址";
this.colImgUrl.Name = "colImgUrl";
this.colImgUrl.ReadOnly = true;
this.colImgUrl.Visible = false;
//
// colProductSkcPic
//
this.colProductSkcPic.HeaderText = "图片";
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colProductSkcPic.Name = "colProductSkcPic";
this.colProductSkcPic.ReadOnly = true;
this.colProductSkcPic.Width = 60;
//
// colSkuFakeImgUrl
//
this.colSkuFakeImgUrl.HeaderText = "SKU替换图地址";
this.colSkuFakeImgUrl.Name = "colSkuFakeImgUrl";
this.colSkuFakeImgUrl.ReadOnly = true;
this.colSkuFakeImgUrl.Visible = false;
//
// colSkuFakeImg
//
this.colSkuFakeImg.HeaderText = "SKU替换图";
this.colSkuFakeImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colSkuFakeImg.Name = "colSkuFakeImg";
this.colSkuFakeImg.ReadOnly = true;
this.colSkuFakeImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSkuFakeImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSkuFakeImg.Visible = false;
this.colSkuFakeImg.Width = 60;
//
// colProductName
//
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
this.colProductName.HeaderText = "商品标题";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Width = 150;
//
// colProductCat
//
this.colProductCat.HeaderText = "商品类目";
this.colProductCat.Name = "colProductCat";
this.colProductCat.ReadOnly = true;
this.colProductCat.Width = 90;
//
// colExtCode
//
this.colExtCode.HeaderText = "商品货号";
this.colExtCode.Name = "colExtCode";
this.colExtCode.ReadOnly = true;
//
// colMsg
//
this.colMsg.HeaderText = "状态";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
//
// colDraftId
//
this.colDraftId.HeaderText = "上传商品Id";
this.colDraftId.Name = "colDraftId";
this.colDraftId.ReadOnly = true;
this.colDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.colDraftId.Width = 80;
//
// colNotes
//
this.colNotes.HeaderText = "上传备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
this.colNotes.Visible = false;
//
// colUserNotes
//
this.colUserNotes.HeaderText = "重上/已买";
this.colUserNotes.Name = "colUserNotes";
this.colUserNotes.ReadOnly = true;
this.colUserNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colUserNotes.Visible = false;
this.colUserNotes.Width = 75;
//
// ColDelete
//
this.ColDelete.HeaderText = "删除";
this.ColDelete.Name = "ColDelete";
this.ColDelete.ReadOnly = true;
this.ColDelete.Visible = false;
this.ColDelete.Width = 75;
//
// colAddTime
//
this.colAddTime.FillWeight = 110F;
this.colAddTime.HeaderText = "上传时间";
this.colAddTime.Name = "colAddTime";
this.colAddTime.ReadOnly = true;
//
// colOpResult
//
this.colOpResult.HeaderText = "操作结果";
this.colOpResult.Name = "colOpResult";
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 260;
//
// PDDDBProdUserSelectForm
//
@@ -1789,6 +1788,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
public System.Windows.Forms.Label lblWaitToUp;
private System.Windows.Forms.TextBox txtTest20981;
private DevComponents.DotNetBar.PanelEx btnTest20981;
private UserComponent.UcCheckBox chk15996;
private UserComponent.UcCheckBox chk21365;
private UserComponent.UcCheckBox chk20981;
private UserComponent.UcCheckBox chk22347;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtUpgradeVersionAddPrice;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtUpgradeVersionName;
private UserComponent.UcCheckBox chkUpgradeVersion;
private System.Windows.Forms.PictureBox pbUpgradeVersion;
private System.Windows.Forms.Label lblUpgradeVersion;
private UserComponent.UcCheckBox chkUseExtCodePrice;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
@@ -1811,17 +1822,5 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
private UserComponent.UcCheckBox chk15996;
private UserComponent.UcCheckBox chk21365;
private UserComponent.UcCheckBox chk20981;
private UserComponent.UcCheckBox chk22347;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtUpgradeVersionAddPrice;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtUpgradeVersionName;
private UserComponent.UcCheckBox chkUpgradeVersion;
private System.Windows.Forms.PictureBox pbUpgradeVersion;
private System.Windows.Forms.Label lblUpgradeVersion;
private UserComponent.UcCheckBox chkUseExtCodePrice;
}
}
@@ -448,6 +448,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/del_select_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbId;
var dbSelectProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ParseToString() == dbId);
data += "&select_add_time=" + dbSelectProduct.add_time.ToString("yyyy-MM-dd HH:mm:ss");
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
@@ -804,11 +806,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (kjdDbProd?.id == 0)
{
prod.status = "已清除";
var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var empty_data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&status=已清除";
GetHtml.PostUtf8(empty_url, empty_data);
//var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
//var empty_data = UserLogin.GetSignaturex() +
// "&select_add_time=" + prod.add_time.ToString("yyyy-MM-dd HH:mm:ss") +
// "&db_id=" + prod.id +
// "&status=已清除";
//GetHtml.PostUtf8(empty_url, empty_data);
}
Invoke(new Action(() =>
@@ -989,6 +992,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
string UploadProduct(ShopLoginInfo shop, KJDDBProduct dbProd, TemuDBProductSelect selectProd, DataGridViewCell cell, DateTime startTime)
{
Thread.Sleep(Randomx.GetId(300, 2000));
if (shop == null || string.IsNullOrEmpty(shop.ShopId) || shop.LoginStatus != "登录成功")
{
return "店铺为空或未登录!";
@@ -1009,6 +1013,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
int sleepTimeTotal = 0;
var prodInfo = JsonHelper.DeserializeJsonToObject<PDDProductInfo>(dbProd.product_json);
prodInfo.detail.galleries.RemoveAll(g => g.type == 6); // 视频暂时移除,以后再视情况加上
var prodParam = new PDDProductUploadParam();
int currentCount = 0;
@@ -1197,6 +1202,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
string decoration_preview_html = preview_goods_decoration(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, "", prodInfo.chance_tab);
Thread.Sleep(Randomx.GetId(30, 120));
if (decoration_preview_html.Contains("\"success\":true"))
{
prodParam.decorationPreview = BaseRegex.GetStringJson(ref decoration_preview_html, "preview_url");
@@ -1284,6 +1290,68 @@ namespace TemuKJD.PDDForms.ProductSelectForms
prodParam.damage_claim = prodInfo.detail.damage_claim;
prodParam.dead_line_seconds = 86399; // 1天?
prodParam.decorationCanEdit = true;
foreach (var floorItem in prodInfo.decoration.floor_list)
{
foreach(var contentItem in floorItem.content_list)
{
}
}
//PDDProdDecorationCommitParam decorationParam = new PDDProdDecorationCommitParam();
//decorationParam.goods_id = prodParam.goods_id;
//decorationParam.goods_commit_id = prodParam.goods_commit_id.ParseToLong();
//decorationParam.preview_key = "";
//decorationParam.decoration_floor_list = new List<decoration_floor_param>();
//foreach (var floorItem in prodInfo.decoration.floor_list)
//{
// if (floorItem.type != "image")
// continue;
// var gallary = floorItem.content_list.FirstOrDefault();
// var floor_param = new decoration_floor_param();
// floor_param.type = "image"; // floorItem.type;
// floor_param.content_list = new List<decoration_content_param>();
// {
// var decorationContentParam = new decoration_content_param()
// {
// img_url = gallary.img_url,
// };
// floor_param.content_list.Add(decorationContentParam);
// }
// decorationParam.decoration_floor_list.Add(floor_param);
//}
//var addDecorationRst = save_decoration(shop, decorationParam, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab);
//Thread.Sleep(Randomx.GetId(10, 50));
// 第二次获取详情图
//try
//{
// var prod_decoration_rst = GetPddProdDecoration(sourceShop, sourceProdId.ToString(), commitId);
// if (!prod_decoration_rst.Contains("\"success\":true"))
// {
// var errMsg = BaseRegex.GetStringJson(ref prod_decoration_rst, "error_msg");
// if (string.IsNullOrEmpty(errMsg))
// errMsg = prod_decoration_rst;
// OnInfoReceived("商品获取失败!商品详情图获取失败!" + errMsg);
// return;
// }
// JObject prod_decoration_obj = JObject.Parse(prod_decoration_rst);
// if (!prod_decoration_obj["result"].IsNullOrEmpty())
// decoration_json = JsonHelper.SerializeObject(prod_decoration_obj["result"]);
// decoration = JsonHelper.DeserializeJsonToObject<PDDProductDecorationInfo>(decoration_json);
//}
//catch (Exception ex)
//{
// OnInfoReceived("商品获取失败!商品详情图获取失败!" + ex.Message);
// return;
//}
prodParam.decorationDetail = prodInfo.decoration.floor_list;
//prodParam.decorationPreview = ""; // 商品详情图,通过接口获取
prodParam.default_template_gray = true;
@@ -1398,6 +1466,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (propTemp == null)
continue;
if (propInfo.name == "鞋底厚度")
{
//if (!propTemp.values.content.Any(c => c.value == propInfo.values.))
if (!propInfo.values.All(v => propTemp.values.content.Any(c => c.value == v.value)))
{
continue;
}
}
//var prop = new goods_property_param()
var prop = new goods_spec_property_param()
{
@@ -1961,7 +2038,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//return "上传成功";
#endregion
sleepTime = Randomx.GetId(1000, 5000);
//sleepTime = Randomx.GetId(1000, 5000);
sleepTime = Randomx.GetId(2000, 7000);
sleepTimeTotal += sleepTime;
Thread.Sleep(sleepTime);
var rand2 = Randomx.GetId(100);
@@ -2004,7 +2082,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var size_result = "";
if (prodInfo.size != null && prodInfo.size.classId != null)
{
Thread.Sleep(Randomx.GetId(15, 70));
Thread.Sleep(Randomx.GetId(20, 120));
size_result = save_sizespec(shop, prodInfo.size, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab);
if (!size_result.Contains("\"success\":true"))
{
@@ -2478,6 +2556,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
decoration_preview_html = preview_goods_decoration(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, "", prodInfo.chance_tab);
}
//decoration_preview_html = GetPddDecorationPreview(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id);
//var prod_decoration_rst = GetPddProdDecoration(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id);
//try
//{
// JObject jO = JObject.Parse(prod_decoration_rst);
// var decorationStr = jO["result"]["floor_list"].ToString();
// prodParam.decorationDetail = JsonHelper.DeserializeJsonToList<PDDProdfloorItem>(decorationStr);
//}
//catch (Exception ex)
//{
//}
if (decoration_preview_html.Contains("\"success\":true"))
{
prodParam.decorationPreview = BaseRegex.GetStringJson(ref decoration_preview_html, "preview_url");
@@ -4069,6 +4157,30 @@ Content-Disposition: form-data; name=""pic_operations""
return result;
}
private string GetPddProdDecoration(ShopLoginInfo shop, string prodId, string commitId)
{
var anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
string url = "https://mms.pinduoduo.com/gorse/mms/goods/decoration/commit/query/V2";
url = "https://mms.pinduoduo.com/gorse/mms/goods/decoration/commit/query/V2";
string body = @"{""goods_commit_id"":" + commitId + @",""goods_id"":" + prodId + @"}";
string refere = "https://mms.pinduoduo.com/goods/goods_add/index?id=" + commitId + "&goods_id=" + prodId + "&type=edit";
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++)
{
shop.AntiContents.Remove(anti);
anti = shop.AntiContents.FirstOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)
{
Thread.Sleep(Randomx.GetId(300, 500));
anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)];
result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
}
}
return result;
}
/// <summary>
/// 保存商品详情
/// glide/mms/goodsCommit/action/edit
+7 -7
View File
@@ -58,7 +58,7 @@
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.conNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSubUser = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -425,7 +425,7 @@
this.colLoginName,
this.colShopId,
this.colShopAccount,
this.conNotes,
this.colNotes,
this.colCookie,
this.colSubUser,
this.colGroupName,
@@ -482,11 +482,11 @@
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// conNotes
// colNotes
//
this.conNotes.HeaderText = "备注";
this.conNotes.Name = "conNotes";
this.conNotes.ReadOnly = true;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colCookie
//
@@ -729,7 +729,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn conNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewTextBoxColumn colCookie;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colGroupName;
@@ -129,7 +129,7 @@
<metadata name="colShopAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="conNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="colNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCookie.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">