修复直通车接口
This commit is contained in:
1 parent
5cc74f36f6
commit
4d5ea741d7
2 files changed
+40
-13
No files matched your search
+1
-1
@@ -883,7 +883,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
|||||||
//
|
//
|
||||||
// colShopName
|
// colShopName
|
||||||
//
|
//
|
||||||
this.colShopName.HeaderText = "店铺名";
|
this.colShopName.HeaderText = "店铺名称";
|
||||||
this.colShopName.Name = "colShopName";
|
this.colShopName.Name = "colShopName";
|
||||||
this.colShopName.ReadOnly = true;
|
this.colShopName.ReadOnly = true;
|
||||||
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
|
|||||||
@@ -272,10 +272,10 @@ namespace TemuKJD.KJDForms.ProductForms
|
|||||||
string body;
|
string body;
|
||||||
body = "{\"ad_status\":[],\"ad_advice_types\":[],\"page_size\":" + pageSize + ",\"page_number\":" + page +
|
body = "{\"ad_status\":[],\"ad_advice_types\":[],\"page_size\":" + pageSize + ",\"page_number\":" + page +
|
||||||
",\"specific_query_info\":\"\",\"sort_by\":0,\"sort_type\":\"desc\",\"start_time\":" +
|
",\"specific_query_info\":\"\",\"sort_by\":0,\"sort_type\":\"desc\",\"start_time\":" +
|
||||||
startTime + "," + "\"end_time\":" +
|
startTime + "," + "\"end_time\":" + endTime +
|
||||||
endTime +
|
",\"need_calculate_goods_summary\":true,\"list_id\":\"dc582b8d-ae93-4f4d-94e4-031590a245fa\",\"ad_phase\":-1}";
|
||||||
",\"need_calculate_goods_summary\":true,\"ad_phase\":-1}";
|
|
||||||
|
|
||||||
|
//refere = "https://ads.temu.com/ad-list.html?_x_sessn_id=vmkt5y1lqe&refer_page_name=home&refer_page_id=22941_1764131076104_dfy9mxx891&refer_page_sn=22941";
|
||||||
string refere = shop.ad_url.Replace("https://ads.temu.com/index.html", "https://ads.temu.com/ad-list.html");
|
string refere = shop.ad_url.Replace("https://ads.temu.com/index.html", "https://ads.temu.com/ad-list.html");
|
||||||
|
|
||||||
return HttpResponseBLL.PostResponseAds(shop, url, body, refere);
|
return HttpResponseBLL.PostResponseAds(shop, url, body, refere);
|
||||||
@@ -309,7 +309,14 @@ namespace TemuKJD.KJDForms.ProductForms
|
|||||||
{
|
{
|
||||||
string url = "https://ads.temu.com/api/v1/coconut/ad/modify_ads";
|
string url = "https://ads.temu.com/api/v1/coconut/ad/modify_ads";
|
||||||
string body;
|
string body;
|
||||||
body = "{\"ad_ids\":[\"" + string.Join("\",\"", idList) + "\"],\"status\":2}";
|
//body = "{\"ad_ids\":[\"" + string.Join("\",\"", idList) + "\"],\"status\":2}";
|
||||||
|
body = "{\"modify_ad_dtos\":[";
|
||||||
|
foreach(var goods_id in idList)
|
||||||
|
{
|
||||||
|
body += "{\"goods_id\":\"" + goods_id + "\",\"status\":2},";
|
||||||
|
}
|
||||||
|
body = body.TrimEnd(',');
|
||||||
|
body += "]}";
|
||||||
|
|
||||||
string refere = shop.ad_url.Replace("https://ads.temu.com/index.html", "https://ads.temu.com/ad-list.html");
|
string refere = shop.ad_url.Replace("https://ads.temu.com/index.html", "https://ads.temu.com/ad-list.html");
|
||||||
|
|
||||||
@@ -319,7 +326,14 @@ namespace TemuKJD.KJDForms.ProductForms
|
|||||||
{
|
{
|
||||||
string url = "https://ads.temu.com/api/v1/coconut/ad/modify_ads";
|
string url = "https://ads.temu.com/api/v1/coconut/ad/modify_ads";
|
||||||
string body;
|
string body;
|
||||||
body = "{\"ad_ids\":[\"" + string.Join("\",\"", idList) + "\"],\"status\":0}";
|
//body = "{\"ad_ids\":[\"" + string.Join("\",\"", idList) + "\"],\"status\":0}";
|
||||||
|
body = "{\"modify_ad_dtos\":[";
|
||||||
|
foreach (var goods_id in idList)
|
||||||
|
{
|
||||||
|
body += "{\"goods_id\":\"" + goods_id + "\",\"status\":0},";
|
||||||
|
}
|
||||||
|
body = body.TrimEnd(',');
|
||||||
|
body += "]}";
|
||||||
|
|
||||||
string refere = shop.ad_url.Replace("https://ads.temu.com/index.html", "https://ads.temu.com/ad-list.html");
|
string refere = shop.ad_url.Replace("https://ads.temu.com/index.html", "https://ads.temu.com/ad-list.html");
|
||||||
|
|
||||||
@@ -329,7 +343,14 @@ namespace TemuKJD.KJDForms.ProductForms
|
|||||||
{
|
{
|
||||||
string url = "https://ads.temu.com/api/v1/coconut/ad/modify_ads";
|
string url = "https://ads.temu.com/api/v1/coconut/ad/modify_ads";
|
||||||
string body;
|
string body;
|
||||||
body = "{\"ad_ids\":[\"" + string.Join("\",\"", idList) + "\"],\"status\":3}";
|
//body = "{\"ad_ids\":[\"" + string.Join("\",\"", idList) + "\"],\"status\":3}";
|
||||||
|
body = "{\"modify_ad_dtos\":[";
|
||||||
|
foreach (var goods_id in idList)
|
||||||
|
{
|
||||||
|
body += "{\"goods_id\":\"" + goods_id + "\",\"status\":3},";
|
||||||
|
}
|
||||||
|
body = body.TrimEnd(',');
|
||||||
|
body += "]}";
|
||||||
|
|
||||||
string refere = shop.ad_url.Replace("https://ads.temu.com/index.html", "https://ads.temu.com/ad-list.html");
|
string refere = shop.ad_url.Replace("https://ads.temu.com/index.html", "https://ads.temu.com/ad-list.html");
|
||||||
|
|
||||||
@@ -1682,8 +1703,10 @@ namespace TemuKJD.KJDForms.ProductForms
|
|||||||
tryAgain:
|
tryAgain:
|
||||||
Thread.Sleep(100 + Randomx.GetId(200));
|
Thread.Sleep(100 + Randomx.GetId(200));
|
||||||
|
|
||||||
var adIdLst = tmpAdsDetailLst.Select(a => a.ad_id).ToList();
|
//var adIdLst = tmpAdsDetailLst.Select(a => a.ad_id).ToList();
|
||||||
string mdyRst = DelAds(shop, adIdLst);
|
//string mdyRst = DelAds(shop, adIdLst);
|
||||||
|
var goodsIdLst = tmpAdsDetailLst.Select(a => a.goods_id).ToList();
|
||||||
|
string mdyRst = DelAds(shop, goodsIdLst);
|
||||||
if (mdyRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
if (mdyRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
||||||
{
|
{
|
||||||
tryCount++;
|
tryCount++;
|
||||||
@@ -1900,8 +1923,10 @@ namespace TemuKJD.KJDForms.ProductForms
|
|||||||
tryAgain:
|
tryAgain:
|
||||||
Thread.Sleep(100 + Randomx.GetId(200));
|
Thread.Sleep(100 + Randomx.GetId(200));
|
||||||
|
|
||||||
var adIdLst = tmpAdsDetailLst.Select(a => a.ad_id).ToList();
|
//var adIdLst = tmpAdsDetailLst.Select(a => a.ad_id).ToList();
|
||||||
string mdyRst = PauseAds(shop, adIdLst);
|
//string mdyRst = PauseAds(shop, adIdLst);
|
||||||
|
var goodIdLst = tmpAdsDetailLst.Select(a => a.goods_id).ToList();
|
||||||
|
string mdyRst = PauseAds(shop, goodIdLst);
|
||||||
if (mdyRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
if (mdyRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
||||||
{
|
{
|
||||||
tryCount++;
|
tryCount++;
|
||||||
@@ -2119,8 +2144,10 @@ namespace TemuKJD.KJDForms.ProductForms
|
|||||||
tryAgain:
|
tryAgain:
|
||||||
Thread.Sleep(100 + Randomx.GetId(200));
|
Thread.Sleep(100 + Randomx.GetId(200));
|
||||||
|
|
||||||
var adIdLst = tmpAdsDetailLst.Select(a => a.ad_id).ToList();
|
//var adIdLst = tmpAdsDetailLst.Select(a => a.ad_id).ToList();
|
||||||
string mdyRst = continueAds(shop, adIdLst);
|
//string mdyRst = continueAds(shop, adIdLst);
|
||||||
|
var goodsIdLst = tmpAdsDetailLst.Select(a => a.goods_id).ToList();
|
||||||
|
string mdyRst = continueAds(shop, goodsIdLst);
|
||||||
if (mdyRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
if (mdyRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
||||||
{
|
{
|
||||||
tryCount++;
|
tryCount++;
|
||||||
|
|||||||
Reference in new issue
Block a user