1商品上传测试 标题逻辑修改 2商品退货包裹详情获取
This commit is contained in:
1 parent
d7550ae559
commit
16aae6cc86
18 files changed
+1977
-579
No files matched your search
@@ -678,11 +678,18 @@ namespace TemuKJD.KJDForms.SalesCenterForms
|
||||
/// </summary>
|
||||
public List<string> GetNoSaleProd(string shopId)
|
||||
{
|
||||
int onSaleDays = 0;
|
||||
int saleCount = 0;
|
||||
string days = "7";
|
||||
//int i = 0;
|
||||
//foreach (var shopId in lstShopIdSelect)
|
||||
//{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
days = cmbDays.Text;
|
||||
onSaleDays = numOnSaleDays.Value.ParseToInt();
|
||||
saleCount = numSaleCount.Value.ParseToInt();
|
||||
|
||||
this.statusBar.lblTaskStatus.Text = "正在查询无销量商品...";
|
||||
this.statusBar.pgbTaskProgress.Maximum = lstShopIdSelect.Count;
|
||||
//this.statusBar.UpdateProgressBar(i + 1);
|
||||
@@ -714,7 +721,8 @@ namespace TemuKJD.KJDForms.SalesCenterForms
|
||||
while (page < totalPage)
|
||||
{
|
||||
page++;
|
||||
string jsonRst = GetNoSaleProd(shop, numNoSaleDays.Value.ParseToInt(), page);
|
||||
|
||||
string jsonRst = GetNoSaleProd(shop, days, onSaleDays, saleCount, page);
|
||||
|
||||
if (!jsonRst.Contains("\"success\":true"))
|
||||
{
|
||||
@@ -825,9 +833,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms
|
||||
}));
|
||||
continue;
|
||||
}
|
||||
if (jsonRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
||||
if ((jsonRst.Contains("当前操作人数太多,请稍后重试") || jsonRst.Contains("too quickly")) && tryCount < 5)
|
||||
{
|
||||
tryCount++;
|
||||
Thread.Sleep(500 + Randomx.GetId(500));
|
||||
goto tryAgain;
|
||||
}
|
||||
|
||||
@@ -1058,12 +1067,16 @@ namespace TemuKJD.KJDForms.SalesCenterForms
|
||||
/// <param name="onSalesDays">加入站点天数</param>
|
||||
/// <param name="page"></param>
|
||||
/// <returns></returns>
|
||||
private string GetNoSaleProd(ShopLoginInfo shop, int onSalesDays, int page=1)
|
||||
private string GetNoSaleProd(ShopLoginInfo shop, string days, int onSalesDays, int saleCount = 0, int page=1)
|
||||
{
|
||||
string url = "https://agentseller.temu.com/mms/venom/api/supplier/sales/management/listWarehouse";
|
||||
string body;
|
||||
body = @"{""pageNo"":" + page + @",""pageSize"":40,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7,
|
||||
""thirtyDaysSaleVolumMax"":0,""onSalesDurationOfflineGte"":" + onSalesDays + "}";
|
||||
if (days == "7")
|
||||
body = @"{""pageNo"":" + page + @",""pageSize"":40,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7,
|
||||
""sevenDaysSaleVolumMin"":0, ""sevenDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + "}";
|
||||
else
|
||||
body = @"{""pageNo"":" + page + @",""pageSize"":40,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7,
|
||||
""thirtyDaysSaleVolumMin"":0, ""thirtyDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + "}";
|
||||
string refere = "https://agentseller.temu.com/stock/fully-mgt/sale-manage/main";
|
||||
return KJDHttpResponse.PostResponse2(shop, url, body, refere);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user