微信商品回采功能
This commit is contained in:
1 parent
3db584fe1e
commit
d9900452f2
35 files changed
+4850
-696
No files matched your search
@@ -1129,11 +1129,39 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
List<JSTDownProdSkuInfo> downSkuExistLst = JsonHelper.DeserializeJsonToList<JSTDownProdSkuInfo>(JsonHelper.JObjectParse(result)["data"].ParseToString());
|
||||
|
||||
// 查询作废库有没有
|
||||
url = BaseClass.BuildPDDObjString("product/get_product_spu_id_list");
|
||||
Thread.Sleep(500);
|
||||
data = UserLogin.GetSignaturex();
|
||||
data += "&search_secret_spu_ids=" + string.Join(",", extCodeLst.Distinct());
|
||||
data += "&wx_safe_status=" + "违规商品";
|
||||
result = GetHtml.PostUtf8(url, data);
|
||||
if (!result.Contains("\"code\":200"))
|
||||
result = GetHtml.PostUtf8(url, data);
|
||||
if (!result.Contains("\"code\":200"))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref result, "msg");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = result;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
foreach (var row in rowLstTmp)
|
||||
{
|
||||
row.Cells["colOpResult"].Value = "查询商品违规错误:" + errMsg;
|
||||
}
|
||||
}));
|
||||
continue;
|
||||
}
|
||||
List<KJDDBProduct> downDbProdExistLst = JsonHelper.DeserializeJsonToList<KJDDBProduct>(JsonHelper.JObjectParse(result)["data"].ParseToString());
|
||||
|
||||
foreach (var row in rowLstTmp)
|
||||
{
|
||||
var extCode = row.Cells["colExtCode"].Value.ParseToString();
|
||||
var neewDownSkuLst = downSkuExistLst.Where(se => se.secret_spu_id == extCode).ToList();
|
||||
if (neewDownSkuLst.Count == 0)
|
||||
// 下架sku
|
||||
var needDownSkuLst = downSkuExistLst.Where(se => se.secret_spu_id == extCode).ToList();
|
||||
// 违规商品
|
||||
var needDownProdLst = downDbProdExistLst.Where(pe => pe.secret_spu_id == extCode).ToList();
|
||||
if (needDownSkuLst.Count == 0 && needDownProdLst.Count == 0)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -1143,6 +1171,10 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
else
|
||||
{
|
||||
if (needDownProdLst.Count > 0)
|
||||
{
|
||||
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colOpResult"].Value = "正在检测同步";
|
||||
@@ -1187,7 +1219,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
var jSkuStr = jSku.ParseToString();
|
||||
var itemCode = jSku["productSkuInfo"]?["skuCode"].ParseToString();
|
||||
var needDownSku = downSkuExistLst.FirstOrDefault(se =>se.secret_spu_id == extCode && se.secret_sku_id == itemCode);
|
||||
if (needDownSku != null)
|
||||
if (needDownSku != null || needDownProdLst.Count > 0)
|
||||
{
|
||||
if (//jSku["productSkuInfo"]["stockInfo"]["stockNum"].ParseToString() != "0" ||
|
||||
jSku["productSkuInfo"]["stockInfo"]["totalNum"].ParseToString() != "0" ||
|
||||
|
||||
Reference in new issue
Block a user