微店模拟接口 其他一些功能优化

This commit is contained in:
wule_5900x committed 2026-04-12 11:12:27 +08:00
1 parent dc6f981a34
commit cafdbbd95d
20 files changed
+2343 -103

No files matched your search

@@ -1988,7 +1988,7 @@ namespace TemuKJD.WXForms.ProductForms
//-------------------------------------------------------------------------------------------------------------------------------------
// ai识别类目暂存主图位置
int imgId = 0;
string tempImgPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordNumber(8).ToLower();
string tempImgPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordWithNumber(8).ToLower();
List<string> tempImgFullPathLst = new List<string>();
//-------------------------------------------------------------------------------------------------------------------------------------
// 生成ai识别类目所需图片
@@ -3391,7 +3391,7 @@ namespace TemuKJD.WXForms.ProductForms
}
}
}
if (!prodInfo.detail.sku.Any(s => s.quantity.ParseToInt() > 0))
if (dbProd.product_get_type_text == "厂商直采" && !prodInfo.detail.sku.Any(s => s.quantity.ParseToInt() > 0))
{
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"源商品库存为0\"}";
}
@@ -3440,7 +3440,8 @@ namespace TemuKJD.WXForms.ProductForms
skuParam.skuKey.productKey.outProductId = upProdParam.product.info.spuCode;
// 库存
skuParam.productSkuInfo.stockInfo = new stockInfoParam() { stockNum = defaultAddPriceRule.StockNum };
if (skuInfo.quantity.ParseToInt() == 0)
// 厂商直采上家库存为0则按0上架
if (dbProd.product_get_type_text == "厂商直采" && skuInfo.quantity.ParseToInt() == 0)
skuParam.productSkuInfo.stockInfo.stockNum = 0;
skuParam.productSkuInfo.saleParam = new List<saleParamParam>();
foreach (var specInfo in skuInfo.spec)
@@ -3961,7 +3962,7 @@ namespace TemuKJD.WXForms.ProductForms
// 提交免审修改(实际生效接口)
var listingAuditFreeRst = WXUpload.listingAuditFree(shop, productJson, upProdParam.product.productKey.productId, time1, time2);
string tempBlobPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordNumber(8).ToLower();
string tempBlobPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordWithNumber(8).ToLower();
if (!Directory.Exists(tempBlobPath))
Directory.CreateDirectory(tempBlobPath);
string blobFullPath = tempBlobPath + "\\blob"; // C:\Users\Administrator\AppData\Local\Temp\3mer3k21\blob