diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj
index 8511dd9..af4fc13 100644
--- a/AllBase/AllBase.csproj
+++ b/AllBase/AllBase.csproj
@@ -215,6 +215,7 @@
+
diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 29eaaea..b0cc175 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 807;
+ public static int VersionCount = 811;
//public static int VersionCount = 613;
///
diff --git a/AllBase/Model/Param/OutServerGoodsParam.cs b/AllBase/Model/Param/OutServerGoodsParam.cs
index fe4ca32..e057fa7 100644
--- a/AllBase/Model/Param/OutServerGoodsParam.cs
+++ b/AllBase/Model/Param/OutServerGoodsParam.cs
@@ -12,15 +12,15 @@ namespace AllBase.Model.Param
public class OutServerGoodsParam
{
///
- /// 仓库商品ID
+ /// 仓库商品ID 对应聚水潭 Id
///
public string warehouseGoodsId { get; set; } // "46251545HSISG656DF89D",
///
- /// 仓库资料编码
+ /// 仓库资料编码 对应聚水潭商品 styleCode // 相当于货号
///
public string spuCode { get; set; } // "85295413687",
///
- /// 商品标题
+ /// 商品标题 对应聚水潭 itemName
///
public string title { get; set; } // "帆布包女大容量通勤手提拉链袋可折叠购物袋帆布袋文艺百搭",
///
@@ -32,7 +32,7 @@ namespace AllBase.Model.Param
///
public string headImg { get; set; } // "https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/068bb3c355a583c33c0bb41f7d1ae740.jpg",
///
- /// 商品主图列表
+ /// 商品主图列表 对应聚水潭 itemMainImage
///
public string headImgs { get; set; } // "[\"https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/068bb3c355a583c33c0bb41f7d1ae740.jpg\",\"https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/0d1f5a11791e3c5903b708677b307624.jpeg\",\"https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/624299b9363b393f1febc89f8219991f.jpg\",\"https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/8d18cfc34b68f3b8183f1825c1249e1d.jpg\",\"https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/7795ba1aedcee0a1b88ec4c622e5d3ad.jpg\"]",
///
@@ -56,21 +56,17 @@ namespace AllBase.Model.Param
///
public int? status { get; set; } = 1;
///
- /// 扩展状态:0-待完善,1-其他(有ext数据填写1)
- ///
- public int? ext_status { get; set; } = 0;
- ///
- /// 供应商
+ /// 供应商 对应聚水潭 supplierName
///
public string supplier { get; set; } // "广如供应链",
///
- /// 供应商ID
+ /// 供应商ID 暂时不填
///
- public string supplierId { get; set; } // "110",
+ public long? supplierId { get; set; } // 110,
///
/// 创建人
///
- public string createBy { get; set; } // "",
+ public string createBy { get; set; } = "";
public string createTime { get; set; } // "2025-10-19 22:35:28",
public string updateBy { get; set; } // null,
public string updateTime { get; set; } // null,
@@ -83,13 +79,99 @@ namespace AllBase.Model.Param
///
public int? shipType { get; set; } = 20;
///
- /// 仓库编号
+ /// 仓库编号 对应聚水潭 coid
///
public string warehouseNum { get; set; } // "11625838",
///
- /// 商户ID
+ /// 商户ID 可以不传
///
public string merchantId { get; set; } // "10",
- public string platformCode { get; set; } // "WEISHOP",
+ public string platformCode { get; set; } = "WEISHOP";
+ public object selectionQuareGoodsSkus { get; set; } // null,
+ public object selectionQuareGoodsExtList { get; set; } // null,
+ public object goodsIds { get; set; } // null,
+ public object freightPrice { get; set; } // null,
+ public object warehouseDisablePlatformList { get; set; } // null,
+ ///
+ /// 扩展状态:0-待完善,1-其他(有ext数据填写1) 商品附属信息,可以默认填1
+ ///
+ public int? extStatus { get; set; } = 1;
+ public object groupKey { get; set; } // null,
+ public string platform { get; set; } = "WEISHOP";
+ public long? catId { get; set; } // "1441",
+ public List headImgList { get; set; } // ["https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/068bb3c355a583c33c0bb41f7d1ae740.jpg" ... ],
+ public List detailImgList { get; set; } // ["https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/859603a9a322fa61dcaef33076089e16.png" ... ],
+ public List skus { get; set; }
+ public List productAttrs { get; set; }
+ }
+
+ public class osProductAttrParam
+ {
+ ///
+ /// 必填属性 key
+ ///
+ public string attrKey { get; set; } // "国产/进口",
+ ///
+ /// 必填属性 Value
+ ///
+ public string attrValue { get; set; } // "国产"
+ }
+
+ public class osSkuParam
+ {
+ public long? supplierId { get; set; } // 110,
+ ///
+ /// 仓库 skuid 编号 对应baseSkuId
+ ///
+ public string warehouseSkuId { get; set; } // "7DFD0D35C91F4D01B8BFF2E9B064AA15",
+ ///
+ /// sku 标题
+ ///
+ public string title { get; set; } // "黑色",
+ ///
+ /// sku 小图
+ ///
+ public string thumbImg { get; set; } // "https://images-1259706103.cos.ap-nanjing.myqcloud.com/20251019/1c0309944d046ff0ffaf31a699d0a55f.jpeg",
+ ///
+ /// 售卖价格(单位:分) 对应supplyPrice
+ ///
+ public int? salePrice { get; set; } // 729,
+ ///
+ /// 库存
+ ///
+ public int? stockNum { get; set; } // 4529,
+ ///
+ /// 规格编码 对应itemNo // realItemNo // 相当于货号
+ ///
+ public string skuCode { get; set; } // "snb00620A",
+ ///
+ /// sku 图片多个英文逗号分隔
+ ///
+ public object skuImags { get; set; } // null,
+ ///
+ /// 状态:1 售卖中
+ ///
+ public int? status { get; set; } = 1;
+ ///
+ /// sku 重量,单位为 g
+ ///
+ public int? skuWeight { get; set; } // 0,
+ ///
+ /// sku 备注
+ ///
+ public string remark { get; set; } = "";
+ public string latestPrice { get; set; } // "732.00",
+ public string latestPriceTime { get; set; } // "2025-10-29 10:13:43",
+ public string latestUpdateTime { get; set; } // null,
+ public string platform { get; set; } // null,
+ public string skuId { get; set; } // null,
+ public List skuAttrs { get; set; }
+ public object platformSkuId { get; set; } // null
+ }
+
+ public class skuAttrParam
+ {
+ public string attrKey { get; set; } // "颜色分类"
+ public string attrValue { get; set; } // "蓝色"
}
}
diff --git a/AllBase/Model/Result/KJDDBProduct.cs b/AllBase/Model/Result/KJDDBProduct.cs
index b70e240..9185d98 100644
--- a/AllBase/Model/Result/KJDDBProduct.cs
+++ b/AllBase/Model/Result/KJDDBProduct.cs
@@ -17,6 +17,9 @@ namespace AllBase.Model.Result
public string offline_supplier_id { get; set; }
public string offline_supplier_name { get; set; }
public string spu_id { get; set; }
+ ///
+ /// skcId,聚水潭为商家coid
+ ///
public string skc_id { get; set; }
public string main_cat_id { get; set; }
public string cat_id { get; set; }
@@ -42,6 +45,7 @@ namespace AllBase.Model.Result
/// sku编辑后存储列表
///
public string sku_edit_json { get; set; }
+ public string sku_secret_json { get; set; }
public int sku_img_replace_id { get; set; }
public string sku_img_replace_base64 { get; set; }
public string sku_img_replace_url { get; set; }
@@ -77,5 +81,7 @@ namespace AllBase.Model.Result
public string sale_count_text { get; set; }
public string wx_safe_status { get; set; }
public string special_prod_type { get; set; }
+ public int? distribution_set { get; set; }
+ public int? send_to_out_server { get; set; }
}
}
diff --git a/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs b/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs
index c597e9c..13d0971 100644
--- a/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs
+++ b/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs
@@ -213,6 +213,7 @@ namespace AllBase.Model.Result.PDDResult
public string url { get; set; }
public int? width { get; set; }
public int? height { get; set; }
+ // 图片类型 1 主图 2 详情图 3视频
public int? type { get; set; }
public object source { get; set; }
public object status { get; set; }
@@ -254,6 +255,7 @@ namespace AllBase.Model.Result.PDDResult
public object thumb_url_is_deleted { get; set; }
public int? quantity_delta { get; set; }
public List spec { get; set; }
+ // 货号
public string out_sku_sn { get; set; }
public object batch_id { get; set; }
public int? priority { get; set; }
diff --git a/AllBase/Model/Result/PDDResult/PDDPropRefPidNameMap.cs b/AllBase/Model/Result/PDDResult/PDDPropRefPidNameMap.cs
new file mode 100644
index 0000000..7e24c70
--- /dev/null
+++ b/AllBase/Model/Result/PDDResult/PDDPropRefPidNameMap.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AllBase.Model.Result.PDDResult
+{
+ public class PDDPropRefPidNameMap
+ {
+ public string name_alias { get; set; }
+ public long? ref_pid { get; set; }
+ public string name { get; set; }
+ public long? id { get; set; }
+ }
+}
diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
index 1242929..a5d0da4 100644
--- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
@@ -135,6 +135,9 @@ namespace KJD_Web.BLL.BXX
string delivery_fee_set = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "delivery_fee_set"))?.Replace("'", "\\'");
string after_sale_set = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "after_sale_set"))?.Replace("'", "\\'");
string distribution_set = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "distribution_set"))?.Replace("'", "\\'");
+ string send_to_out_server = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "send_to_out_server"))?.Replace("'", "\\'");
+ string sku_edit_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_edit_json"))?.Replace("'", "\\'");
+ string sku_secret_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_secret_json"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
{
@@ -195,11 +198,17 @@ namespace KJD_Web.BLL.BXX
if (wx_cat_leaf != null)
sql += " p.wx_cat_leaf=" + wx_cat_leaf + ",";
if (delivery_fee_set != null)
- sql += " p.delivery_fee_set='" + delivery_fee_set + "',";
+ sql += " p.delivery_fee_set=" + delivery_fee_set + ",";
if (after_sale_set != null)
- sql += " p.after_sale_set='" + after_sale_set + "',";
+ sql += " p.after_sale_set=" + after_sale_set + ",";
if (distribution_set != null)
- sql += " p.distribution_set='" + distribution_set + "',";
+ sql += " p.distribution_set=" + distribution_set + ",";
+ if (send_to_out_server != null)
+ sql += " p.send_to_out_server=" + send_to_out_server + ",";
+ if (sku_edit_json != null)
+ sql += " p.sku_edit_json='" + sku_edit_json + "',";
+ if (sku_secret_json != null)
+ sql += " p.sku_secret_json=@sku_secret_json,";
sql += " p.mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
sql = sql.TrimEnd(',');
sql += " where spu_id='" + spu_id + "';";
@@ -207,6 +216,7 @@ namespace KJD_Web.BLL.BXX
List paramLst = new List();
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_json", Value = product_json, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "size_json", Value = size_json, });
+ paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "sku_secret_json", Value = sku_secret_json, });
var rst = mySql.ExecuteNonQuery(sql, paramLst.ToArray());
mySql.Close();
@@ -236,6 +246,7 @@ namespace KJD_Web.BLL.BXX
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
var search_spu = RegexUtils.GetStringQuery(ref inputData, "search_spu")?.Replace("'", "\\'");
var search_skc = RegexUtils.GetStringQuery(ref inputData, "search_skc")?.Replace("'", "\\'");
+ var search_cat1 = RegexUtils.GetStringQuery(ref inputData, "search_cat1")?.Replace("'", "\\'");
var search_cat = RegexUtils.GetStringQuery(ref inputData, "search_cat")?.Replace("'", "\\'");
var search_ext_code = RegexUtils.GetStringQuery(ref inputData, "search_ext_code")?.Replace("'", "\\'");
var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'");
@@ -252,6 +263,8 @@ namespace KJD_Web.BLL.BXX
var special_prod_type = RegexUtils.GetStringQuery(ref inputData, "special_prod_type")?.Replace("'", "\\'");
var is_supplier_prod_ok = RegexUtils.GetStringQuery(ref inputData, "is_supplier_prod_ok")?.Replace("'", "\\'");
var has_wx_cat = RegexUtils.GetStringQuery(ref inputData, "has_wx_cat")?.Replace("'", "\\'");
+ var send_to_out_server = RegexUtils.GetStringQuery(ref inputData, "send_to_out_server")?.Replace("'", "\\'");
+ var has_send_to_out_server = RegexUtils.GetStringQuery(ref inputData, "has_send_to_out_server")?.Replace("'", "\\'");
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
@@ -281,6 +294,8 @@ namespace KJD_Web.BLL.BXX
where += " and p.skc_id like '%" + search_skc + "%'";
if (!string.IsNullOrWhiteSpace(search_cat))
where += " and p.cat_name like '%" + search_cat + "%'";
+ if (!string.IsNullOrWhiteSpace(search_cat1))
+ where += " and p.main_cat_name like '%" + search_cat1 + "%'";
if (!string.IsNullOrWhiteSpace(search_ext_code))
where += " and p.ext_code like '%" + search_ext_code + "%'";
if (!string.IsNullOrWhiteSpace(search_prod_name))
@@ -291,18 +306,31 @@ namespace KJD_Web.BLL.BXX
where += " and p.notes like '%" + search_notes + "%'";
if (!string.IsNullOrEmpty(has_wx_cat))
{
- if (has_wx_cat == "true")
+ if (has_wx_cat.ToLower() == "true")
where += " and wx_cat_leaf is NOT NULL";
else
where += " and wx_cat_leaf is NULL";
}
+ if (!string.IsNullOrEmpty(send_to_out_server))
+ where += " and send_to_out_server=" + send_to_out_server;
+ else if (!string.IsNullOrEmpty(has_send_to_out_server))
+ {
+ if (has_send_to_out_server.ToLower() == "true")
+ where += " and send_to_out_server=1";
+ else
+ where += " and send_to_out_server!=1";
+ }
// 供应商货源是否已完成初始设置
if (!string.IsNullOrEmpty(is_supplier_prod_ok))
{
+ //if (is_supplier_prod_ok == "1" || is_supplier_prod_ok == "已设置")
+ // where += " and wx_cat_leaf IS NOT NULL and send_to_out_server=1 and delivery_fee_set=1 and after_sale_set=1 and distribution_set=1";
+ //else
+ // where += " and (wx_cat_leaf IS NULL or send_to_out_server=0 or delivery_fee_set=0 or after_sale_set=0 or distribution_set=0)";
if (is_supplier_prod_ok == "1" || is_supplier_prod_ok == "已设置")
- where += " and wx_cat_leaf IS NOT NULL and send_to_out_server=1 and delivery_fee_set=1 and after_sale_set=1 and distribution_set=1";
+ where += " and wx_cat_leaf IS NOT NULL and send_to_out_server=1 and distribution_set=1";
else
- where += " and (wx_cat_leaf IS NULL or send_to_out_server=0 or delivery_fee_set=0 or after_sale_set=0 or distribution_set=0)";
+ where += " and (wx_cat_leaf IS NULL or send_to_out_server!=1 or distribution_set=0)";
}
sql += where;
@@ -324,7 +352,7 @@ namespace KJD_Web.BLL.BXX
sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name," +
" p.main_img,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group," +
" p.product_get_type,p.wx_safe_status,p.sale_count,p.sale_count_text,p.special_prod_type,p.from_shop_name,p.wx_cat_1,p.wx_cat_2,p.wx_cat_3," +
- " p.wx_cat_leaf," +
+ " p.wx_cat_leaf,p.send_to_out_server," +
" s.img_url,e.ext_code_price" +
" FROM bxx.product p " +
" left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" +
@@ -334,7 +362,7 @@ namespace KJD_Web.BLL.BXX
sql = "SELECT p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name," +
" p.main_img,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group," +
" p.product_get_type,p.wx_safe_status,p.sale_count,p.sale_count_text,p.special_prod_type,p.from_shop_name,p.wx_cat_1,p.wx_cat_2,p.wx_cat_3," +
- " p.wx_cat_leaf" +
+ " p.wx_cat_leaf,p.send_to_out_server," +
" s.img_url,COUNT(se.id) AS select_count,e.ext_code_price" +
" FROM bxx.product p left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id LEFT JOIN bxx.product_select se ON p.id=se.out_product_id AND se.shop_id='" + select_shop_id + "' " +
" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
@@ -398,12 +426,16 @@ namespace KJD_Web.BLL.BXX
sale_count_text = row["sale_count_text"].ToString(),
wx_safe_status = row["wx_safe_status"].ToString(),
special_prod_type = row["special_prod_type"].ToString(),
+ main_cat_id = row["main_cat_id"].ToString(),
+ main_cat_name = row["main_cat_name"].ToString(),
+ send_to_out_server = row["send_to_out_server"].ParseToInt(),
};
if (isDetail)
{
prod.product_json = row["product_json"].ToString();
prod.size_json = row["size_json"].ToString();
prod.sku_edit_json = row["sku_edit_json"].ToString();
+ prod.sku_secret_json = row["sku_secret_json"].ToString();
prod.sku_img_replace_base64 = row["img_base64"].ToString();
//prod.sku_img_replace_url = row["img_url"].ToString();
}
@@ -648,6 +680,7 @@ namespace KJD_Web.BLL.BXX
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
var in_ext_codes = RegexUtils.GetStringQuery(ref inputData, "in_ext_codes")?.Replace("'", "\\'");
+ var in_spu_ids = RegexUtils.GetStringQuery(ref inputData, "in_spu_ids")?.Replace("'", "\\'");
var in_skc_ids = RegexUtils.GetStringQuery(ref inputData, "in_skc_ids")?.Replace("'", "\\'");
var in_groups = RegexUtils.GetStringQuery(ref inputData, "in_groups")?.Replace("'", "\\'");
var in_cates = RegexUtils.GetStringQuery(ref inputData, "in_cates")?.Replace("'", "\\'");
@@ -675,6 +708,11 @@ namespace KJD_Web.BLL.BXX
in_skc_ids = "'" + string.Join("','", in_skc_ids.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
where += " and p.skc_id in (" + in_skc_ids + ")";
}
+ if (!string.IsNullOrEmpty(in_spu_ids))
+ {
+ in_spu_ids = "'" + string.Join("','", in_spu_ids.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
+ where += " and p.spu_id in (" + in_spu_ids + ")";
+ }
if (!string.IsNullOrEmpty(in_groups))
{
in_groups = "'" + string.Join("','", in_groups.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
@@ -695,9 +733,9 @@ namespace KJD_Web.BLL.BXX
if (!string.IsNullOrEmpty(is_supplier_prod_ok))
{
if (is_supplier_prod_ok == "1" || is_supplier_prod_ok == "已设置")
- where += " and wx_cat_leaf IS NOT NULL and send_to_out_server=1 and delivery_fee_set=1 and after_sale_set=1 and distribution_set=1";
+ where += " and wx_cat_leaf IS NOT NULL and send_to_out_server=1 and distribution_set=1";
else
- where += " and (wx_cat_leaf IS NULL or send_to_out_server=0 or delivery_fee_set=0 or after_sale_set=0 or distribution_set=0)";
+ where += " and (wx_cat_leaf IS NULL or send_to_out_server!=1 or distribution_set=0)";
}
sql += where;
@@ -1377,6 +1415,7 @@ namespace KJD_Web.BLL.BXX
var search_shop_account = RegexUtils.GetStringQuery(ref inputData, "search_shop_account")?.Replace("'", "\\'");
var search_spu = RegexUtils.GetStringQuery(ref inputData, "search_spu")?.Replace("'", "\\'");
var search_skc = RegexUtils.GetStringQuery(ref inputData, "search_skc")?.Replace("'", "\\'");
+ var search_cat1 = RegexUtils.GetStringQuery(ref inputData, "search_cat1")?.Replace("'", "\\'");
var search_cat = RegexUtils.GetStringQuery(ref inputData, "search_cat")?.Replace("'", "\\'");
var search_ext_code = RegexUtils.GetStringQuery(ref inputData, "search_ext_code")?.Replace("'", "\\'");
var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'");
@@ -1441,6 +1480,8 @@ namespace KJD_Web.BLL.BXX
where += " and p.spu_id like '%" + search_spu + "%'";
if (!string.IsNullOrWhiteSpace(search_skc))
where += " and p.skc_id like '%" + search_skc + "%'";
+ if (!string.IsNullOrWhiteSpace(search_cat1))
+ where += " and p.main_cat_name like '%" + search_cat1 + "%'";
if (!string.IsNullOrWhiteSpace(search_cat))
where += " and p.cat_name like '%" + search_cat + "%'";
if (!string.IsNullOrWhiteSpace(search_ext_code))
@@ -1687,6 +1728,22 @@ namespace KJD_Web.BLL.BXX
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
+ public string GetAfterSale(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
+ string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
+ if (time1 != EncrypUtil.Encryption(time))
+ return "{\"code\":50000,\"msg\":\"校验失败\"}";
+
+ string url = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "get_url"));
+ string rst = HttpUtils.e57GetResponse(url, "");
+ return rst;
+ }
+ return "{\"code\":19999,\"msg\":\"输入为空\"}";
+ }
+
public string GetWxTokens(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
@@ -1750,8 +1807,8 @@ namespace KJD_Web.BLL.BXX
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
-
- public string GetWxAllCate(string inputData)
+
+ public string WxApiGetWxAllCate(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
index 31b57b1..80d5f85 100644
--- a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
@@ -2,6 +2,7 @@
using KJD_Web.Model.ShopModel;
using KJD_Web.Utils;
using MySql.Data.MySqlClient;
+using Mysqlx.Crud;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
@@ -417,5 +418,131 @@ namespace KJD_Web.BLL.WXXD
return new BXX.BXXProductManage().MdyProduct(inputData);
}
+
+ public string WXAddMdyAfterSale(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
+ string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
+ if (time1 != EncrypUtil.Encryption(time))
+ return "{\"code\":50000,\"msg\":\"校验失败\"}";
+
+ var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
+ if (string.IsNullOrEmpty(user_name))
+ {
+ return "{\"code\":50001,\"msg\":\"没有用户名\"}";
+ }
+
+ //int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
+ //int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
+ string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
+ string after_sale_json = RegexUtils.GetStringQuery(ref inputData, "after_sale_json")?.Replace("'", "\\'");
+ if (string.IsNullOrEmpty("coid"))
+ return "{\"code\":50001,\"msg\":\"没有售后编号\"}";
+ if (string.IsNullOrEmpty("after_sale_json"))
+ return "{\"code\":50001,\"msg\":\"没有售后信息\"}";
+
+ string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
+ MysqlUtils mySql = new MysqlUtils(conn);
+
+ string sql = "SELECT * FROM `wxxd`.`after_sale` where coid='" + coid + "'";
+
+ string where = "";
+ sql += where;
+
+ var dt = mySql.ExecuteDataTable(sql);
+ mySql.Close();
+
+ if (dt != null)
+ {
+ conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
+ mySql = new MysqlUtils(conn);
+ if (dt.Rows.Count == 0)
+ {
+ sql = "INSERT INTO `wxxd`.`after_sale` (coid,after_sale_json) VALUES (@coid,@after_sale_json);";
+ }
+ else
+ {
+ sql = "UPDATE `wxxd`.`after_sale` SET after_sale_json=@after_sale_json 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, });
+ mySql.ExecuteNonQuery(sql, paramLst.ToArray());
+ mySql.Close();
+ if (string.IsNullOrEmpty(mySql.Message))
+ {
+ return "{\"code\":200,\"msg\":\"success\",\"data\":\"\"}";
+ }
+ else
+ {
+ return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
+ }
+ }
+ else
+ {
+ return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
+ }
+ }
+ return "{\"code\":19999,\"msg\":\"输入为空\"}";
+ }
+
+ public string WXGetAfterSale(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
+ string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
+ if (time1 != EncrypUtil.Encryption(time))
+ return "{\"code\":50000,\"msg\":\"校验失败\"}";
+
+ var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
+ if (string.IsNullOrEmpty(user_name))
+ {
+ return "{\"code\":50001,\"msg\":\"没有用户名\"}";
+ }
+
+ //int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
+ //int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
+ string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.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 where = "";
+ sql += where;
+
+ var dt = mySql.ExecuteDataTable(sql);
+ mySql.Close();
+
+ if (dt != null)
+ {
+ try
+ {
+ string group_data = "";
+ foreach (DataRow row in dt.Rows)
+ {
+ group_data += row["after_sale_json"].ToString();
+ break;
+ }
+ var data = group_data.Trim(',');
+ return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + "}";
+ }
+ catch (Exception ex)
+ {
+ return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}";
+ }
+ }
+ else
+ {
+ return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
+ }
+ }
+ return "{\"code\":19999,\"msg\":\"输入为空\"}";
+ }
}
}
\ No newline at end of file
diff --git a/KJDService/KJD_WebService/BXXProductService.asmx.cs b/KJDService/KJD_WebService/BXXProductService.asmx.cs
index f655edb..69e3890 100644
--- a/KJDService/KJD_WebService/BXXProductService.asmx.cs
+++ b/KJDService/KJD_WebService/BXXProductService.asmx.cs
@@ -349,18 +349,6 @@ namespace KJD_Web
Context.Response.End();
}
- [WebMethod]
- public void get_wx_all_cate()
- {
- string jsontext = GetRequestJsonString();
-
- var result = jsontext;
- result = new BXXProductManage().GetWxAllCate(jsontext);
-
- Context.Response.Write(result);
- Context.Response.End();
- }
-
[WebMethod]
public void get_wx_tokens()
{
@@ -373,6 +361,18 @@ namespace KJD_Web
Context.Response.End();
}
+ [WebMethod]
+ public void get_wx_all_cate()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new BXXProductManage().WxApiGetWxAllCate(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
+
[WebMethod]
public void wx_api_category_classify()
{
diff --git a/KJDService/KJD_WebService/Model/DBProductResultParam.cs b/KJDService/KJD_WebService/Model/DBProductResultParam.cs
index 30c3acf..7ebb448 100644
--- a/KJDService/KJD_WebService/Model/DBProductResultParam.cs
+++ b/KJDService/KJD_WebService/Model/DBProductResultParam.cs
@@ -58,6 +58,10 @@ namespace KJD_Web.Model
public string product_json { get; set; }
public string size_json { get; set; }
public string sku_edit_json { get; set; }
+ ///
+ /// 微信推单商品和sku加密code信息
+ ///
+ public string sku_secret_json { get; set; }
public int sku_img_replace_id { get; set; }
public string sku_img_replace_base64 { get; set; }
public string sku_img_replace_url { get; set; }
@@ -84,5 +88,6 @@ namespace KJD_Web.Model
public string sale_count_text { get; set; }
public string wx_safe_status { get; set; }
public string special_prod_type { get; set; }
+ public int send_to_out_server { get; set; }
}
}
\ No newline at end of file
diff --git a/KJDService/KJD_WebService/Utils/HttpUtils.cs b/KJDService/KJD_WebService/Utils/HttpUtils.cs
index aa968b6..b2cea6e 100644
--- a/KJDService/KJD_WebService/Utils/HttpUtils.cs
+++ b/KJDService/KJD_WebService/Utils/HttpUtils.cs
@@ -99,6 +99,66 @@ namespace KJD_Web.Utils
return result;
}
+
+ public static string e57PostResponse(string _url, string _data, string referer)
+ {
+ HttpWebResponse response = null;
+ string result;
+ try
+ {
+ string url = _url;
+ HttpWebRequest request;
+ if (url.StartsWith("https", StringComparison.OrdinalIgnoreCase))
+ {
+ ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true;
+ ServicePointManager.SecurityProtocol =
+ ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
+ request = WebRequest.Create(url) as HttpWebRequest;
+ request.ProtocolVersion = HttpVersion.Version10;
+ }
+ else
+ request = (HttpWebRequest)WebRequest.Create(url);
+
+ request.KeepAlive = true;
+ request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36";
+ request.ContentType = "application/json";
+ request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"; //request.Accept = "*/*";
+ request.Referer = referer;
+ request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate");
+ request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9");
+
+ request.Method = "POST";
+ request.ServicePoint.Expect100Continue = false;
+
+ string body = _data;
+ byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body);
+ request.ContentLength = postBytes.Length;
+ Stream stream = request.GetRequestStream();
+ stream.Write(postBytes, 0, postBytes.Length);
+ stream.Close();
+
+ response = (HttpWebResponse)request.GetResponse();
+ }
+ catch (WebException ex)
+ {
+ if (ex.Status == WebExceptionStatus.ProtocolError)
+ {
+ response = (HttpWebResponse)ex.Response;
+ result = ReadResponse(response);
+ return result;
+ }
+ else return ex.Message;
+ }
+ catch (Exception e)
+ {
+ if (response != null) response.Close();
+ return e.Message;
+ }
+ result = ReadResponse(response);
+ return result;
+ }
+
public static string e57GetResponse(string _url, string referer)
{
HttpWebResponse response = null;
diff --git a/KJDService/KJD_WebService/WXProductService.asmx.cs b/KJDService/KJD_WebService/WXProductService.asmx.cs
index 75b0a7e..d9364a3 100644
--- a/KJDService/KJD_WebService/WXProductService.asmx.cs
+++ b/KJDService/KJD_WebService/WXProductService.asmx.cs
@@ -121,5 +121,29 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
+
+ //WXAddMdyAfterSale
+ [WebMethod]
+ public void wx_add_mdy_after_sale()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new WXProductManage().WXAddMdyAfterSale(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
+ [WebMethod]
+ public void wx_get_after_sale()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new WXProductManage().WXGetAfterSale(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
}
}
diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs
index c76ba27..b0d1037 100644
--- a/TEMUKJD/BLL/PDDProdFormConverter.cs
+++ b/TEMUKJD/BLL/PDDProdFormConverter.cs
@@ -2,6 +2,7 @@
using AllBase.Model.Result;
using AllBase.Model.Result.PDDResult;
using NaiBa.Util.Extension;
+using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -13,7 +14,14 @@ namespace TemuKJD.BLL
{
public class PDDProdFormConverter
{
- public string PddConvert(string outProdJson, bool UpdateOldData = true, string specialProdType = null)
+ ///
+ /// 拼多多前端采集转拼多多后台采集数据
+ ///
+ ///
+ ///
+ ///
+ ///
+ public string PddFrontToPddBackConvert(string outProdJson, bool UpdateOldData = true, string specialProdType = null)
{
PDDFrontProductInfo frontProdInfo = null;
try
@@ -377,5 +385,443 @@ namespace TemuKJD.BLL
}
return "";
}
+
+ public PDDProductInfo JstPddProdToPddConvert(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);
+
+ 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