diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj
index 5c16dd9..26403c4 100644
--- a/AllBase/AllBase.csproj
+++ b/AllBase/AllBase.csproj
@@ -178,7 +178,7 @@
-
+
diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 4df0df1..53cdce9 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 900;
+ public static int VersionCount = 909;
//public static int VersionCount = 613;
///
diff --git a/AllBase/Model/Config/WxShopAfterSaleInfo.cs b/AllBase/Model/Config/WxShopAfterSaleInfo.cs
deleted file mode 100644
index f04e99b..0000000
--- a/AllBase/Model/Config/WxShopAfterSaleInfo.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace AllBase.Model.Config
-{
- public class WxShopAfterSaleInfo
- {
- public string ShopId { get; set; }
- public int? AfterSaleCount { get; set; }
- public DateTime RefreshTime { get; set; }
- }
-}
diff --git a/AllBase/Model/Config/WxTalkFormShopMainInfo.cs b/AllBase/Model/Config/WxTalkFormShopMainInfo.cs
new file mode 100644
index 0000000..55c8648
--- /dev/null
+++ b/AllBase/Model/Config/WxTalkFormShopMainInfo.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AllBase.Model.Config
+{
+ public class WxTalkFormShopMainInfo
+ {
+ // waybillErrorRet物流异常
+ public string ShopId { get; set; }
+ ///
+ /// 待发货 orderNumRet.pendingShipNum
+ ///
+ public int? WaitSendCount { get; set; }
+ ///
+ /// 物流异常 waybillErrorRet.totalNum
+ ///
+ public int? WaybillError { get; set; }
+ ///
+ /// 售后 aftersaleAllRet.totalNum
+ ///
+ public int? AfterSaleCount { get; set; }
+ ///
+ /// 店铺违规 punishRet.pendingNum
+ ///
+ public int? PunishCount { get; set; }
+
+ public decimal? ShopScore { get; set; }
+ public string err_msg { get; set; }
+ public DateTime RefreshTime { get; set; }
+ }
+}
diff --git a/AllBase/Model/Result/PDDResult/PDDProductPropertyInfo.cs b/AllBase/Model/Result/PDDResult/PDDProductPropertyInfo.cs
index 0bee9c5..1047963 100644
--- a/AllBase/Model/Result/PDDResult/PDDProductPropertyInfo.cs
+++ b/AllBase/Model/Result/PDDResult/PDDProductPropertyInfo.cs
@@ -17,6 +17,10 @@ namespace AllBase.Model.Result.PDDResult
public string name { get; set; }
public int? ref_pid { get; set; }
public List values { get; set; }
+ ///
+ /// 对应微信输入类型
+ ///
+ //public int? wx_input_type { get; set; }
}
public class value_item
{
diff --git a/AllBase/Model/Result/WXResult/WXGetEditProductInfoLite.cs b/AllBase/Model/Result/WXResult/WXGetEditProductInfoLite.cs
index c9cb333..1c22092 100644
--- a/AllBase/Model/Result/WXResult/WXGetEditProductInfoLite.cs
+++ b/AllBase/Model/Result/WXResult/WXGetEditProductInfoLite.cs
@@ -9,10 +9,32 @@ namespace AllBase.Model.Result.WXResult
public class WXGetEditProductInfoLite
{
public WXProductInfo product { get; set; }
+ public WXAfterSaleAddressInfo address { get; set; }
+ }
+
+ public class WXAfterSaleAddressInfo
+ {
+ public string addressId { get; set; } // "69496256002",
+ public string name { get; set; } // "",
+ public WXAddressInfo addressInfo { get; set; }
+ }
+
+ public class WXAddressInfo
+ {
+ public string userName { get; set; } // "王总",
+ public string postalCode { get; set; } // "",
+ public string provinceName { get; set; } // "安徽省",
+ public string cityName { get; set; } // "合肥市",
+ public string countyName { get; set; } // "肥西县",
+ public string detailInfo { get; set; } // "蜀山区长江西路某某号某某单元",
+ public string telNumber { get; set; } // "18388888888",
+ public int? lat { get; set; } // 0,
+ public int? lng { get; set; } // 0
}
public class WXProductInfo
{
+ public List productSkus { get; set; }
public WXProductKeyInfo productKey { get; set; }
public WXProductInfoInfo info { get; set; }
public int? status { get; set; } // 5
@@ -24,6 +46,43 @@ namespace AllBase.Model.Result.WXResult
public int source { get; set; } // 1
}
+ public class WXProductSkuInfoInfoLite
+ {
+ public WXSkuKeyInfoLite skuKey { get; set; }
+ public WXProductSkuInfoLite productSkuInfo { get; set; }
+ }
+
+ public class WXProductSkuInfoLite
+ {
+ public List saleParam { get; set; }
+ public string thumbImg { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/69a6a1ae000e63741a5ddf35d5b71715000000a000004f50"
+ public string skuCode { get; set; } // ""
+ public int? salePrice { get; set; } // 5880
+ public WXStockInfoLite stockInfo { get; set; }
+ public WXRealStockInfoLite realStockInfo { get; set; }
+ }
+
+ public class WXRealStockInfoLite
+ {
+ public int? stockNum { get; set; } // 999
+ public int? totalNum { get; set; } // 999
+ }
+
+ public class WXStockInfoLite
+ {
+ public string stockNum { get; set; } // "9999999"
+ }
+
+ public class WXSaleParamInfoLite
+ {
+ public List categorys { get; set; }
+ }
+
+ public class WXSkuKeyInfoLite
+ {
+ public string skuId { get; set; } // "8767785131",
+ }
+
public class WXProductKeyInfo
{
public string productId { get; set; } // "10000538778988"
@@ -33,7 +92,7 @@ namespace AllBase.Model.Result.WXResult
{
// 主图
public List headImg { get; set; } = new List();
- public List category { get; set; } = new List();
+ public List category { get; set; } = new List();
public List param { get; set; } = new List();
public List qualificationList { get; set; }
public List productHeadimgInfo { get; set; }
@@ -46,12 +105,18 @@ namespace AllBase.Model.Result.WXResult
public string brandId { get; set; } // "10655917"
public string listingTime { get; set; } // "1772533190"
public string spuCode { get; set; } // "2028756820870602753"
+ public WXAfterSaleInfo afterSaleInfo { get; set; }
public string lastEditDraftTime { get; set; } // "1772532559"
public string shortTitle { get; set; } // "歪歪马脉冲震动成人情趣棒"
public string aiGenShortTitle { get; set; } // "歪歪马脉冲震动成人情趣棒"
public string uniqueId { get; set; } // "4411405439658180613"
}
+ public class WXAfterSaleInfo
+ {
+ public string afterSaleAddressId;
+ }
+
public class WXProductDetailInfo
{
public List detailImg { get; set; } = new List(); // [ "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/69a6a8460000683300254e4c8c4fab15000000a100004f50", ... ],
@@ -109,16 +174,16 @@ namespace AllBase.Model.Result.WXResult
public long? catGroup { get; set; } // 4294967295,
}
- public class WXProductCategoryInfo
+ public class WXProductCategoryInfoLite
{
public string catId { get; set; } // "10000577"
public string name { get; set; } // "情趣用品" // 可能为空或没有此字段
public string fCatId { get; set; } // "10000575"
- public WXProductInfoInfo catInfo { get; set; }
+ public WXProductCategoryInfoInfoLite catInfo { get; set; }
public bool? leaf { get; set; } // false
}
- public class WXProductCategoryInfoInfo
+ public class WXProductCategoryInfoInfoLite
{
public int? catLevel { get; set; } // 2
public long? catGroup { get; set; } // 4294967295
diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs
index 6043b67..e3caefb 100644
--- a/TEMUKJD/BLL/PDDProdFormConverter.cs
+++ b/TEMUKJD/BLL/PDDProdFormConverter.cs
@@ -1,6 +1,7 @@
using AllBase;
using AllBase.Model.Result;
using AllBase.Model.Result.PDDResult;
+using AllBase.Model.Result.WXResult;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
@@ -601,6 +602,7 @@ namespace TemuKJD.BLL
prodInfo.detail.sku = new List();
foreach (JObject jSku in jstGoodsObj["skuInfo"]["goodsSkuDetail"])
{
+ var skuStr = jSku.ParseToString();
sku_item skuInfo = new sku_item()
{
id = 0,
@@ -677,6 +679,11 @@ namespace TemuKJD.BLL
convertRst = "SKU货号不存在";
return null;
}
+ if (jstSecretCodeLst["skus"].Select(s => s["spuCode"].ParseToString()).Distinct().Count() != jstSecretCodeLst["skus"].Count())
+ {
+ convertRst = "SKU货号重复";
+ return null;
+ }
skuInfo.out_sku_sn = skuId;
prodInfo.detail.sku.Add(skuInfo);
}
@@ -836,5 +843,358 @@ namespace TemuKJD.BLL
return null;
}
}
+
+ public PDDProductInfo WXProdToPddConvert(out string convertRst, KJDDBProduct dbProd)
+ {
+ convertRst = "";
+ try
+ {
+ //var prodObj = JsonHelper.JObjectParse(dbProd.product_json);
+ //if (prodObj["pddData"].IsJTokenNullOrEmpty())
+ //{
+ // convertRst = "缺少指定的数据格式";
+ // return null;
+ //}
+ //var jstGoodsObj = prodObj["pddData"];
+ //var jstPddPropMapLst = JsonHelper.DeserializeJsonToList(JsonHelper.SerializeObject(prodObj["pddPropMap"]));
+ ////{"goodsId":"2016474712785620994","warehouseGoodsId":"C7108311198A4217B022DCA87B6A5863","spuCode":"3783056947394249077","skus":[{"skuId":"2016692758292738050","warehouseSkuId":"C742B3FCB0364448AF92332F8F6005A6","skuCode":"ZH-XP-YWQYW-010"},{"skuId":"2016692758317903874","warehouseSkuId":"703E87F1B7774C14923821A57EEE6EFA","skuCode":"ZH-XP-YWQYW-010-111"},{"skuId":"2016692758338875394","warehouseSkuId":"895EDCDF6ECC4FAE8AD4DB9503719002","skuCode":"ZH-XP-YWQYW-010-222"}]}
+ //var jstSecretCodeLst = JsonHelper.JObjectParse(dbProd.sku_secret_json.TrimStart('[').TrimEnd(']'));
+
+ WXGetEditProductInfoLite wxEditProdInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json);
+
+ PDDProductInfo prodInfo = new PDDProductInfo()
+ {
+ sale_count = dbProd.sale_count.ParseToString(),
+ sale_count_text = dbProd.sale_count_text,
+ };
+ prodInfo.chance_id = null;
+ prodInfo.chance_refere = null;
+ prodInfo.chance_tab = null;
+ prodInfo.decoration = null;
+
+ // 商品详情
+ prodInfo.detail = new PDDProductDetailInfo();
+ prodInfo.detail.allergy_refund = 0;
+ prodInfo.detail.allowed_region = new List