diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj
index fa593a4..e70ef77 100644
--- a/AllBase/AllBase.csproj
+++ b/AllBase/AllBase.csproj
@@ -187,6 +187,7 @@
+
diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index e60712b..d958ab5 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 628;
+ public static int VersionCount = 630;
//public static int VersionCount = 613;
///
diff --git a/AllBase/Model/Param/PDDCouponParam/PDDCouponGoodsListParam.cs b/AllBase/Model/Param/PDDCouponParam/PDDCouponGoodsListParam.cs
new file mode 100644
index 0000000..a67ef70
--- /dev/null
+++ b/AllBase/Model/Param/PDDCouponParam/PDDCouponGoodsListParam.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AllBase.Model.Param.PDDCouponParam
+{
+ public class PDDCouponGoodsListParam
+ {
+ public List
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDDBProdImgListForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.chkUpdateTag = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
this.cmbTypeFilter = new System.Windows.Forms.ComboBox();
@@ -82,6 +84,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
// splitContainer1.Panel1
//
+ this.splitContainer1.Panel1.Controls.Add(this.chkUpdateTag);
this.splitContainer1.Panel1.Controls.Add(this.btnSearch);
this.splitContainer1.Panel1.Controls.Add(this.pnlEmpty);
this.splitContainer1.Panel1.Controls.Add(this.cmbTypeFilter);
@@ -92,10 +95,23 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
- this.splitContainer1.Size = new System.Drawing.Size(1378, 544);
+ this.splitContainer1.Size = new System.Drawing.Size(1003, 544);
this.splitContainer1.SplitterDistance = 53;
this.splitContainer1.TabIndex = 3;
//
+ // chkUpdateTag
+ //
+ this.chkUpdateTag.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.chkUpdateTag.AutoSize = true;
+ this.chkUpdateTag.Checked = true;
+ this.chkUpdateTag.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.chkUpdateTag.Location = new System.Drawing.Point(870, 17);
+ this.chkUpdateTag.Name = "chkUpdateTag";
+ this.chkUpdateTag.Size = new System.Drawing.Size(111, 21);
+ this.chkUpdateTag.TabIndex = 671;
+ this.chkUpdateTag.Text = "上传到临时图片";
+ this.chkUpdateTag.UseVisualStyleBackColor = true;
+ //
// btnSearch
//
this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -201,7 +217,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
- this.splitContainer2.Size = new System.Drawing.Size(1378, 487);
+ this.splitContainer2.Size = new System.Drawing.Size(1003, 487);
this.splitContainer2.SplitterDistance = 458;
this.splitContainer2.TabIndex = 0;
//
@@ -209,7 +225,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
- this.pbLoading.Location = new System.Drawing.Point(664, 204);
+ this.pbLoading.Location = new System.Drawing.Point(476, 204);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -223,7 +239,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.Location = new System.Drawing.Point(44, 55);
this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(1296, 364);
+ this.panel2.Size = new System.Drawing.Size(921, 364);
this.panel2.TabIndex = 8;
//
// dgvDbProduct
@@ -263,7 +279,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.dgvDbProduct.Name = "dgvDbProduct";
this.dgvDbProduct.ReadOnly = true;
this.dgvDbProduct.RowTemplate.Height = 23;
- this.dgvDbProduct.Size = new System.Drawing.Size(1370, 458);
+ this.dgvDbProduct.Size = new System.Drawing.Size(995, 458);
this.dgvDbProduct.TabIndex = 6;
this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick);
//
@@ -347,7 +363,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// colEdit
//
this.colEdit.FillWeight = 60F;
- this.colEdit.HeaderText = "替换图片";
+ this.colEdit.HeaderText = "更新图片";
this.colEdit.Name = "colEdit";
this.colEdit.ReadOnly = true;
this.colEdit.Resizable = System.Windows.Forms.DataGridViewTriState.True;
@@ -375,7 +391,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = false;
- this.ucSplitPage1.Location = new System.Drawing.Point(1016, 0);
+ this.ucSplitPage1.Location = new System.Drawing.Point(641, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
@@ -392,13 +408,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
- this.statusBar.Size = new System.Drawing.Size(1378, 25);
+ this.statusBar.Size = new System.Drawing.Size(1003, 25);
this.statusBar.TabIndex = 5;
//
// PDDDBProdImgListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- this.ClientSize = new System.Drawing.Size(1380, 578);
+ this.ClientSize = new System.Drawing.Size(1005, 578);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@@ -437,6 +453,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private UserComponent.DataGridViewEx dgvDbProduct;
private UserControls.UcSplitPage ucSplitPage1;
private UserControls.StatusBarUserControl statusBar;
+ private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colDbId;
private System.Windows.Forms.DataGridViewTextBoxColumn colImgMd5;
@@ -450,6 +467,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colSelectImg;
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
- private System.Windows.Forms.Panel panel2;
+ private UserComponent.UcCheckBox chkUpdateTag;
}
}
\ No newline at end of file
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdImgListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdImgListForm.cs
index b29e580..6f3b861 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdImgListForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdImgListForm.cs
@@ -43,11 +43,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
this.dgvDbProduct.Columns["colSelectImg"].Visible = false;
this.dgvDbProduct.Columns["colEdit"].Visible = true;
+ chkUpdateTag.Visible = true;
}
else
{
this.dgvDbProduct.Columns["colSelectImg"].Visible = true;
this.dgvDbProduct.Columns["colEdit"].Visible = false;
+ chkUpdateTag.Visible = false;
}
}
@@ -107,13 +109,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
skuImg.notes,
skuImg.add_time.ToString("yy-MM-dd HH:mm"),
skuImg.mdy_time.ToString("yy-MM-dd HH:mm"),
- "替换图片",
+ "更新图片",
"选择",
"删除",
"认领");
- //dgvDbProduct.Rows[rowIndex].Height = dgvDbProduct.Columns["colImg"].Width;
- dgvDbProduct.Rows[rowIndex].Height = 80;
+ dgvDbProduct.Rows[rowIndex].Height = Math.Min(80, dgvDbProduct.Columns["colImg"].Width);
}));
}
@@ -215,7 +216,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words;
//dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name;
break;
- case "替换图片":
+ case "更新图片":
UploadImg(dbProductImg);
break;
case "选择图片":
@@ -266,8 +267,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
PDDShopLoginForm loginForm = null;
Invoke(new Action(() =>
{
- //this.panel2.SendToBack();
- this.panel2.BringToFront();
+ this.panel2.SendToBack();
+ //this.panel2.BringToFront();
loginForm = new PDDShopLoginForm(shop);
loginForm.TopLevel = false;
loginForm.openType = EnumOpenType.manage;
@@ -298,8 +299,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
string img_md5 = BaseClass.GetMd5(imgBase64);
string img_url = "";
- var img = UploadProdSkuImg(shop, imgBase64);
- if (!img.Contains("\"url\":\"https:"))
+ var img = UploadProdSkuImg(shop, imgBase64, chkUpdateTag.Checked? "mms-material-img" : "mms-goods-image");
+ if (!img.Contains("\"url\":\"https:") && !img.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref img, "error_msg");
if (string.IsNullOrEmpty(error))
@@ -373,19 +374,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
///
///
///
- public string UploadProdSkuImg(ShopLoginInfo shop, string img_base64)
+ public string UploadProdSkuImg(ShopLoginInfo shop, string img_base64, string signTag = "mms-goods-image")
{
string img_signature = "";
- var img_signature_rst = get_uploag_sku_img_signature(shop);
+ var img_signature_rst = get_upload_sku_img_signature(shop, signTag);
if (!img_signature_rst.Contains("\"success\":true"))
{
Thread.Sleep(Randomx.GetId(500, 1000));
- img_signature_rst = get_uploag_sku_img_signature(shop);
+ img_signature_rst = get_upload_sku_img_signature(shop, signTag);
}
if (!img_signature_rst.Contains("\"success\":true"))
{
Thread.Sleep(Randomx.GetId(500, 1000));
- img_signature_rst = get_uploag_sku_img_signature(shop);
+ img_signature_rst = get_upload_sku_img_signature(shop, signTag);
}
if (!img_signature_rst.Contains("\"success\":true"))
{
@@ -432,17 +433,39 @@ Content-Disposition: form-data; name=""pic_operations""
";
Thread.Sleep(Randomx.GetId(5, 20));
var uploadImgRst = uploag_sku_img(shop, body, boundary);
+ if (!uploadImgRst.Contains("\"url\":\"https:"))
+ {
+ //var error = BaseRegex.GetStringJson(ref uploadImgRst, "error_msg");
+ //if (string.IsNullOrEmpty(error))
+ // error = uploadImgRst;
+ //return error;
+ return uploadImgRst;
+ }
+ if (signTag == "mms-goods-image")
+ {
+ var imgTmpUrl = BaseRegex.GetStringJson(ref uploadImgRst, "url");
+ Thread.Sleep(Randomx.GetId(5, 20));
+ var creatRst = create_goods_img(shop, imgTmpUrl, "图片1.jpg");
+ if (!creatRst.Contains("\"success\":true"))
+ {
+ return creatRst;
+ }
+
+ var imgId = BaseRegex.GetStringJson(ref creatRst, "result");
+ Thread.Sleep(Randomx.GetId(5, 20));
+ uploadImgRst = query_goods_img(shop, imgTmpUrl, imgId);
+ }
return uploadImgRst;
}
- private string get_uploag_sku_img_signature(ShopLoginInfo shop)
+ private string get_upload_sku_img_signature(ShopLoginInfo shop, string signTag = "mms-goods-image")
{
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/galerie/business/get_signature";
- string body = @"{""bucket_tag"":""mms-material-img""}";
- //{"bucket_tag":"mms-goods-image"}
+ //string body = @"{""bucket_tag"":""mms-material-img""}";
+ string body = @"{""bucket_tag"":""" + signTag + @"""}";
string refere = "https://mms.pinduoduo.com/material/upload";
var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti);
@@ -487,14 +510,14 @@ Content-Disposition: form-data; name=""pic_operations""
return result;
}
- private string create_goods_img(ShopLoginInfo shop, string tmpUrl)
+ private string create_goods_img(ShopLoginInfo shop, string tmpUrl, string imgName = "图片1.jpg")
{
//tmpUrl = "https://pfs.pinduoduo.com/L90k1BB5397AoHjAgRgc55akrOYHOdmytPdc0f0H8H4Eaed975Uv8nEKi2lysNMyywzvv8oQLuX9RYcN9Zj6rEbprt2VQ0IsY8oE41sUq0zWRvL9HtN9zT5vm4ZZMa-mVVb--mIxF44lpjEySokqlPC8s4ETCzFff5cVnToZjpIBx4mUnuBhBxUPqid4M3wsWWYCz4CmU-BVwGXUH3B5PU3me0_dfentrA.jpeg";
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/garner/mms/file/create";
- string body = @"{""url"":""" + tmpUrl + @""",""name"":""图片1.jpg"",""extension"":""jpeg"",""create_time"":"
+ string body = @"{""url"":""" + tmpUrl + @""",""name"":""" + imgName + @""",""extension"":""jpeg"",""create_time"":"
+ BaseClass.DateTimeToTimestampMilliseconds( DateTime.Now) + "}";
string refere = "https://mms.pinduoduo.com/material/upload";
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs
index 0dc779b..f0fd24e 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs
@@ -30,6 +30,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
public partial class PDDDBProdUserSelectForm : BaseForm
{
+ ///
+ /// 拖鞋
+ ///
+ public static string[] slippersCatName { get; set; } = new string[] { "洞洞鞋", "其他凉鞋", "包头拖", "人字拖", "一字拖", "居家鞋", "棉拖鞋", "网面鞋", "居家凉拖",
+ "沙滩凉鞋", "休闲凉鞋", "凉鞋", "运动拖鞋", "时装凉鞋", "男凉拖", "擦地拖鞋", "亚麻拖鞋", "休闲皮鞋", "T恤", "高帮棉鞋", "罗马凉鞋" };
+ ///
+ /// 运动鞋/休闲鞋
+ ///
+ public static string[] sneakersCatName { get; set; } = new string[] { "运动休闲鞋", "布鞋", "帆布鞋", "单鞋", "板鞋/休闲鞋", "广场舞鞋", "板鞋", "乐福鞋", "健步鞋",
+ "跑步鞋", "棉鞋", "高帮休闲鞋", "网面鞋", "勃肯鞋/软木鞋", "包头拖", "足部磨砂", "老爹鞋", "工装鞋", "豆豆鞋", "汉服鞋" };
+
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
public bool IsLoadComplate { get; set; } = false;
@@ -1921,17 +1932,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//"https://img.pddpic.com/mms-goods-image/2025-09-23/7ea07200-05da-45b9-9e9a-fba4d46cfec9.jpeg.a.jpeg",
};
- //cat_name
- string[] catName = new string[] { "洞洞鞋", "其他凉鞋", "包头拖", "人字拖", "一字拖", "居家鞋", "棉拖鞋", "网面鞋", "居家凉拖",
- "沙滩凉鞋", "休闲凉鞋", "凉鞋", "运动拖鞋", "时装凉鞋", "男凉拖", "擦地拖鞋", "亚麻拖鞋", "休闲皮鞋", "T恤", "高帮棉鞋", "罗马凉鞋" };
- string[] catName2 = new string[] { "运动休闲鞋", "布鞋", "帆布鞋", "单鞋", "板鞋/休闲鞋", "广场舞鞋", "板鞋", "乐福鞋", "健步鞋",
- "跑步鞋", "棉鞋", "高帮休闲鞋", "网面鞋", "勃肯鞋/软木鞋", "包头拖", "足部磨砂", "老爹鞋", "工装鞋", "豆豆鞋", "汉服鞋" };
string img_type = "鞋(不含拖鞋)";
- if (catName.Contains(dbProd.cat_name) || dbProd.cat_name.Contains("凉鞋") || dbProd.cat_name.Contains("拖鞋"))
+ if (slippersCatName.Contains(dbProd.cat_name) || dbProd.cat_name.Contains("凉鞋") || dbProd.cat_name.Contains("拖鞋"))
{
img_type = "拖鞋";
}
- else if (catName2.Contains(dbProd.cat_name) || catName2.Contains("鞋"))
+ else if (sneakersCatName.Contains(dbProd.cat_name) || sneakersCatName.Contains("鞋"))
{
img_type = "鞋(不含拖鞋)";
}
@@ -2905,16 +2911,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
public string UploadProdSkuImg(ShopLoginInfo shop, string img_base64, string goods_id, string goods_commit_id, string chanceTab)
{
string img_signature = "";
- var img_signature_rst = get_uploag_sku_img_signature(shop, goods_id, goods_commit_id, chanceTab);
+ var img_signature_rst = get_upload_sku_img_signature(shop, goods_id, goods_commit_id, chanceTab);
if (!img_signature_rst.Contains("\"success\":true"))
{
Thread.Sleep(Randomx.GetId(500, 1000));
- img_signature_rst = get_uploag_sku_img_signature(shop, goods_id.ParseToString(), goods_commit_id, chanceTab);
+ img_signature_rst = get_upload_sku_img_signature(shop, goods_id.ParseToString(), goods_commit_id, chanceTab);
}
if (!img_signature_rst.Contains("\"success\":true"))
{
Thread.Sleep(Randomx.GetId(500, 1000));
- img_signature_rst = get_uploag_sku_img_signature(shop, goods_id.ParseToString(), goods_commit_id, chanceTab);
+ img_signature_rst = get_upload_sku_img_signature(shop, goods_id.ParseToString(), goods_commit_id, chanceTab);
}
if (!img_signature_rst.Contains("\"success\":true"))
{
@@ -3410,7 +3416,7 @@ Content-Disposition: form-data; name=""pic_operations""
return result;
}
- private string get_uploag_sku_img_signature(ShopLoginInfo shop, string goodsId, string commitId, string chanceTab)
+ private string get_upload_sku_img_signature(ShopLoginInfo shop, string goodsId, string commitId, string chanceTab)
{
var anti = shop.AntiContents.LastOrDefault().ParseToString();
if (shop.AntiContents.Count > 0)