提审后获取是否加入提审成功功能

This commit is contained in:
wule_5900x committed 2026-07-30 23:28:50 +08:00
1 parent b5bc7f2b81
commit ad509cfc66
3 files changed
+95 -46

No files matched your search

@@ -1276,7 +1276,7 @@ namespace TemuKJD.WXForms.ProductForms
result.Contains("提审次数已达上限") || result.Contains("拥金上货失败:需要开通优选联盟") || result.Contains("本店铺近期提审失败比例较高,已被限"))
{
shop.upLimitRetryCount++;
if (shop.upLimitRetryCount > 3)
if (shop.upLimitRetryCount >= 3)
{
shop.upLimitRetryCount = 0;
@@ -1285,6 +1285,10 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() => { shopRow.Cells["colSelect"].Value = false; }));
}
}
else
{
shop.upLimitRetryCount = Math.Max(0, shop.upLimitRetryCount - 1);
}
// 图片重复的,修改图片缓存为空再传一次
if (result.Contains("10020225") || result.Contains("10020226"))
{
@@ -3358,9 +3362,9 @@ namespace TemuKJD.WXForms.ProductForms
name = wxEditCategoryParam.name,
catInfo = new catInfoParam()
{
inputType = wxEditCategoryParam.catInfo.inputType,
isRequired = wxEditCategoryParam.catInfo.isRequired,
isCustomize = wxEditCategoryParam.catInfo.isCustomize,
inputType = wxEditCategoryParam?.catInfo?.inputType,
isRequired = wxEditCategoryParam?.catInfo?.isRequired,
isCustomize = wxEditCategoryParam?.catInfo?.isCustomize,
}
};
wxPropParam.categorys.Add(wxCategoryParam);
@@ -5327,6 +5331,8 @@ namespace TemuKJD.WXForms.ProductForms
if (!chkTestNoAuditUpload.Checked)
{
var uploadProdRst = WXUpload.upProductV2(shop, upProdParam);
//{"success":true,"retcode":209006,"errcode":209006,"productId":10001226244322,"productKey":{"productId":"10001226244322"}} // 提审成功
//{"success":true,"retcode":0,"errcode":0,"productId":10001226095876,"productKey":{"productId":"10001226095876"}} // 未能提审
if (!uploadProdRst.Contains("\"code\":0") && !uploadProdRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref uploadProdRst, "msg");
@@ -5350,6 +5356,15 @@ namespace TemuKJD.WXForms.ProductForms
commissionRstStr = "设置佣金比例失败 " + rst;
}
}
if (chkIsSubmitSuccess.Checked)
{
Thread.Sleep(Randomx.GetId(2000, 3001));
var uploadCheckRst = WXUpload.SearchProductUpload(shop, upProdParam.product.productKey.productId);
if (uploadCheckRst.Contains("\"productList\":[]") || uploadCheckRst.Contains("\"totalNum\":0"))
{
return "{\"success\":false,\"draftId\":" + upProdParam.product.productKey.productId + ",\"status\":\"草稿箱\",\"errMsg\":\"上架提审失败 请检查是否在架商品数已达到上限或店铺受到其他限制\"}";
}
}
}
else
{
@@ -6987,6 +7002,25 @@ Content-Type: image/jpeg
return result;
}
public static string checkProductUpload(ShopLoginInfo shop, string productId)
{
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/checkUploadProductDraftStatus?token=&lang=zh_CN&productKey=%7B%22productId%22:" +
productId + "%7D&preview=false";
string referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + productId + "&isUpdateAuditFree=0&source=list_edit&continueEditInfo=" +
"{%22isEditingContinued%22:false,%22lastEditDraftTime%22:0,%22listingTime%22:0}";
var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer);
return result;
}
public static string SearchProductUpload(ShopLoginInfo shop, string productId)
{
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/searchProduct?token=&lang=zh_CN&pageSize=20&productStatus[]=-1" +
"&productSource=[1,16,32]&searchSource=1&useNew=true&fromProductManager=1&pageNum=1&status[]=2&spuId=" + productId;
string referer = "https://store.weixin.qq.com/shop/goods/list?currentTab=PRODUCT_STATUS_EDIT";
var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer);
return result;
}
public static string upProductJObjectV2(ShopLoginInfo shop, string prodStr)
{