选品上传翻译商品标题 库存上传逻辑优化提高直接上传成功率 拼多多优化限时限量优惠结束逻辑
This commit is contained in:
1 parent
73f9fcd8bc
commit
ab33a9c0c0
19 files changed
+856
-320
No files matched your search
@@ -678,7 +678,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
loginForm.TopLevel = false;
|
||||
loginForm.openType = EnumOpenType.manage;
|
||||
loginForm.WindowState = FormWindowState.Maximized;
|
||||
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
|
||||
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
|
||||
loginForm.Dock = DockStyle.Fill;
|
||||
this.panel1.Controls.Add(loginForm);
|
||||
loginForm.Show();
|
||||
|
||||
Generated
+91
-34
@@ -36,8 +36,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.numMinSaleCount = new System.Windows.Forms.NumericUpDown();
|
||||
this.btnStopActvity = new DevComponents.DotNetBar.PanelEx();
|
||||
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.pnlTime = new System.Windows.Forms.Panel();
|
||||
this.dtpCoupon1StartTime = new System.Windows.Forms.DateTimePicker();
|
||||
this.lblStartTime = new System.Windows.Forms.Label();
|
||||
@@ -102,6 +105,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.ucGroupBoxEx3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numMinSaleCount)).BeginInit();
|
||||
this.ucGroupBoxEx2.SuspendLayout();
|
||||
this.pnlTime.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numCoupon1KeepDays)).BeginInit();
|
||||
@@ -137,6 +142,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx3);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
|
||||
//
|
||||
@@ -147,6 +153,76 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
this.splitContainer1.SplitterDistance = 140;
|
||||
this.splitContainer1.TabIndex = 15;
|
||||
//
|
||||
// ucGroupBoxEx3
|
||||
//
|
||||
this.ucGroupBoxEx3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
|
||||
this.ucGroupBoxEx3.Controls.Add(this.label3);
|
||||
this.ucGroupBoxEx3.Controls.Add(this.numMinSaleCount);
|
||||
this.ucGroupBoxEx3.Controls.Add(this.btnStopActvity);
|
||||
this.ucGroupBoxEx3.Location = new System.Drawing.Point(901, 2);
|
||||
this.ucGroupBoxEx3.Name = "ucGroupBoxEx3";
|
||||
this.ucGroupBoxEx3.Size = new System.Drawing.Size(280, 140);
|
||||
this.ucGroupBoxEx3.TabIndex = 668;
|
||||
this.ucGroupBoxEx3.TabStop = false;
|
||||
this.ucGroupBoxEx3.Text = "结束活动";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(35, 25);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(41, 17);
|
||||
this.label3.TabIndex = 755;
|
||||
this.label3.Text = "销量≥";
|
||||
//
|
||||
// numMinSaleCount
|
||||
//
|
||||
this.numMinSaleCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numMinSaleCount.Location = new System.Drawing.Point(76, 22);
|
||||
this.numMinSaleCount.Maximum = new decimal(new int[] {
|
||||
1000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numMinSaleCount.Name = "numMinSaleCount";
|
||||
this.numMinSaleCount.Size = new System.Drawing.Size(41, 23);
|
||||
this.numMinSaleCount.TabIndex = 753;
|
||||
this.numMinSaleCount.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// btnStopActvity
|
||||
//
|
||||
this.btnStopActvity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnStopActvity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnStopActvity.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnStopActvity.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnStopActvity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnStopActvity.Location = new System.Drawing.Point(154, 22);
|
||||
this.btnStopActvity.Name = "btnStopActvity";
|
||||
this.btnStopActvity.Size = new System.Drawing.Size(104, 23);
|
||||
this.btnStopActvity.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStopActvity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStopActvity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStopActvity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnStopActvity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnStopActvity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnStopActvity.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnStopActvity.Style.GradientAngle = 90;
|
||||
this.btnStopActvity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStopActvity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnStopActvity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnStopActvity.TabIndex = 746;
|
||||
this.btnStopActvity.Text = "一键结束活动";
|
||||
this.btnStopActvity.Click += new System.EventHandler(this.btnStopActvity_Click);
|
||||
//
|
||||
// ucGroupBoxEx2
|
||||
//
|
||||
this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
@@ -154,7 +230,6 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
|
||||
this.ucGroupBoxEx2.Controls.Add(this.btnStopActvity);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.pnlTime);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.numQuantity);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.lblQuantity);
|
||||
@@ -173,36 +248,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
this.ucGroupBoxEx2.Controls.Add(this.btnCreate);
|
||||
this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2);
|
||||
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
|
||||
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1034, 140);
|
||||
this.ucGroupBoxEx2.Size = new System.Drawing.Size(754, 140);
|
||||
this.ucGroupBoxEx2.TabIndex = 667;
|
||||
this.ucGroupBoxEx2.TabStop = false;
|
||||
this.ucGroupBoxEx2.Text = "商品查询创建";
|
||||
//
|
||||
// btnStopActvity
|
||||
//
|
||||
this.btnStopActvity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnStopActvity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnStopActvity.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnStopActvity.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnStopActvity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnStopActvity.Location = new System.Drawing.Point(898, 87);
|
||||
this.btnStopActvity.Name = "btnStopActvity";
|
||||
this.btnStopActvity.Size = new System.Drawing.Size(104, 23);
|
||||
this.btnStopActvity.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStopActvity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStopActvity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStopActvity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnStopActvity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnStopActvity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnStopActvity.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnStopActvity.Style.GradientAngle = 90;
|
||||
this.btnStopActvity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStopActvity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnStopActvity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnStopActvity.TabIndex = 746;
|
||||
this.btnStopActvity.Text = "一键结束活动";
|
||||
this.btnStopActvity.Click += new System.EventHandler(this.btnStopActvity_Click);
|
||||
//
|
||||
// pnlTime
|
||||
//
|
||||
this.pnlTime.Controls.Add(this.dtpCoupon1StartTime);
|
||||
@@ -310,7 +360,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
// chkTime
|
||||
//
|
||||
this.chkTime.AutoSize = true;
|
||||
this.chkTime.Location = new System.Drawing.Point(160, 19);
|
||||
this.chkTime.Location = new System.Drawing.Point(160, 23);
|
||||
this.chkTime.Name = "chkTime";
|
||||
this.chkTime.Size = new System.Drawing.Size(99, 21);
|
||||
this.chkTime.TabIndex = 731;
|
||||
@@ -407,7 +457,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
this.chkQuantity.AutoSize = true;
|
||||
this.chkQuantity.Checked = true;
|
||||
this.chkQuantity.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkQuantity.Location = new System.Drawing.Point(14, 19);
|
||||
this.chkQuantity.Enabled = false;
|
||||
this.chkQuantity.Location = new System.Drawing.Point(14, 23);
|
||||
this.chkQuantity.Name = "chkQuantity";
|
||||
this.chkQuantity.Size = new System.Drawing.Size(99, 21);
|
||||
this.chkQuantity.TabIndex = 659;
|
||||
@@ -427,17 +478,17 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
//
|
||||
// txtCoupon1Name
|
||||
//
|
||||
this.txtCoupon1Name.Location = new System.Drawing.Point(452, 18);
|
||||
this.txtCoupon1Name.Location = new System.Drawing.Point(452, 22);
|
||||
this.txtCoupon1Name.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtCoupon1Name.Name = "txtCoupon1Name";
|
||||
this.txtCoupon1Name.Size = new System.Drawing.Size(74, 23);
|
||||
this.txtCoupon1Name.Size = new System.Drawing.Size(110, 23);
|
||||
this.txtCoupon1Name.TabIndex = 489;
|
||||
this.txtCoupon1Name.Text = "限量优惠";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(396, 21);
|
||||
this.label2.Location = new System.Drawing.Point(396, 25);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(56, 17);
|
||||
@@ -451,7 +502,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
this.btnCreate.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCreate.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnCreate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCreate.Location = new System.Drawing.Point(898, 32);
|
||||
this.btnCreate.Location = new System.Drawing.Point(627, 22);
|
||||
this.btnCreate.Name = "btnCreate";
|
||||
this.btnCreate.Size = new System.Drawing.Size(104, 23);
|
||||
this.btnCreate.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -967,6 +1018,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ucGroupBoxEx3.ResumeLayout(false);
|
||||
this.ucGroupBoxEx3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numMinSaleCount)).EndInit();
|
||||
this.ucGroupBoxEx2.ResumeLayout(false);
|
||||
this.ucGroupBoxEx2.PerformLayout();
|
||||
this.pnlTime.ResumeLayout(false);
|
||||
@@ -1061,5 +1115,8 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSalesThirtyDays;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colIsCanSet;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
|
||||
private UserComponent.UcGroupBoxEx ucGroupBoxEx3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.NumericUpDown numMinSaleCount;
|
||||
}
|
||||
}
|
||||
+45
-9
@@ -312,6 +312,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
this.dgvProduct.Columns["colActivityPrice"].Visible = false;
|
||||
|
||||
ucGroupBoxEx2.Enabled = false;
|
||||
ucGroupBoxEx3.Enabled = false;
|
||||
cancellationTokenSource = new CancellationTokenSource();
|
||||
Task.Run(() =>
|
||||
{
|
||||
@@ -675,6 +676,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ucGroupBoxEx2.Enabled = true;
|
||||
ucGroupBoxEx3.Enabled = true;
|
||||
string sRst = "设置结束!";
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
sRst = "已取消设置!";
|
||||
@@ -684,6 +686,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
}));
|
||||
}, cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
public void GetToken(ShopLoginInfo shop)
|
||||
{
|
||||
if (!dicShopGetCount.Keys.Contains(shop))
|
||||
@@ -728,7 +731,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
loginForm.TopLevel = false;
|
||||
loginForm.openType = EnumOpenType.manage;
|
||||
loginForm.WindowState = FormWindowState.Maximized;
|
||||
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
|
||||
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
|
||||
loginForm.Dock = DockStyle.Fill;
|
||||
this.panel1.Controls.Add(loginForm);
|
||||
loginForm.Show();
|
||||
@@ -835,6 +838,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
this.dgvProduct.Columns["colActivityPrice"].Visible = true;
|
||||
|
||||
ucGroupBoxEx2.Enabled = false;
|
||||
ucGroupBoxEx3.Enabled = false;
|
||||
cancellationTokenSource = new CancellationTokenSource();
|
||||
Task.Run(() =>
|
||||
{
|
||||
@@ -894,14 +898,11 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
int totalPage = 1;
|
||||
bool isError = false;
|
||||
string errMsg = "";
|
||||
while (page < totalPage)
|
||||
while (page <= totalPage)
|
||||
{
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
break;
|
||||
|
||||
if (page == 0)
|
||||
page++;
|
||||
|
||||
int tryCount = 0;
|
||||
tryAgain:
|
||||
|
||||
@@ -910,6 +911,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
if (page >= 1)
|
||||
Thread.Sleep(Randomx.GetId(3000, 7000));
|
||||
|
||||
if (page == 0)
|
||||
page++;
|
||||
|
||||
//long startStamp = BaseClass.DateTimeToTimestampSeconds(dtpCoupon1StartTime.Value);
|
||||
//long endStamp = BaseClass.DateTimeToTimestampSeconds(dtpCoupon1StartTime.Value.Date.AddDays(numCoupon1KeepDays.Value.ParseToInt())) - 1;
|
||||
string jsonStr = get_xianshixianliang_activity_prod_list(shop, page, pageSize);
|
||||
@@ -935,6 +939,9 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
|
||||
if (jsonStr.Contains("\"success\":true"))
|
||||
{
|
||||
int total = BaseRegex.GetStringJson(ref jsonStr, "online_sum").ParseToInt();
|
||||
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
|
||||
|
||||
MarketingActivityResult marketingActivityRst = new MarketingActivityResult();
|
||||
try
|
||||
{
|
||||
@@ -947,6 +954,14 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
}
|
||||
|
||||
marketingActivityRst.marketing_activity_list = marketingActivityRst.marketing_activity_list
|
||||
.Where(r => !activityGoodsInfoLst.Any(a => a.activity_id == r.activity_id)).ToList();
|
||||
if (marketingActivityRst.marketing_activity_list.Count == 0)
|
||||
{
|
||||
page++;
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (var pInfo in marketingActivityRst.marketing_activity_list)
|
||||
{
|
||||
if (pInfo.online_quantity < pInfo.online_activity_quantity)
|
||||
@@ -954,7 +969,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
}
|
||||
pInfo.shopId = shop.ShopId;
|
||||
pInfo.shopName = shop.ShopAccount;
|
||||
if (pInfo != null && !activityGoodsInfoLst.Any(a => a.goods_id == pInfo.goods_id))
|
||||
if (pInfo != null && !activityGoodsInfoLst.Any(a => a.activity_id == pInfo.activity_id))
|
||||
{
|
||||
activityGoodsInfoLst.Add(pInfo);
|
||||
string url = pInfo.hd_thumb_url;
|
||||
@@ -983,6 +998,10 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
//筛选销量达标的,如果没有则下一页
|
||||
marketingActivityRst.marketing_activity_list = marketingActivityRst.marketing_activity_list
|
||||
.Where(r => r.sold_activity_quantity >= numMinSaleCount.Value).ToList();
|
||||
if (marketingActivityRst.marketing_activity_list.Count == 0)
|
||||
{
|
||||
page++;
|
||||
@@ -991,6 +1010,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
|
||||
foreach (var activityGoods in marketingActivityRst.marketing_activity_list)
|
||||
{
|
||||
|
||||
Thread.Sleep(Randomx.GetId(500, 1500));
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
break;
|
||||
@@ -1020,9 +1040,6 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int total = BaseRegex.GetStringJson(ref jsonStr, "online_sum").ParseToInt();
|
||||
totalPage = Math.Ceiling(1m * total / pageSize).ParseToInt();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1049,6 +1066,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ucGroupBoxEx2.Enabled = true;
|
||||
ucGroupBoxEx3.Enabled = true;
|
||||
string sRst = "结束活动已完成!";
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
sRst = "已取消结束活动!";
|
||||
@@ -1094,8 +1112,17 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
public string hd_thumb_url { get; set; }
|
||||
public int? min_on_sale_group_price { get; set; }
|
||||
public int? max_on_sale_group_price { get; set; }
|
||||
/// <summary>
|
||||
/// 商品总库存
|
||||
/// </summary>
|
||||
public int? online_quantity { get; set; }// 1584,
|
||||
/// <summary>
|
||||
/// 剩余库存
|
||||
/// </summary>
|
||||
public int? online_activity_quantity { get; set; }// 100,
|
||||
/// <summary>
|
||||
/// 已售出库存
|
||||
/// </summary>
|
||||
public int? sold_activity_quantity { get; set; }// 0,
|
||||
public List<price_info> price_info { get; set; }
|
||||
|
||||
@@ -1107,5 +1134,14 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
{
|
||||
public int? max_pre_sale_price { get; set; }// 8613,
|
||||
public int? min_pre_sale_price { get; set; }// 8343,
|
||||
/// <summary>
|
||||
/// 活动开始时的库存
|
||||
/// </summary>
|
||||
public int? activity_quantity { get; set; }// 100,
|
||||
/// <summary>
|
||||
/// 活动剩余库存
|
||||
/// </summary>
|
||||
public int? activity_stock_quantity{ get; set; }// 94,
|
||||
|
||||
}
|
||||
}
|
||||
@@ -592,7 +592,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
loginForm.TopLevel = false;
|
||||
loginForm.openType = EnumOpenType.manage;
|
||||
loginForm.WindowState = FormWindowState.Maximized;
|
||||
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
|
||||
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
|
||||
loginForm.Dock = DockStyle.Fill;
|
||||
this.panel1.Controls.Add(loginForm);
|
||||
loginForm.Show();
|
||||
|
||||
@@ -577,7 +577,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
// loginForm.TopLevel = false;
|
||||
// loginForm.openType = EnumOpenType.manage;
|
||||
// loginForm.WindowState = FormWindowState.Maximized;
|
||||
// loginForm.InitUrl = "https://mms.pinduoduo.com/tool/surprise-coupon/create/";
|
||||
// loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
|
||||
// loginForm.Dock = DockStyle.Fill;
|
||||
// this.panel1.Controls.Add(loginForm);
|
||||
// loginForm.Show();
|
||||
|
||||
@@ -593,7 +593,7 @@ namespace TemuKJD.PDDForms.ProductForms.CouponForms
|
||||
loginForm.TopLevel = false;
|
||||
loginForm.openType = EnumOpenType.manage;
|
||||
loginForm.WindowState = FormWindowState.Maximized;
|
||||
loginForm.InitUrl = "https://mms.pinduoduo.com/home/";
|
||||
loginForm.InitUrl = "https://mms.pinduoduo.com/tool?msfrom=mms_sidenav";
|
||||
loginForm.Dock = DockStyle.Fill;
|
||||
this.panel1.Controls.Add(loginForm);
|
||||
loginForm.Show();
|
||||
|
||||
Reference in new issue
Block a user