diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index b425523..616bc5f 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 921;
+ public static int VersionCount = 927;
//public static int VersionCount = 613;
///
diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
index 4fb8864..94d8bb4 100644
--- a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
@@ -603,11 +603,13 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":50001,\"msg\":\"没有售后编号\"}";
if (string.IsNullOrEmpty("after_sale_json"))
return "{\"code\":50001,\"msg\":\"没有售后信息\"}";
+ string supplier_name = RegexUtils.GetStringQuery(ref inputData, "supplier_name")?.Replace("'", "\\'");
+ string type = RegexUtils.GetStringQuery(ref inputData, "type")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
- string sql = "SELECT * FROM `wxxd`.`after_sale` where coid='" + coid + "'";
+ string sql = "SELECT coid FROM `wxxd`.`after_sale` where coid='" + coid + "'";
string where = "";
sql += where;
@@ -621,16 +623,23 @@ namespace KJD_Web.BLL.WXXD
mySql = new MysqlUtils(conn);
if (dt.Rows.Count == 0)
{
- sql = "INSERT INTO `wxxd`.`after_sale` (coid,after_sale_json) VALUES (@coid,@after_sale_json);";
+ sql = "INSERT INTO `wxxd`.`after_sale` (coid,after_sale_json,supplier_name,type) VALUES (@coid,@after_sale_json,@supplier_name,@type);";
}
else
{
- sql = "UPDATE `wxxd`.`after_sale` SET after_sale_json=@after_sale_json WHERE coid=@coid;";
+ sql = "UPDATE `wxxd`.`after_sale` SET after_sale_json=@after_sale_json";
+ if (supplier_name != null)
+ sql += ", supplier_name=@supplier_name ";
+ if (type != null)
+ sql += ", type=@type ";
+ sql += " WHERE coid=@coid;";
}
List paramLst = new List();
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "coid", Value = coid, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "after_sale_json", Value = after_sale_json, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "supplier_name", Value = supplier_name.ParseToString(), });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "type", Value = type.IsNullOrEmpty() ? "jst" : type, });
mySql.ExecuteNonQuery(sql, paramLst.ToArray());
mySql.Close();
if (string.IsNullOrEmpty(mySql.Message))
diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs
index 68d3cda..52d9151 100644
--- a/TEMUKJD/BLL/PDDProdFormConverter.cs
+++ b/TEMUKJD/BLL/PDDProdFormConverter.cs
@@ -1,5 +1,6 @@
using AllBase;
using AllBase.Model.Result;
+using AllBase.Model.Result._1688;
using AllBase.Model.Result.PDDResult;
using AllBase.Model.Result.WXResult;
using NaiBa.Util.Extension;
@@ -652,7 +653,7 @@ namespace TemuKJD.BLL
shipment_limit_second_list = null,
sku69_code = "",
};
- // 供应商价加价10%(最低1元)赚取差价
+ // 聚水潭供应商价加价10%(最低1元)赚取差价
int addPrice = (skuInfo.multi_price * 0.1).ParseToInt();
if (addPrice < 100)
addPrice = 100;
@@ -1117,12 +1118,12 @@ namespace TemuKJD.BLL
shipment_limit_second_list = null,
sku69_code = "",
};
- // 供应商价加价10%(最低1元)赚取差价
- int addPrice = (skuInfo.multi_price * 0.1).ParseToInt();
- if (addPrice < 100)
- addPrice = 100;
- skuInfo.multi_price += addPrice;
- skuInfo.price += addPrice;
+ //// 聚水潭供应商价加价10%(最低1元)赚取差价
+ //int addPrice = (skuInfo.multi_price * 0.1).ParseToInt();
+ //if (addPrice < 100)
+ // addPrice = 100;
+ //skuInfo.multi_price += addPrice;
+ //skuInfo.price += addPrice;
foreach (var wxSpec in wxEditSkuInfo.productSkuInfo.saleParam)
{
skuInfo.spec.Add(new spec_item()
@@ -1175,6 +1176,7 @@ namespace TemuKJD.BLL
propInfo.values = new List();
foreach (var wxPropVal in wxProp.categorys)
{
+ // 第一个是属性名,装载属性值的时候跳过
if (wxProp.categorys.IndexOf(wxPropVal) == 0)
continue;
@@ -1204,5 +1206,353 @@ namespace TemuKJD.BLL
return null;
}
}
+
+
+
+ public PDDProductInfo _1688ClientToPddConvert(out string convertRst, KJDDBProduct dbProd)
+ {
+ convertRst = "";
+ try
+ {
+ var prod_json = dbProd.product_json;
+ var _1688Json = BaseRegex.GetOneJsonObjStrJson(ref prod_json, "_1688DetailData");
+ _1688ClientProductInfo _1688ClentProdInfo = JsonHelper.DeserializeJsonToObject<_1688ClientProductInfo>(_1688Json);
+
+ 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