修复一些上传问题

This commit is contained in:
wule_5900x committed 2026-03-26 23:37:27 +08:00
1 parent 2f61dc1cdd
commit 3b3a903e25
5 files changed
+47 -17

No files matched your search

+28 -5
View File
@@ -1571,6 +1571,16 @@ namespace TemuKJD.BLL
var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]);
var baseData = JsonHelper.JObjectParse(dbProd.product_json)["baseData"].ParseToString();
var str_lst = BaseRegex.GetJsonArrStrJson(ref baseData, "productSkus");
try
{
var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault();
var productSkus = JsonHelper.DeserializeJsonToList<WXProductSkuInfoLite>(regex_str);
}
catch
{
}
WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject<WXClientProductInfoLite>(wxxdData);
if (wxClientProdInfo.info.sku_list == null)
{
@@ -1863,14 +1873,27 @@ namespace TemuKJD.BLL
// addPrice = 100;
//skuInfo.multi_price += addPrice;
//skuInfo.price += addPrice;
foreach (var wxSpec in wxEditSkuInfo.productSkuInfo.saleParam)
if (wxEditSkuInfo.productSkuInfo.saleParam != null)
{
foreach (var wxSpec in wxEditSkuInfo.productSkuInfo.saleParam)
{
skuInfo.spec.Add(new spec_item()
{
parent_id = wxSpec.categorys[0].catId.ParseToLong(),
parent_name = wxSpec.categorys[0].name,
spec_id = wxSpec.categorys[1].catId.ParseToLong(),
spec_name = wxSpec.categorys[1].name,
});
}
}
else
{
skuInfo.spec.Add(new spec_item()
{
parent_id = wxSpec.categorys[0].catId.ParseToLong(),
parent_name = wxSpec.categorys[0].name,
spec_id = wxSpec.categorys[1].catId.ParseToLong(),
spec_name = wxSpec.categorys[1].name,
parent_id = 0,
parent_name = "规格",
spec_id = 0,
spec_name = "默认",
});
}
skuInfo.out_sku_sn = wxEditSkuInfo.productSkuInfo.skuCode;