1.Jit客户端功能 2.pdd活动报名新增及优化
This commit is contained in:
1 parent
e77914bafc
commit
480d8c2cd4
41 files changed
+5136
-2863
No files matched your search
@@ -903,6 +903,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
tryAgain:
|
||||
Thread.Sleep(100 + Randomx.GetId(200));
|
||||
string jsonStr = getAdsGoodsList(shop, page, pageSize);
|
||||
Thread.Sleep(Randomx.GetId(300, 800));
|
||||
if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
||||
{
|
||||
tryCount++;
|
||||
@@ -962,21 +963,24 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
ads_goods_info adsGoodsInfo = JsonHelper.DeserializeJsonToObject<ads_goods_info>(sItem); // 反序列化得到类
|
||||
if (adsGoodsInfo != null && !lstAdsMallGoodsInfo.Any(a => a.goods_id == adsGoodsInfo.goods_id))
|
||||
{
|
||||
if (adsGoodsInfo.gray_reason != null)
|
||||
continue;
|
||||
//if (adsGoodsInfo.gray_reason != null)
|
||||
// continue;
|
||||
|
||||
adsGoodsInfo.shopId = shop.ShopId;
|
||||
lstAdsMallGoodsInfo.Add(adsGoodsInfo);
|
||||
spuIdLst.Add(adsGoodsInfo.spu_id);
|
||||
|
||||
var create_ad_req_param = new create_ad_req_param()
|
||||
if (adsGoodsInfo.gray_reason == null)
|
||||
{
|
||||
budget = chkLimitValue.Checked ? (txtBudget.Text.ParseToDecimal() * 100).ParseToInt() : -1,
|
||||
goods_id = adsGoodsInfo.goods_id.ParseToString(),
|
||||
site_id = adsGoodsInfo.site_list.FirstOrDefault().ParseToInt(),
|
||||
roas = (txtSameRoas.Text.ParseToDecimal() * 10000).ParseToInt(),
|
||||
};
|
||||
createAds.create_ad_reqs.Add(create_ad_req_param);
|
||||
var create_ad_req_param = new create_ad_req_param()
|
||||
{
|
||||
budget = chkLimitValue.Checked ? (txtBudget.Text.ParseToDecimal() * 100).ParseToInt() : -1,
|
||||
goods_id = adsGoodsInfo.goods_id.ParseToString(),
|
||||
site_id = adsGoodsInfo.site_list.FirstOrDefault().ParseToInt(),
|
||||
roas = (txtSameRoas.Text.ParseToDecimal() * 10000).ParseToInt(),
|
||||
};
|
||||
createAds.create_ad_reqs.Add(create_ad_req_param);
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -1012,7 +1016,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
"点击率(CTR)",
|
||||
"转化率(CVR)",
|
||||
"加入购物车数",
|
||||
"" // 操作结果,状态
|
||||
adsGoodsInfo.gray_reason == null ? "" : string.Join(",", adsGoodsInfo.gray_reason.Select(g => g.reason)) // 操作结果,状态
|
||||
);
|
||||
|
||||
dgvAds.Rows[rowId].Height = 50;
|
||||
@@ -1130,7 +1134,13 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
|
||||
int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt();
|
||||
totalPage = Math.Ceiling(1.0 * total / pageSize).ParseToInt();
|
||||
if (totalPage == 1)
|
||||
totalPage = Math.Ceiling(1.0 * total / pageSize).ParseToInt();
|
||||
bool hasMore = BaseRegex.GetBoolJson(ref jsonStr, "has_more");
|
||||
if (hasMore && totalPage == page)
|
||||
{
|
||||
totalPage++;
|
||||
}
|
||||
}
|
||||
page++;
|
||||
}
|
||||
@@ -2344,6 +2354,12 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
{
|
||||
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
|
||||
}
|
||||
|
||||
private void panelEx1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (cancellationTokenSource != null)
|
||||
cancellationTokenSource.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
public class CreateAdsParam
|
||||
|
||||
Reference in new issue
Block a user