From 9e1a354ee518aae1b191fae0bedc5896f8f91d44 Mon Sep 17 00:00:00 2001 From: wule Date: Wed, 14 Jan 2026 19:24:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B0=8F=E5=BA=97=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=95=86=E5=93=81=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/BaseClass.cs | 7 +- .../Param/WXParam/WXUploadProductParam.cs | 81 +- AllBase/Model/Result/KJDDBProduct.cs | 1 + .../BLL/BXX/BXXProductManage.cs | 24 +- .../BLL/KJD/ProductThirdManage.cs | 2 +- .../BLL/WXXD/WXProductManage.cs | 302 ++--- .../KJD_WebService/KJD_WebService.csproj.user | 2 +- .../Model/DBProductResultParam.cs | 1 + .../ProductThirdService.asmx.cs | 2 +- .../KJD_WebService/WXProductService.asmx.cs | 12 + TEMUKJD/BLL/PDDProdFormConverter.cs | 22 +- TEMUKJD/BLL/ShopBLL.cs | 27 + TEMUKJD/InitForm.Designer.cs | 5 +- TEMUKJD/InitForm.cs | 15 +- TEMUKJD/KJD.csproj | 3 + TEMUKJD/KJD.csproj.user | 2 +- TEMUKJD/MainForm.cs | 5 + .../PDDDBProdListForm.Designer.cs | 167 ++- .../ProductSelectForms/PDDDBProdListForm.cs | 74 +- .../ProductSelectForms/PDDDBProdListForm.resx | 3 + .../PDDDBProdUserSelectForm.cs | 4 +- TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs | 2 +- TEMUKJD/Properties/Resources.Designer.cs | 30 + TEMUKJD/Properties/Resources.resx | 9 + TEMUKJD/Resources/login_bg_wx.png | Bin 0 -> 11594 bytes TEMUKJD/Resources/main_form_logo_wx.png | Bin 0 -> 9890 bytes TEMUKJD/Resources/system_wx.png | Bin 0 -> 3664 bytes TEMUKJD/UserForm/LoginForm.cs | 2 + .../AdminForms/WXAdminForm.Designer.cs | 10 +- TEMUKJD/WXForms/AdminForms/WXAdminForm.cs | 12 +- .../WXDBProdUploadForm.Designer.cs | 627 ++++++---- .../ProductForms/WXDBProdUploadForm.cs | 1081 +++++++++++++++-- .../ProductForms/WXDBProdUploadForm.resx | 3 + TEMUKJD/WXForms/ShopForms/WXShopListForm.cs | 2 +- TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs | 5 +- 35 files changed, 1965 insertions(+), 579 deletions(-) create mode 100644 TEMUKJD/Resources/login_bg_wx.png create mode 100644 TEMUKJD/Resources/main_form_logo_wx.png create mode 100644 TEMUKJD/Resources/system_wx.png diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 8e224a3..68280ec 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 783; + public static int VersionCount = 787; //public static int VersionCount = 613; /// @@ -740,6 +740,11 @@ namespace AllBase return LoginApiUrl + "/" + file+ "?obj=" + BaseClass.MainPath + "/" + file; } + + public static string BuildPDDObjString(string file, bool IsLoginDef = false) + { + return LoginApiUrl + "/bxx_" + file + "?obj=" + BaseClass.MainPath + "/bxx_" + file; + } } public class KeyValueBase diff --git a/AllBase/Model/Param/WXParam/WXUploadProductParam.cs b/AllBase/Model/Param/WXParam/WXUploadProductParam.cs index f6115b7..65dabf8 100644 --- a/AllBase/Model/Param/WXParam/WXUploadProductParam.cs +++ b/AllBase/Model/Param/WXParam/WXUploadProductParam.cs @@ -10,7 +10,7 @@ namespace AllBase.Model.Param.WXParam { public int? from { get; set; } = 2; // 2, public WXProductParam product { get; set; } = new WXProductParam(); - public int? type { get; set; } = 0; + public int? type { get; set; } = 1; // 1 public bool? listingFlag { get; set; } = true; public bool? skipCheckAttr { get; set; } = true; public sessionInfoParam sessionInfo { get; set; } = new sessionInfoParam(); @@ -28,7 +28,7 @@ namespace AllBase.Model.Param.WXParam public productKeyParam productKey { get; set; } = new productKeyParam(); public int? status { get; set; } // 5, public int? editStatus { get; set; } // 4, - public string auditReason { get; set; } = ""; + public string auditReason { get; set; } // ""; public auditResultInfoParam auditResultInfo { get; set; } = new auditResultInfoParam(); public productInfoParam info { get; set; } = new productInfoParam(); public List productSkus { get; set; } = new List(); @@ -38,13 +38,14 @@ namespace AllBase.Model.Param.WXParam public class productSkuParam { - public string __skuKey { get; set; } // "尺码.M_颜色.蓝色", - public string __skuTitle { get; set; } // "蓝色 M", + public string __skuKey { get; set; } = "";// "尺码.M_颜色.蓝色", + public string __skuTitle { get; set; } = ""; // "蓝色 M", public bool? __skuSelected { get; set; } = true; public skuKeyParam skuKey { get; set; } = new skuKeyParam(); - public string skuId { get; set; } // "6134573242", + public string skuId { get; set; } = ""; // "6134573242", public productSkuInfoParam productSkuInfo { get; set; } = new productSkuInfoParam(); public int? status { get; set; } = 5; + public int? index { get; set; } = 0; } public class productSkuInfoParam @@ -54,8 +55,15 @@ namespace AllBase.Model.Param.WXParam public string skuCode { get; set; } = ""; public string barCode { get; set; } = ""; public stockInfoParam stockInfo { get; set; } = new stockInfoParam(); - public saleParamParam saleParam { get; set; } = new saleParamParam(); + public List saleParam { get; set; } = new List(); public skuDeliverInfoParam skuDeliverInfo { get; set; } = new skuDeliverInfoParam(); + public stockDiffParam stockDiff { get; set; } = new stockDiffParam(); + } + public class stockDiffParam + { + public int? diffType { get; set; } = 2; + public object num { get; set; } // null + } public class skuDeliverInfoParam @@ -85,7 +93,7 @@ namespace AllBase.Model.Param.WXParam public bool? isMainSale { get; set; } // true, public string name { get; set; } // "颜色", public int? id { get; set; } // 3, - public string catId { get; set; } // "颜色", + public long? catId { get; set; } // 2000000000028, public int? value { get; set; } // 0, public string label { get; set; } // "自定义规格", public int? priority { get; set; } // 1, @@ -112,12 +120,13 @@ namespace AllBase.Model.Param.WXParam } public class categoryValueParam { - public string catId { get; set; } // "1767670333303", + public long? catId { get; set; } // "1767670333303", public string name { get; set; } // "黑色", - public string fCatId { get; set; } // "2000000000006", + public long? fCatId { get; set; } // "2000000000006", public string catType { get; set; } // 0, public string brandCat { get; set; } // "0", public categoryValueCatInfo catInfo { get; set; } + public bool? selected { get; set; } public string desc { get; set; } = ""; public int? priority { get; set; } = 1; @@ -186,7 +195,7 @@ namespace AllBase.Model.Param.WXParam public class skuKeyParam { - public string skuId { get; set; } // "6134573242" + public string skuId { get; set; } = ""; // "6134573242" public productKeyDetailParam productKey { get; set; } } @@ -234,7 +243,7 @@ namespace AllBase.Model.Param.WXParam public recommendCategoryParam recommendCategory { get; set; } public string listingTime { get; set; } // "1767693374", public string totalStockNum { get; set; } // "0", - public serviceDescParam serviceDesc { get; set; } + public serviceDescParam serviceDesc { get; set; } = new serviceDescParam(); /// /// 运费信息 /// @@ -247,10 +256,11 @@ namespace AllBase.Model.Param.WXParam public string totalOrderNum { get; set; } = "0"; public string totalVisitNum { get; set; } = "0"; public int? uploadSource { get; set; } = 6; - public spuLimitedParam spuLimited { get; set; } + public spuLimitedParam spuLimited { get; set; } = new spuLimitedParam(); public int? originUploadSource { get; set; } = 6; public int? virtualType { get; set; } = 2; public int? productType { get; set; } = 1; + public couponcodeInfoParam couponcodeInfo { get; set; } = new couponcodeInfoParam(); /// /// extCode 货号 /// @@ -264,11 +274,11 @@ namespace AllBase.Model.Param.WXParam public int? presaleTag { get; set; } = 0; public int? presaleTagType { get; set; } = 0; public int? maxPresaleEndTime { get; set; } = 0; - public extraServiceParam extraService { get; set; } + public extraServiceParam extraService { get; set; } = new extraServiceParam(); /// /// 售后信息 /// - public afterSaleInfoParam afterSaleInfo { get; set; } + public afterSaleInfoParam afterSaleInfo { get; set; } = new afterSaleInfoParam(); public int? lastRefundOrderDays { get; set; } = 0; public string nodeCatId { get; set; } // "547705", public sizeChartInfoParam sizeChartInfo { get; set; } = new sizeChartInfoParam(); @@ -309,14 +319,16 @@ namespace AllBase.Model.Param.WXParam public int? auditFromPersonalTrans { get; set; } = 0; public bool? isClipEditGray { get; set; } = false; public List promotingVideoInfos { get; set; } = new List(); - public timingOnsaleInfoParam timingOnsaleInfo { get; set; } - public leagueItemInfoParam leagueItemInfo { get; set; } + public timingOnsaleInfoParam timingOnsaleInfo { get; set; } = new timingOnsaleInfoParam(); + public leagueItemInfoParam leagueItemInfo { get; set; } = new leagueItemInfoParam(); } public class timingOnsaleInfoParam { public int? status { get; set; } = 0; + public int? onsaleTime { get; set; } = 0; public int? isHidePrice { get; set; } = 0; + public int? isHideParam { get; set; } = 0; } @@ -371,10 +383,10 @@ namespace AllBase.Model.Param.WXParam public class extraServiceParam { - public int? sevenDayReturn { get; set; } = 1; - public int? payAfterUse { get; set; } = 1; + public int? sevenDayReturn { get; set; } = 1; // 七天无理由 + public int? payAfterUse { get; set; } = 0; // 1, 先用后付 public int? freightInsurance { get; set; } = 1; // 运费险 - public int? fastRefund { get; set; } = 1; // 快速退款 + public int? fastRefund { get; set; } = 0; // 1 快速退款 public int? damageGuarantee { get; set; } = 0; public int? fakeOnePayFour { get; set; } = 0; public int? refundOrderTime { get; set; } = 0; @@ -401,7 +413,8 @@ namespace AllBase.Model.Param.WXParam public class spuLimitedParam { public int periodType { get; set; } = 0; - public int limitedBuyNum { get; set; } = 0; + //public int limitedBuyNum { get; set; } = 0; + public string limitedBuyNum { get; set; } = ""; public int createTime { get; set; } = 0; public int updateTime { get; set; } = 0; } @@ -434,7 +447,7 @@ namespace AllBase.Model.Param.WXParam public class recommendCategoryParam { public bool? isAccepted { get; set; } = false; - public List categoryNames { get; set; } = new List(); + public List categoryNames { get; set; } = new List(); public string recommendSource { get; set; } = "none"; public string interfaceName { get; set; } = ""; public int? useNewInterface { get; set; } = 0; @@ -545,7 +558,7 @@ namespace AllBase.Model.Param.WXParam public class productDetailParam { - public List detailImg { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c863e00022b1f09b35b0e7ad91715000000a000004f50", ...] + public List detailImg { get; set; } = new List(); // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c863e00022b1f09b35b0e7ad91715000000a000004f50", ...] public List detailVideos { get; set; } = new List(); public List detailVideoInfo { get; set; } = new List(); public List carouselImg { get; set; } = new List(); @@ -590,23 +603,23 @@ namespace AllBase.Model.Param.WXParam public class propParam { - public List categorys { get; set; } + public List categorys { get; set; } = new List(); } public class categoryPropParam { - public string auditId { get; set; } // "0", - public string bizuin { get; set; } // "0", - public string brandCat { get; set; } // "0", - public string catId { get; set; } // "0", - public int? catType { get; set; } // 7, - public string createTime { get; set; } // "0", - public string desc { get; set; } // "", - public string fCatId { get; set; } // "0", + public string auditId { get; set; } = "0"; + public string bizuin { get; set; } = "0"; + public string brandCat { get; set; } = "0"; + public string catId { get; set; } = "0"; + public int? catType { get; set; } = 7; + public string createTime { get; set; } = "0"; + public string desc { get; set; } = ""; + public string fCatId { get; set; } = "0"; public string name { get; set; } // "款式", - public int? priority { get; set; } // 0, - public string updateTime { get; set; } // "0", - public int? version { get; set; } // 0, + public int? priority { get; set; } = 0; + public string updateTime { get; set; } = "0"; + public int? version { get; set; } = 0; public catInfoParam catInfo { get; set; } // { "inputType": 1, "isRequired": 1, "isCustomize": 0 } } diff --git a/AllBase/Model/Result/KJDDBProduct.cs b/AllBase/Model/Result/KJDDBProduct.cs index 39a4783..82c2957 100644 --- a/AllBase/Model/Result/KJDDBProduct.cs +++ b/AllBase/Model/Result/KJDDBProduct.cs @@ -68,5 +68,6 @@ namespace AllBase.Model.Result public int? sale_count { get; set; } public string sale_count_text { get; set; } + public string wx_safe_status { get; set; } } } diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs index ab6d246..24dca2d 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs @@ -40,8 +40,8 @@ namespace KJD_Web.BLL.BXX string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img"))?.Replace("'", "\\'"); string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); string product_get_type = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_get_type"))?.Replace("'", "\\'"); - string sale_count = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_get_type"))?.Replace("'", "\\'"); - string sale_count_text = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_get_type"))?.Replace("'", "\\'"); + string sale_count = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sale_count"))?.Replace("'", "\\'"); + string sale_count_text = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sale_count_text"))?.Replace("'", "\\'"); if (string.IsNullOrEmpty(product_get_type)) { product_get_type = "母店采集"; @@ -106,6 +106,7 @@ namespace KJD_Web.BLL.BXX string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); string sale_count = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sale_count"))?.Replace("'", "\\'"); string sale_count_text = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sale_count_text"))?.Replace("'", "\\'"); + string wx_safe_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_safe_status"))?.Replace("'", "\\'"); if (string.IsNullOrEmpty(user_name)) { @@ -147,6 +148,8 @@ namespace KJD_Web.BLL.BXX sql += " p.sale_count='" + sale_count + "',"; if (sale_count_text != null) sql += " p.sale_count_text='" + sale_count_text + "',"; + if (wx_safe_status != null) + sql += " p.wx_safe_status='" + wx_safe_status + "',"; sql += " p.mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',"; sql = sql.TrimEnd(','); sql += " where spu_id='" + spu_id + "';"; @@ -188,6 +191,7 @@ namespace KJD_Web.BLL.BXX var from_shop_id = RegexUtils.GetStringQuery(ref inputData, "from_shop_id")?.Replace("'", "\\'"); var product_get_type = RegexUtils.GetStringQuery(ref inputData, "product_get_type")?.Replace("'", "\\'"); var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'"); + var wx_safe_status = RegexUtils.GetStringQuery(ref inputData, "wx_safe_status")?.Replace("'", "\\'"); int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); @@ -216,6 +220,8 @@ namespace KJD_Web.BLL.BXX where += " and p.from_shop_id ='" + from_shop_id + "'"; if (!string.IsNullOrEmpty(product_get_type)) where += " and p.product_get_type ='" + product_get_type + "'"; + if (!string.IsNullOrEmpty(wx_safe_status)) + where += " and p.wx_safe_status ='" + wx_safe_status + "'"; if (!string.IsNullOrEmpty(search_db_ids)) where += " and p.id in (" + search_db_ids + ")"; sql += where; @@ -236,7 +242,7 @@ namespace KJD_Web.BLL.BXX " where p.is_del=0"; else if (string.IsNullOrEmpty(get_select_count)) 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.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,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" + @@ -244,7 +250,7 @@ namespace KJD_Web.BLL.BXX " where p.is_del=0"; else 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.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,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 + "' " + @@ -300,6 +306,7 @@ namespace KJD_Web.BLL.BXX product_get_type_text = row["product_get_type"].ToString(), sale_count = row["sale_count"].ParseToInt(), sale_count_text = row["sale_count_text"].ToString(), + wx_safe_status = row["wx_safe_status"].ToString(), }; if (isDetail) { @@ -552,6 +559,7 @@ namespace KJD_Web.BLL.BXX var in_groups = RegexUtils.GetStringQuery(ref inputData, "in_groups")?.Replace("'", "\\'"); var in_cates = RegexUtils.GetStringQuery(ref inputData, "in_cates")?.Replace("'", "\\'"); var product_get_type = RegexUtils.GetStringQuery(ref inputData, "product_get_type")?.Replace("'", "\\'"); + var wx_safe_status = RegexUtils.GetStringQuery(ref inputData, "wx_safe_status")?.Replace("'", "\\'"); int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); @@ -584,6 +592,8 @@ namespace KJD_Web.BLL.BXX } if (!string.IsNullOrEmpty(product_get_type)) where += " and p.product_get_type ='" + product_get_type + "'"; + if (!string.IsNullOrEmpty(wx_safe_status)) + where += " and p.wx_safe_status ='" + wx_safe_status + "'"; sql += where; @@ -598,7 +608,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.group,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.product_get_type,p.sale_count,p.sale_count_text," + - "p.fission_words,p.head_words,p.end_words from bxx.product p where p.is_del=0"; + "p.fission_words,p.head_words,p.end_words,p.wx_safe_status from bxx.product p where p.is_del=0"; //where子句 sql += where; @@ -643,6 +653,7 @@ namespace KJD_Web.BLL.BXX product_get_type_text = row["product_get_type"].ParseToString(), sale_count = row["sale_count"].ParseToInt(), sale_count_text = row["sale_count_text"].ToString(), + wx_safe_status = row["wx_safe_status"].ToString(), }; productLst.Add(prod); } @@ -858,6 +869,7 @@ namespace KJD_Web.BLL.BXX string head_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "head_words"))?.Replace("'", "\\'"); string end_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "end_words"))?.Replace("'", "\\'"); string sku_edit_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_edit_json"))?.Replace("'", "\\'"); + string wx_safe_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_safe_status"))?.Replace("'", "\\'"); if (string.IsNullOrEmpty(user_name)) { @@ -883,6 +895,8 @@ namespace KJD_Web.BLL.BXX sql += " p.end_words='" + end_words + "',"; if (sku_edit_json != null) sql += " p.sku_edit_json='" + sku_edit_json + "',"; + if (wx_safe_status != null) + sql += " p.wx_safe_status='" + wx_safe_status + "',"; sql = sql.TrimEnd(','); if (in_db_ids != null) { diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs index 36e7ef1..4b31a46 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs @@ -15,7 +15,7 @@ namespace KJD_Web.BLL { public class ProductThirdManage { - public string AddProduct(string inputData) + public string AddOrMdyProduct(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 5897690..31b57b1 100644 --- a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs @@ -16,162 +16,164 @@ namespace KJD_Web.BLL.WXXD { public string WXGetPDDProductList(string inputData, bool isDetail = false) { - 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\":\"校验失败\"}"; + return new BLL.BXX.BXXProductManage().GetProductList(inputData, isDetail); - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'","\\'"); - 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_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("'", "\\'"); - var search_group = RegexUtils.GetStringQuery(ref inputData, "search_group")?.Replace("'", "\\'"); - var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'"); - var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'"); - var get_select_count = RegexUtils.GetStringQuery(ref inputData, "get_select_count")?.Replace("'", "\\'"); - var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'"); - var from_shop_id = RegexUtils.GetStringQuery(ref inputData, "from_shop_id")?.Replace("'", "\\'"); - var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'"); + //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\":\"校验失败\"}"; - int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + // var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'","\\'"); + // 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_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("'", "\\'"); + // var search_group = RegexUtils.GetStringQuery(ref inputData, "search_group")?.Replace("'", "\\'"); + // var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'"); + // var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'"); + // var get_select_count = RegexUtils.GetStringQuery(ref inputData, "get_select_count")?.Replace("'", "\\'"); + // var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'"); + // var from_shop_id = RegexUtils.GetStringQuery(ref inputData, "from_shop_id")?.Replace("'", "\\'"); + // var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'"); - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); + // int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + // int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); - string sql = "select count(id) from bxx.product p where p.is_del=0"; + // string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + // MysqlUtils mySql = new MysqlUtils(conn); - string where = ""; - if (!string.IsNullOrWhiteSpace(search_spu)) - 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_cat)) - where += " and p.cat_name like '%" + search_cat + "%'"; - if (!string.IsNullOrWhiteSpace(search_ext_code)) - where += " and p.ext_code like '%" + search_ext_code + "%'"; - if (!string.IsNullOrWhiteSpace(search_prod_name)) - where += " and p.product_name like '%" + search_prod_name + "%'"; - if (!string.IsNullOrWhiteSpace(search_group)) - where += " and p.group like '%" + search_group + "%'"; - if (!string.IsNullOrWhiteSpace(search_notes)) - where += " and p.notes like '%" + search_notes + "%'"; - if (!string.IsNullOrEmpty(from_shop_id)) - where += " and p.from_shop_id ='" + from_shop_id + "'"; - if (!string.IsNullOrEmpty(search_db_ids)) - where += " and p.id in (" + search_db_ids + ")"; - sql += where; + // string sql = "select count(id) from bxx.product p where p.is_del=0"; - var count = mySql.ExecuteRowCount(sql); + // string where = ""; + // if (!string.IsNullOrWhiteSpace(search_spu)) + // 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_cat)) + // where += " and p.cat_name like '%" + search_cat + "%'"; + // if (!string.IsNullOrWhiteSpace(search_ext_code)) + // where += " and p.ext_code like '%" + search_ext_code + "%'"; + // if (!string.IsNullOrWhiteSpace(search_prod_name)) + // where += " and p.product_name like '%" + search_prod_name + "%'"; + // if (!string.IsNullOrWhiteSpace(search_group)) + // where += " and p.group like '%" + search_group + "%'"; + // if (!string.IsNullOrWhiteSpace(search_notes)) + // where += " and p.notes like '%" + search_notes + "%'"; + // if (!string.IsNullOrEmpty(from_shop_id)) + // where += " and p.from_shop_id ='" + from_shop_id + "'"; + // if (!string.IsNullOrEmpty(search_db_ids)) + // where += " and p.id in (" + search_db_ids + ")"; + // sql += where; - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - if (isDetail) - sql = "select p.*,s.img_base64,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" + - " LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" + - " where p.is_del=0"; - else if (string.IsNullOrEmpty(get_select_count)) - 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,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" + - " LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" + - " where p.is_del=0"; - else - 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,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" + - " WHERE p.is_del=0"; + // var count = mySql.ExecuteRowCount(sql); + + // DataTable dt; + // if (count == 0) + // { + // dt = new DataTable(); + // } + // else + // { + // if (isDetail) + // sql = "select p.*,s.img_base64,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" + + // " LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" + + // " where p.is_del=0"; + // else if (string.IsNullOrEmpty(get_select_count)) + // 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,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" + + // " LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" + + // " where p.is_del=0"; + // else + // 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,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" + + // " WHERE p.is_del=0"; - //where子句 - sql += where; + // //where子句 + // sql += where; - if (!isDetail && !string.IsNullOrEmpty(get_select_count)) - sql += " group by p.id"; - if (sort_field == "select_total_count") - sql += " order by p.select_total_count desc, p.id desc"; - else - sql += " order by p.id desc"; - sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; - dt = mySql.ExecuteDataTable(sql); - } + // if (!isDetail && !string.IsNullOrEmpty(get_select_count)) + // sql += " group by p.id"; + // if (sort_field == "select_total_count") + // sql += " order by p.select_total_count desc, p.id desc"; + // else + // sql += " order by p.id desc"; + // sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; + // dt = mySql.ExecuteDataTable(sql); + // } - mySql.Close(); - if (dt != null) - { - try - { - List productLst = new List(); - foreach (DataRow row in dt.Rows) - { - DBProductResultParam prod = new DBProductResultParam - { - id = Convert.ToInt32(row["id"]), - from_shop_id = row["from_shop_id"].ToString(), - skc_id = row["skc_id"].ToString(), - spu_id = row["spu_id"].ToString(), - cat_id = row["cat_id"].ToString(), - cat_name = row["cat_name"].ToString(), - product_name = row["product_name"].ToString(), - main_img = row["main_img"].ToString(), - ext_code = row["ext_code"].ToString(), - ext_code_price = row["ext_code_price"].IsNullOrEmpty() ? new int?() : row["ext_code_price"].ParseToInt(), - price_text = row["price_text"].ToString(), - //product_json = row["product_json"].ToString(), - //size_json = row["size_json"].ToString(), - add_time = Convert.ToDateTime(row["add_time"]), - mdy_time = Convert.ToDateTime(row["mdy_time"]), - notes = row["notes"].ToString(), - group = row["group"].ToString(), - select_total_count = row["select_total_count"].ParseToInt(), - end_words = row["end_words"].ParseToString(), - fission_words = row["fission_words"].ParseToString(), - head_words = row["head_words"].ParseToString(), - sku_img_replace_id = row["sku_img_replace_id"].ParseToInt(), - sku_img_replace_url = row["img_url"].ToString(), - product_get_type_text = row["product_get_type"].ToString(), - }; - 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_img_replace_base64 = row["img_base64"].ToString(); - //prod.sku_img_replace_url = row["img_url"].ToString(); - } - if (!string.IsNullOrEmpty(get_select_count)) - { - prod.select_count = row["select_count"].ParseToInt(); - } - productLst.Add(prod); - } - var data = JsonUtils.SerializerObjectToString(productLst); - return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; - } - catch (Exception ex) - { - return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}"; - } - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; + // mySql.Close(); + // if (dt != null) + // { + // try + // { + // List productLst = new List(); + // foreach (DataRow row in dt.Rows) + // { + // DBProductResultParam prod = new DBProductResultParam + // { + // id = Convert.ToInt32(row["id"]), + // from_shop_id = row["from_shop_id"].ToString(), + // skc_id = row["skc_id"].ToString(), + // spu_id = row["spu_id"].ToString(), + // cat_id = row["cat_id"].ToString(), + // cat_name = row["cat_name"].ToString(), + // product_name = row["product_name"].ToString(), + // main_img = row["main_img"].ToString(), + // ext_code = row["ext_code"].ToString(), + // ext_code_price = row["ext_code_price"].IsNullOrEmpty() ? new int?() : row["ext_code_price"].ParseToInt(), + // price_text = row["price_text"].ToString(), + // //product_json = row["product_json"].ToString(), + // //size_json = row["size_json"].ToString(), + // add_time = Convert.ToDateTime(row["add_time"]), + // mdy_time = Convert.ToDateTime(row["mdy_time"]), + // notes = row["notes"].ToString(), + // group = row["group"].ToString(), + // select_total_count = row["select_total_count"].ParseToInt(), + // end_words = row["end_words"].ParseToString(), + // fission_words = row["fission_words"].ParseToString(), + // head_words = row["head_words"].ParseToString(), + // sku_img_replace_id = row["sku_img_replace_id"].ParseToInt(), + // sku_img_replace_url = row["img_url"].ToString(), + // product_get_type_text = row["product_get_type"].ToString(), + // }; + // 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_img_replace_base64 = row["img_base64"].ToString(); + // //prod.sku_img_replace_url = row["img_url"].ToString(); + // } + // if (!string.IsNullOrEmpty(get_select_count)) + // { + // prod.select_count = row["select_count"].ParseToInt(); + // } + // productLst.Add(prod); + // } + // var data = JsonUtils.SerializerObjectToString(productLst); + // return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + // } + // catch (Exception ex) + // { + // return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + // } + // } + // else + // { + // return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + // } + //} + //return "{\"code\":19999,\"msg\":\"输入为空\"}"; } public string WXGetPDDProductGroups(string inputData) @@ -289,6 +291,8 @@ namespace KJD_Web.BLL.WXXD /// public string WXGetPDDProductListRandom(string inputData) { + return new BXX.BXXProductManage().GetProductListRandom(inputData); + /* if (!string.IsNullOrEmpty(inputData)) { var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); @@ -405,6 +409,12 @@ namespace KJD_Web.BLL.WXXD } } return "{\"code\":19999,\"msg\":\"输入为空\"}"; + */ + } + + public String WXMdyPDDProduct(string inputData) + { + return new BXX.BXXProductManage().MdyProduct(inputData); } } diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj.user b/KJDService/KJD_WebService/KJD_WebService.csproj.user index 1b87364..4bcdc04 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj.user +++ b/KJDService/KJD_WebService/KJD_WebService.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU ShowAllFiles diff --git a/KJDService/KJD_WebService/Model/DBProductResultParam.cs b/KJDService/KJD_WebService/Model/DBProductResultParam.cs index 49ba650..e5c68c0 100644 --- a/KJDService/KJD_WebService/Model/DBProductResultParam.cs +++ b/KJDService/KJD_WebService/Model/DBProductResultParam.cs @@ -75,5 +75,6 @@ namespace KJD_Web.Model public int sale_count { get; set; } public string sale_count_text { get; set; } + public string wx_safe_status { get; set; } } } \ No newline at end of file diff --git a/KJDService/KJD_WebService/ProductThirdService.asmx.cs b/KJDService/KJD_WebService/ProductThirdService.asmx.cs index 0a9ea6e..9fefeca 100644 --- a/KJDService/KJD_WebService/ProductThirdService.asmx.cs +++ b/KJDService/KJD_WebService/ProductThirdService.asmx.cs @@ -78,7 +78,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new ProductThirdManage().AddProduct(jsontext); + result = new ProductThirdManage().AddOrMdyProduct(jsontext); Context.Response.Write(result); Context.Response.End(); diff --git a/KJDService/KJD_WebService/WXProductService.asmx.cs b/KJDService/KJD_WebService/WXProductService.asmx.cs index 080b8ea..75b0a7e 100644 --- a/KJDService/KJD_WebService/WXProductService.asmx.cs +++ b/KJDService/KJD_WebService/WXProductService.asmx.cs @@ -109,5 +109,17 @@ namespace KJD_Web Context.Response.Write(result); Context.Response.End(); } + + [WebMethod] + public void mdy_pdd_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXMdyPDDProduct(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } } } diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs index 787f713..f548e92 100644 --- a/TEMUKJD/BLL/PDDProdFormConverter.cs +++ b/TEMUKJD/BLL/PDDProdFormConverter.cs @@ -95,18 +95,18 @@ namespace TemuKJD.BLL } else { - string getImgError; - var image = GetHtml.GetUrlImg(frontGallery.url.Replace("https://", "http://"), out getImgError); - if (!string.IsNullOrEmpty(getImgError)) - { - return getImgError; - } + //string getImgError; + //var image = GetHtml.GetUrlImg(frontGallery.url.Replace("https://", "http://"), out getImgError); + //if (!string.IsNullOrEmpty(getImgError)) + //{ + // return getImgError; + //} prodInfo.detail.galleries.Add(new gallery_item() { url = frontGallery.url, type = frontGallery.type, - width = image.Width, - height = image.Height, + //width = image.Width, + //height = image.Height, }); } galleryIndex++; @@ -318,7 +318,7 @@ namespace TemuKJD.BLL dbProd.product_json = JsonHelper.SerializeObject(prodInfo); bool isExist = false; - var existUrl = BaseClass.BuildObjString("product/get_product_list"); + var existUrl = BaseClass.BuildPDDObjString("product/get_product_list"); string existData = UserLogin.GetSignaturex() + "&search_spu=" + prodInfo.detail.goods_id; string html = GetHtml.PostUtf8(existUrl, existData); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -335,12 +335,12 @@ namespace TemuKJD.BLL return "入库失败,产品数据库已存在商品查询失败"; } - var url = BaseClass.BuildObjString("product/add_product"); + var url = BaseClass.BuildPDDObjString("product/add_product"); if (isExist) { if (UpdateOldData) { - url = BaseClass.BuildObjString("product/mdy_product"); + url = BaseClass.BuildPDDObjString("product/mdy_product"); } else { diff --git a/TEMUKJD/BLL/ShopBLL.cs b/TEMUKJD/BLL/ShopBLL.cs index fc0e26e..1f238a4 100644 --- a/TEMUKJD/BLL/ShopBLL.cs +++ b/TEMUKJD/BLL/ShopBLL.cs @@ -83,6 +83,33 @@ namespace TemuKJD.BLL return result; } + + public static string MdyPDDServerShopSubInfo(ShopLoginInfo _shop) + { + var url = BaseClass.BuildObjString("shop/mdy_shop"); + var data = UserLogin.GetSignaturex(); + data += "&login_name=" + _shop.LoginName; + data += "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password); + data += "¬es=" + GetHtml.UrlEncodeUtf8(_shop.Notes); + data += "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.GroupName); + data += "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName); + + + var result = GetHtml.PostUtf8(url, data); + if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在")) + result = GetHtml.PostUtf8(url, data); + if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在")) + result = GetHtml.PostUtf8(url, data); + if (!result.Contains("\"code\":200")) + { + var msg = BaseRegex.GetStringJson(ref result, "msg"); + if (string.IsNullOrEmpty(msg)) + msg = "店铺保存失败!"; + BaseMsgForm.ShowError(msg); + } + return result; + } + public static string MdyAntiContent(ShopLoginInfo shop) { var urlAddress = BaseClass.BuildObjString("shop/mdy_anti_content"); diff --git a/TEMUKJD/InitForm.Designer.cs b/TEMUKJD/InitForm.Designer.cs index f428044..c21b965 100644 --- a/TEMUKJD/InitForm.Designer.cs +++ b/TEMUKJD/InitForm.Designer.cs @@ -136,14 +136,15 @@ this.rbPdd.TabIndex = 27; this.rbPdd.Text = "拼多多"; this.rbPdd.UseVisualStyleBackColor = true; + this.rbPdd.Visible = false; // - // rbSPH + // rbWX // this.rbWX.AutoSize = true; this.rbWX.ForeColor = System.Drawing.SystemColors.InfoText; this.rbWX.Location = new System.Drawing.Point(120, 0); this.rbWX.Margin = new System.Windows.Forms.Padding(0); - this.rbWX.Name = "rbSPH"; + this.rbWX.Name = "rbWX"; this.rbWX.Size = new System.Drawing.Size(62, 21); this.rbWX.TabIndex = 28; this.rbWX.Text = "视频号"; diff --git a/TEMUKJD/InitForm.cs b/TEMUKJD/InitForm.cs index f425477..6b47a84 100644 --- a/TEMUKJD/InitForm.cs +++ b/TEMUKJD/InitForm.cs @@ -32,10 +32,18 @@ namespace TemuKJD { this.panel3.Location = new Point(4, 4); this.panel4.Visible = true; + this.rbPdd.Visible = true; + } + if (File.Exists(System.Environment.CurrentDirectory + "\\WxChoice.dll")) + { + this.panel3.Location = new Point(4, 4); + this.panel4.Visible = true; + this.rbWX.Visible = true; } #if DEBUG this.panel3.Location = new Point(4, 4); - this.panel4.Visible=true; + this.panel4.Visible = true; + this.rbPdd.Visible = true; this.rbWX.Visible = true; #endif initFormSettings = ConfigHelper.LoadConfig("initFormSettings"); @@ -48,7 +56,7 @@ namespace TemuKJD this.rbTemu.CheckedChanged += rbTemu_CheckedChanged; this.rbPdd.CheckedChanged += rbTemu_CheckedChanged; this.rbWX.CheckedChanged += rbTemu_CheckedChanged; - if (rbWX.Visible == false) + if (rbWX.Visible == false || rbPdd.Visible == false) flowLayoutPanel1.Location = new Point(38, flowLayoutPanel1.Location.Y); Task.Run(() => @@ -133,6 +141,9 @@ namespace TemuKJD bool isChangeType = false; private void rbTemu_CheckedChanged(object sender, EventArgs e) { + if ((sender as RadioButton).Checked == false) + return; + string newLoginType = "Temu"; if (sender == rbTemu && rbTemu.Checked) newLoginType = "Temu"; diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index d68620a..7e7e32f 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -1435,10 +1435,13 @@ + + + diff --git a/TEMUKJD/KJD.csproj.user b/TEMUKJD/KJD.csproj.user index cebb4cf..7a74901 100644 --- a/TEMUKJD/KJD.csproj.user +++ b/TEMUKJD/KJD.csproj.user @@ -1,7 +1,7 @@  - ProjectFiles + ShowAllFiles publish\ diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs index ccb6f84..b2fa879 100644 --- a/TEMUKJD/MainForm.cs +++ b/TEMUKJD/MainForm.cs @@ -236,6 +236,11 @@ namespace TemuKJD BaseClass.LogoImage = Properties.Resources.main_form_logo_pdd; BaseClass.Ico = Icon.FromHandle(Properties.Resources.system_pdd.GetHicon()); } + if (BaseClass.MainPath == "weixin") + { + BaseClass.LogoImage = Properties.Resources.main_form_logo_wx; + BaseClass.Ico = Icon.FromHandle(Properties.Resources.system_wx.GetHicon()); + } Rectangle rect = Screen.GetWorkingArea(this); int width = rect.Width; diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs index cbe3f1d..b1ad326 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs @@ -39,6 +39,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDDBProdListForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.cmbSetWxSafe = new System.Windows.Forms.ComboBox(); + this.btnSetWxSafe = new DevComponents.DotNetBar.PanelEx(); this.btnImport = new DevComponents.DotNetBar.PanelEx(); this.chkHighestPriceSku = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkSameSpecPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -47,6 +49,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.label8 = new System.Windows.Forms.Label(); this.txtReplaceText = new System.Windows.Forms.TextBox(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.cmbWxSafe = new System.Windows.Forms.ComboBox(); + this.lblWxSafe = new System.Windows.Forms.Label(); this.cmbSourceType = new System.Windows.Forms.ComboBox(); this.label10 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); @@ -109,6 +113,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colEndWords = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colFissionWords = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colGetType = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colWxSafe = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMdyTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn(); @@ -140,6 +145,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.cmbSetWxSafe); + this.splitContainer1.Panel1.Controls.Add(this.btnSetWxSafe); this.splitContainer1.Panel1.Controls.Add(this.btnImport); this.splitContainer1.Panel1.Controls.Add(this.chkHighestPriceSku); this.splitContainer1.Panel1.Controls.Add(this.chkSameSpecPrice); @@ -161,6 +168,46 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer1.SplitterDistance = 76; this.splitContainer1.TabIndex = 1; // + // cmbSetWxSafe + // + this.cmbSetWxSafe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.cmbSetWxSafe.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbSetWxSafe.FormattingEnabled = true; + this.cmbSetWxSafe.Items.AddRange(new object[] { + "安全商品", + "违规商品", + "未校验"}); + this.cmbSetWxSafe.Location = new System.Drawing.Point(750, 44); + this.cmbSetWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.cmbSetWxSafe.Name = "cmbSetWxSafe"; + this.cmbSetWxSafe.Size = new System.Drawing.Size(85, 25); + this.cmbSetWxSafe.TabIndex = 758; + // + // btnSetWxSafe + // + this.btnSetWxSafe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSetWxSafe.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSetWxSafe.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSetWxSafe.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSetWxSafe.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSetWxSafe.Location = new System.Drawing.Point(837, 44); + this.btnSetWxSafe.Name = "btnSetWxSafe"; + this.btnSetWxSafe.Size = new System.Drawing.Size(84, 25); + this.btnSetWxSafe.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSetWxSafe.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSetWxSafe.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSetWxSafe.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSetWxSafe.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSetWxSafe.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSetWxSafe.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSetWxSafe.Style.GradientAngle = 90; + this.btnSetWxSafe.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSetWxSafe.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSetWxSafe.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSetWxSafe.TabIndex = 757; + this.btnSetWxSafe.Text = "设置微信安检"; + this.btnSetWxSafe.Click += new System.EventHandler(this.btnSetWxSafe_Click); + // // btnImport // this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -168,7 +215,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnImport.Cursor = System.Windows.Forms.Cursors.Hand; this.btnImport.DisabledBackColor = System.Drawing.Color.Empty; this.btnImport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnImport.Location = new System.Drawing.Point(1045, 25); + this.btnImport.Location = new System.Drawing.Point(1045, 26); this.btnImport.Name = "btnImport"; this.btnImport.Size = new System.Drawing.Size(84, 25); this.btnImport.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -192,7 +239,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.chkHighestPriceSku.AutoSize = true; this.chkHighestPriceSku.Checked = true; this.chkHighestPriceSku.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkHighestPriceSku.Location = new System.Drawing.Point(1235, 52); + this.chkHighestPriceSku.Location = new System.Drawing.Point(1235, 53); this.chkHighestPriceSku.Name = "chkHighestPriceSku"; this.chkHighestPriceSku.Size = new System.Drawing.Size(119, 21); this.chkHighestPriceSku.TabIndex = 728; @@ -205,7 +252,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.chkSameSpecPrice.AutoSize = true; this.chkSameSpecPrice.Checked = true; this.chkSameSpecPrice.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkSameSpecPrice.Location = new System.Drawing.Point(1141, 52); + this.chkSameSpecPrice.Location = new System.Drawing.Point(1141, 53); this.chkSameSpecPrice.Name = "chkSameSpecPrice"; this.chkSameSpecPrice.Size = new System.Drawing.Size(99, 21); this.chkSameSpecPrice.TabIndex = 718; @@ -216,7 +263,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(1268, 31); + this.label9.Location = new System.Drawing.Point(1268, 32); this.label9.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(76, 17); @@ -226,7 +273,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // txtMinPrice // this.txtMinPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txtMinPrice.Location = new System.Drawing.Point(1235, 28); + this.txtMinPrice.Location = new System.Drawing.Point(1235, 29); this.txtMinPrice.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtMinPrice.Name = "txtMinPrice"; this.txtMinPrice.Size = new System.Drawing.Size(33, 23); @@ -237,7 +284,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(1138, 31); + this.label8.Location = new System.Drawing.Point(1138, 32); this.label8.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(104, 17); @@ -247,7 +294,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // txtReplaceText // this.txtReplaceText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txtReplaceText.Location = new System.Drawing.Point(1235, 4); + this.txtReplaceText.Location = new System.Drawing.Point(1235, 5); this.txtReplaceText.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtReplaceText.Name = "txtReplaceText"; this.txtReplaceText.Size = new System.Drawing.Size(104, 23); @@ -273,6 +320,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.Controls.Add(this.cmbWxSafe, 7, 1); + this.tableLayoutPanel1.Controls.Add(this.lblWxSafe, 6, 1); this.tableLayoutPanel1.Controls.Add(this.cmbSourceType, 5, 1); this.tableLayoutPanel1.Controls.Add(this.label10, 4, 1); this.tableLayoutPanel1.Controls.Add(this.label5, 0, 0); @@ -291,7 +340,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.tableLayoutPanel1.Controls.Add(this.txtNotes, 1, 1); this.tableLayoutPanel1.Controls.Add(this.lblGroup, 2, 1); this.tableLayoutPanel1.Controls.Add(this.cmbGroupFilter, 3, 1); - this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 2); + this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 4); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); @@ -299,27 +348,52 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.tableLayoutPanel1.Size = new System.Drawing.Size(727, 71); this.tableLayoutPanel1.TabIndex = 679; // + // cmbWxSafe + // + this.cmbWxSafe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.cmbWxSafe.FormattingEnabled = true; + this.cmbWxSafe.Items.AddRange(new object[] { + "", + "安全商品", + "违规商品", + "未校验"}); + this.cmbWxSafe.Location = new System.Drawing.Point(423, 40); + this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.cmbWxSafe.Name = "cmbWxSafe"; + this.cmbWxSafe.Size = new System.Drawing.Size(63, 25); + this.cmbWxSafe.TabIndex = 676; + // + // lblWxSafe + // + this.lblWxSafe.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblWxSafe.AutoSize = true; + this.lblWxSafe.Location = new System.Drawing.Point(355, 44); + this.lblWxSafe.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.lblWxSafe.Name = "lblWxSafe"; + this.lblWxSafe.Size = new System.Drawing.Size(68, 17); + this.lblWxSafe.TabIndex = 651; + this.lblWxSafe.Text = "微信安检:"; + // // cmbSourceType // this.cmbSourceType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbSourceType.FormattingEnabled = true; this.cmbSourceType.Items.AddRange(new object[] { - "全部", + "", "母店采集", "机会商品", "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(296, 40); + this.cmbSourceType.Location = new System.Drawing.Point(286, 40); this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSourceType.Name = "cmbSourceType"; - this.cmbSourceType.Size = new System.Drawing.Size(68, 25); + this.cmbSourceType.Size = new System.Drawing.Size(63, 25); this.cmbSourceType.TabIndex = 654; - this.cmbSourceType.Text = "全部"; // // label10 // this.label10.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(252, 44); + this.label10.Location = new System.Drawing.Point(242, 44); this.label10.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(44, 17); @@ -343,14 +417,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.txtSPU.Location = new System.Drawing.Point(60, 6); this.txtSPU.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtSPU.Name = "txtSPU"; - this.txtSPU.Size = new System.Drawing.Size(68, 23); + this.txtSPU.Size = new System.Drawing.Size(63, 23); this.txtSPU.TabIndex = 434; // // label2 // this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(134, 9); + this.label2.Location = new System.Drawing.Point(129, 9); this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(44, 17); @@ -360,17 +434,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms // txtCat // this.txtCat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtCat.Location = new System.Drawing.Point(178, 6); + this.txtCat.Location = new System.Drawing.Point(173, 6); this.txtCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtCat.Name = "txtCat"; - this.txtCat.Size = new System.Drawing.Size(68, 23); + this.txtCat.Size = new System.Drawing.Size(63, 23); this.txtCat.TabIndex = 425; // // label3 // this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(252, 9); + this.label3.Location = new System.Drawing.Point(242, 9); this.label3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(44, 17); @@ -380,17 +454,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms // txtProdName // this.txtProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtProdName.Location = new System.Drawing.Point(296, 6); + this.txtProdName.Location = new System.Drawing.Point(286, 6); this.txtProdName.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtProdName.Name = "txtProdName"; - this.txtProdName.Size = new System.Drawing.Size(68, 23); + this.txtProdName.Size = new System.Drawing.Size(63, 23); this.txtProdName.TabIndex = 427; // // label4 // - this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label4.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(370, 9); + this.label4.Location = new System.Drawing.Point(379, 9); this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(44, 17); @@ -400,17 +474,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms // txtExtCode // this.txtExtCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtExtCode.Location = new System.Drawing.Point(414, 6); + this.txtExtCode.Location = new System.Drawing.Point(423, 6); this.txtExtCode.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtExtCode.Name = "txtExtCode"; - this.txtExtCode.Size = new System.Drawing.Size(68, 23); + this.txtExtCode.Size = new System.Drawing.Size(63, 23); this.txtExtCode.TabIndex = 429; // // label6 // this.label6.Anchor = System.Windows.Forms.AnchorStyles.None; this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(488, 9); + this.label6.Location = new System.Drawing.Point(492, 9); this.label6.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(44, 17); @@ -424,9 +498,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.cmbSort.Items.AddRange(new object[] { "入库时间", "认领总数"}); - this.cmbSort.Location = new System.Drawing.Point(535, 5); + this.cmbSort.Location = new System.Drawing.Point(539, 5); this.cmbSort.Name = "cmbSort"; - this.cmbSort.Size = new System.Drawing.Size(64, 25); + this.cmbSort.Size = new System.Drawing.Size(60, 25); this.cmbSort.TabIndex = 448; this.cmbSort.Text = "入库时间"; // @@ -497,14 +571,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.txtNotes.Location = new System.Drawing.Point(60, 41); this.txtNotes.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtNotes.Name = "txtNotes"; - this.txtNotes.Size = new System.Drawing.Size(68, 23); + this.txtNotes.Size = new System.Drawing.Size(63, 23); this.txtNotes.TabIndex = 439; // // lblGroup // this.lblGroup.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblGroup.AutoSize = true; - this.lblGroup.Location = new System.Drawing.Point(134, 44); + this.lblGroup.Location = new System.Drawing.Point(129, 44); this.lblGroup.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.lblGroup.Name = "lblGroup"; this.lblGroup.Size = new System.Drawing.Size(44, 17); @@ -515,10 +589,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(178, 40); + this.cmbGroupFilter.Location = new System.Drawing.Point(173, 40); this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbGroupFilter.Name = "cmbGroupFilter"; - this.cmbGroupFilter.Size = new System.Drawing.Size(68, 25); + this.cmbGroupFilter.Size = new System.Drawing.Size(63, 25); this.cmbGroupFilter.TabIndex = 653; // // btnExportTxt @@ -528,7 +602,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnExportTxt.Cursor = System.Windows.Forms.Cursors.Hand; this.btnExportTxt.DisabledBackColor = System.Drawing.Color.Empty; this.btnExportTxt.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnExportTxt.Location = new System.Drawing.Point(1344, 25); + this.btnExportTxt.Location = new System.Drawing.Point(1344, 26); this.btnExportTxt.Name = "btnExportTxt"; this.btnExportTxt.Size = new System.Drawing.Size(89, 25); this.btnExportTxt.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -553,7 +627,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand; this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty; this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnDelSelect.Location = new System.Drawing.Point(941, 25); + this.btnDelSelect.Location = new System.Drawing.Point(941, 26); this.btnDelSelect.Name = "btnDelSelect"; this.btnDelSelect.Size = new System.Drawing.Size(84, 25); this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -575,7 +649,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.cmbGroup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.cmbGroup.FormattingEnabled = true; - this.cmbGroup.Location = new System.Drawing.Point(750, 25); + this.cmbGroup.Location = new System.Drawing.Point(750, 10); this.cmbGroup.Name = "cmbGroup"; this.cmbGroup.Size = new System.Drawing.Size(85, 25); this.cmbGroup.TabIndex = 640; @@ -587,7 +661,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnSetGroup.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSetGroup.DisabledBackColor = System.Drawing.Color.Empty; this.btnSetGroup.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSetGroup.Location = new System.Drawing.Point(837, 25); + this.btnSetGroup.Location = new System.Drawing.Point(837, 10); this.btnSetGroup.Name = "btnSetGroup"; this.btnSetGroup.Size = new System.Drawing.Size(84, 25); this.btnSetGroup.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -609,7 +683,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(1138, 7); + this.label7.Location = new System.Drawing.Point(1138, 8); this.label7.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(104, 17); @@ -837,6 +911,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colEndWords, this.colFissionWords, this.colGetType, + this.colWxSafe, this.colAddTime, this.colMdyTime, this.col_edit, @@ -984,14 +1059,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colExtCodePrice // - this.colExtCodePrice.FillWeight = 55F; + this.colExtCodePrice.FillWeight = 60F; this.colExtCodePrice.HeaderText = "货号价格"; this.colExtCodePrice.Name = "colExtCodePrice"; this.colExtCodePrice.ReadOnly = true; // // colEdit // - this.colEdit.FillWeight = 38F; + this.colEdit.FillWeight = 40F; this.colEdit.HeaderText = "编辑"; this.colEdit.Name = "colEdit"; this.colEdit.ReadOnly = true; @@ -1063,6 +1138,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colGetType.Name = "colGetType"; this.colGetType.ReadOnly = true; // + // colWxSafe + // + this.colWxSafe.FillWeight = 70F; + this.colWxSafe.HeaderText = "微信安检"; + this.colWxSafe.Name = "colWxSafe"; + this.colWxSafe.ReadOnly = true; + // // colAddTime // this.colAddTime.FillWeight = 80F; @@ -1088,14 +1170,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // col_delete // - this.col_delete.FillWeight = 40F; + this.col_delete.FillWeight = 42F; this.col_delete.HeaderText = "删除"; this.col_delete.Name = "col_delete"; this.col_delete.ReadOnly = true; // // col_select_product // - this.col_select_product.FillWeight = 40F; + this.col_select_product.FillWeight = 42F; this.col_select_product.HeaderText = "认领"; this.col_select_product.Name = "col_select_product"; this.col_select_product.ReadOnly = true; @@ -1186,6 +1268,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms private System.Windows.Forms.ComboBox cmbSourceType; private System.Windows.Forms.Label label10; private DevComponents.DotNetBar.PanelEx btnImport; + private System.Windows.Forms.Label lblWxSafe; + private System.Windows.Forms.ComboBox cmbWxSafe; + private System.Windows.Forms.ComboBox cmbSetWxSafe; + private DevComponents.DotNetBar.PanelEx btnSetWxSafe; private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; private System.Windows.Forms.DataGridViewTextBoxColumn col_db_id; private System.Windows.Forms.DataGridViewTextBoxColumn colFromShopId; @@ -1210,6 +1296,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private System.Windows.Forms.DataGridViewTextBoxColumn colEndWords; private System.Windows.Forms.DataGridViewTextBoxColumn colFissionWords; private System.Windows.Forms.DataGridViewTextBoxColumn colGetType; + private System.Windows.Forms.DataGridViewTextBoxColumn colWxSafe; private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime; private System.Windows.Forms.DataGridViewTextBoxColumn colMdyTime; private System.Windows.Forms.DataGridViewLinkColumn col_edit; diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs index 6baae85..7fcf447 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs @@ -45,15 +45,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void ProductListForm_Load(object sender, EventArgs e) { + cmbSetWxSafe.SelectedIndex = 0; if (BaseClass.SaLevel == 1 && shop == null) // 一级管理员且不是选品状态 { this.dgvDbProduct.Columns["col_db_id"].Visible = true; this.dgvDbProduct.Columns["colFromShopId"].Visible = true; this.dgvDbProduct.Columns["col_delete"].Visible = true; this.dgvDbProduct.Columns["col_edit"].Visible = true; - this.dgvDbProduct.Columns["colHeadWords"].Visible = true; - this.dgvDbProduct.Columns["colEndWords"].Visible = true; - this.dgvDbProduct.Columns["colFissionWords"].Visible = true; + //this.dgvDbProduct.Columns["colHeadWords"].Visible = true; + //this.dgvDbProduct.Columns["colEndWords"].Visible = true; + //this.dgvDbProduct.Columns["colFissionWords"].Visible = true; this.dgvDbProduct.Columns["colPriceText"].Visible = true; //this.dgvDbProduct.Columns["col_notes"].Visible = true; //this.lblNotes.Visible = true; @@ -71,9 +72,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.dgvDbProduct.Columns["colFromShopId"].Visible = false; this.dgvDbProduct.Columns["col_delete"].Visible = false; this.dgvDbProduct.Columns["col_edit"].Visible = false; - this.dgvDbProduct.Columns["colHeadWords"].Visible = false; - this.dgvDbProduct.Columns["colEndWords"].Visible = false; - this.dgvDbProduct.Columns["colFissionWords"].Visible = false; + //this.dgvDbProduct.Columns["colHeadWords"].Visible = false; + //this.dgvDbProduct.Columns["colEndWords"].Visible = false; + //this.dgvDbProduct.Columns["colFissionWords"].Visible = false; this.dgvDbProduct.Columns["colPriceText"].Visible = false; //this.dgvDbProduct.Columns["col_notes"].Visible = false; //this.lblNotes.Visible = false; @@ -83,6 +84,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms lblGroup.Visible = cmbGroup.Visible = btnSetGroup.Visible = false; } + if (BaseClass.MainPath != "binxixi") + { + this.dgvDbProduct.Columns["col_edit"].Visible = false; + } btnSelect.Visible = false; this.dgvDbProduct.Columns["col_select_product"].Visible = false; @@ -175,6 +180,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms prod.end_words, prod.fission_words, prod.product_get_type_text, + prod.wx_safe_status, prod.add_time.ToString("yy-MM-dd HH:mm"), prod.mdy_time.ToString("yy-MM-dd HH:mm"), "编辑", @@ -246,9 +252,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms List list = new List(); pageCount = 1; - var url = BaseClass.BuildObjString("product/get_product_list"); + var url = BaseClass.BuildPDDObjString("product/get_product_list"); if(shop!=null && shop.DbId.ParseToInt()!=0 ) - url = BaseClass.BuildObjString("product/get_product_list"); + url = BaseClass.BuildPDDObjString("product/get_product_list"); var data = ""; Invoke(new Action(() => @@ -262,7 +268,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms "&search_cat=" + txtCat.Text.Trim() + "&search_ext_code=" + txtExtCode.Text.Trim() + "&search_group=" + cmbGroupFilter.Text.Trim() + - "&search_prod_name=" + txtProdName.Text.Trim(); + "&search_prod_name=" + txtProdName.Text.Trim() + + "&wx_safe_status=" + cmbWxSafe.Text.Trim(); if (cmbSourceType.Text.Trim() != "全部") { data += "&product_get_type=" + cmbSourceType.Text.Trim(); @@ -336,7 +343,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.txtNotes.Text = ""; this.cmbGroupFilter.Text = ""; this.cmbSort.Text = "入库时间"; - this.cmbSourceType.Text = "全部"; + this.cmbSourceType.Text = ""; + this.cmbWxSafe.Text = ""; } private void dgvDbProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) @@ -545,7 +553,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void DeleteProduct(string dbId, bool isUpdate = true) { - var url = BaseClass.BuildObjString("product/del_db_product"); + var url = BaseClass.BuildPDDObjString("product/del_db_product"); var data = UserLogin.GetSignaturex() + "&db_id=" + dbId; var html = GetHtml.PostUtf8(url, data); @@ -630,7 +638,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms } string in_db_ids=string.Join(",", lstProdDbId); - var url = BaseClass.BuildObjString("product/mdy_db_product"); + var url = BaseClass.BuildPDDObjString("product/mdy_db_product"); var data = UserLogin.GetSignaturex() + "&in_db_ids=" + in_db_ids + "&group=" + cmbGroup.Text.Trim(); var html = GetHtml.PostUtf8(url, data); @@ -663,7 +671,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms } public static void GetPDDProductGroup(List boxs) { - var url = BaseClass.BuildObjString("product/get_product_groups"); + var url = BaseClass.BuildPDDObjString("product/get_product_groups"); var data = UserLogin.GetSignaturex(); var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -694,7 +702,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void btnEditExtCodePriceOK_Click(object sender, EventArgs e) { - var url = BaseClass.BuildObjString("price/add_ext_code_price"); + var url = BaseClass.BuildPDDObjString("price/add_ext_code_price"); var data = UserLogin.GetSignaturex() + "&ext_code=" + lblExtCode.Text.Trim(); if (!string.IsNullOrEmpty(txtExtCodePrice.Text.Trim())) @@ -1008,5 +1016,43 @@ namespace TemuKJD.PDDForms.ProductSelectForms }); } } + + private void btnSetWxSafe_Click(object sender, EventArgs e) + { + var rows = dgvDbProduct.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true); + var lstProdDbId = rows.Select(r => r.Cells["col_db_id"]?.Value.ToString()).ToList(); + var prodList = this.lstTemuDbProduct.Where(p => lstProdDbId.Contains(p.id.ParseToString())).ToList(); + if (prodList.Count <= 0) + { + BaseMsgForm.ShowError("请选择商品!"); + return; + } + + string in_db_ids = string.Join(",", lstProdDbId); + var url = BaseClass.BuildPDDObjString("product/mdy_db_product"); + var data = UserLogin.GetSignaturex() + + "&in_db_ids=" + in_db_ids + "&wx_safe_status=" + cmbSetWxSafe.Text.Trim(); + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + BaseMsgForm.ShowError("商品分组编辑失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg")); + } + else + { + foreach (var prod in prodList) + { + prod.wx_safe_status = cmbSetWxSafe.Text.Trim(); + } + foreach (var row in rows) + { + row.Cells["colWxSafe"].Value = cmbSetWxSafe.Text.Trim(); + } + } + } } } diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.resx b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.resx index 261de31..58f8b14 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.resx +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.resx @@ -189,6 +189,9 @@ True + + True + True diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs index 603bcc1..84e18a5 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs @@ -1107,10 +1107,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms var chanceGoodsString = JsonHelper.SerializeObject(chanceGoodJArr); var chanceGoodLst = new NaiBa.Util.ConcurrentList(); chanceGoodLst.AddRange(JsonHelper.DeserializeJsonToList(chanceGoodsString)); - var chanceGood = chanceGoodLst.OrderBy(g => Randomx.GetId(10000)) + var chanceGood = chanceGoodLst.OrderBy(x => Guid.NewGuid()) .FirstOrDefault(g => g.cat_id_3 == prodInfo.detail.cat_id || g.cat_id_2 == prodInfo.detail.cat_id); if (chanceGood == null) - chanceGood = chanceGoodLst.OrderBy(g => Randomx.GetId(10000)).FirstOrDefault(); + chanceGood = chanceGoodLst.OrderBy(x => Guid.NewGuid()).FirstOrDefault(); if (chanceGood != null) chance_id = chanceGood.chance_id; } diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs index 5272a59..5eaa93c 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs @@ -269,7 +269,7 @@ namespace TemuKJD.PDDForms.ShopForms } else { - ShopBLL.MdyServerShopSubInfo(shopInfo); + ShopBLL.MdyPDDServerShopSubInfo(shopInfo); btnRefreshCookie_Click(null, null); } } diff --git a/TEMUKJD/Properties/Resources.Designer.cs b/TEMUKJD/Properties/Resources.Designer.cs index d60d105..17ae562 100644 --- a/TEMUKJD/Properties/Resources.Designer.cs +++ b/TEMUKJD/Properties/Resources.Designer.cs @@ -303,6 +303,16 @@ namespace TemuKJD.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap login_bg_wx { + get { + object obj = ResourceManager.GetObject("login_bg_wx", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// @@ -343,6 +353,16 @@ namespace TemuKJD.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap main_form_logo_wx { + get { + object obj = ResourceManager.GetObject("main_form_logo_wx", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// @@ -703,6 +723,16 @@ namespace TemuKJD.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap system_wx { + get { + object obj = ResourceManager.GetObject("system_wx", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找类似 <!doctype html> ///<html> diff --git a/TEMUKJD/Properties/Resources.resx b/TEMUKJD/Properties/Resources.resx index a8a5be4..1c5b8f0 100644 --- a/TEMUKJD/Properties/Resources.resx +++ b/TEMUKJD/Properties/Resources.resx @@ -181,6 +181,9 @@ ..\resources\login_bg_pdd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resources\login_bg_wx.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\login_input_bg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -193,6 +196,9 @@ ..\resources\main_form_logo_pdd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resources\main_form_logo_wx.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\main_form_top_right_bg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -301,6 +307,9 @@ ..\Resources\system_tb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resources\system_wx.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\template.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 diff --git a/TEMUKJD/Resources/login_bg_wx.png b/TEMUKJD/Resources/login_bg_wx.png new file mode 100644 index 0000000000000000000000000000000000000000..02606c2b0880573f8a15eda9f57a684a3152e65b GIT binary patch literal 11594 zcmeHtc|4SD+yABPOA3XAF(xI3*=I}%V;fmQvL|B}#xjGkCQ+7XwL~TqQjx7Jp-57) zjJhjYNQ!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N6mt*JI&FGi&PH$W^0O&Yb(V1!YZeuuHeWi|D1g zLD!5=u@oozFZ4FphLi)@z4^xR8|l;!0U9S?OWeO`d;R1Fjy94VNs33*0&6)Ezs2DY z<(kZHc8J=K7G}$i2UXIpyZadW*Q+V|voUGhcEo;-2e3Q@<0&s6!u)^qd#b#jag8lW zyv$`q;X+PZfK#Oiy3`;PK=Ai){PKJwMF|6C$9Y{}VO=AgymXwCwG0?B`=GO(DAYM{ zsn@oawb5>I=7rRiX3J%`QEZJT(`KimM)FtWlJ=A)Qlo}-&ADW2&sBIFKfB8g ziXEbFg&m#*bwra7zqQ?Qem*1ncGmy-O|=ZnW`7)Hyf0;xE!KNY#7euKtQQxRepNno z8N?dBv!%WDc*W`m)ur$65H5zDGLzZfu|3k)GFCF9oS9=v71o_R6JX7AL9>bCi*91m zpNZ$AzD2xbUc&Lg9$nO#!h-^(6I~NB2~%mXgcVyOz6E6ZxGW9dVDNPHvlu=LtH zxvlSgDE2e5j^d!|C2mlvA9wkV81am8JSK0 z+AWj7tecr0Rcn#tK-C&PoR+MMKMP>;IH6-%=tgya@wt#APv6O@TS@_WzhF;(=}Yc? z@w|RrGoD4$3%02;daYsWd}T26z1dWSpPaO9U^7Mf!mW3antJ|{pU_%ga;*zfnt088 z#z^4yM{+ksa0>4=-MwFObjr|Iju_sQC5C6ES9<>$@gSJ({@?3}D943T^v{e*;h+mjeI* literal 0 HcmV?d00001 diff --git a/TEMUKJD/Resources/system_wx.png b/TEMUKJD/Resources/system_wx.png new file mode 100644 index 0000000000000000000000000000000000000000..3cc698fe13d0f79a1d0569293d2d042850f71346 GIT binary patch literal 3664 zcmbVP30M=?7ETBd*`(Gpg1?@NDv-e%h@h8AHK`NO_1yBT_PL*pQJs?-RPiP2+)gl$5)F28u z!Ke`uDpE8&BI@c`3^L`UTDf|hCzLU=9#WDiB+wYsC{Qe##3@r$(oy4L5gC@kGFYxr zqgcu$R++5ODAdV{x2T>Jzh(gCHX>ru#v6T+$tF#xH6d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Y@mg|5^+hbnvT9c|+UPPD)yAy!eEJgU@BMHs&rCI?ROj#dnRCRJ hM@PS@HWQya71(&`WJAO%SL1&^e#qkBnhylo{{yP^bV2|C literal 0 HcmV?d00001 diff --git a/TEMUKJD/UserForm/LoginForm.cs b/TEMUKJD/UserForm/LoginForm.cs index 7530564..be950e0 100644 --- a/TEMUKJD/UserForm/LoginForm.cs +++ b/TEMUKJD/UserForm/LoginForm.cs @@ -40,6 +40,8 @@ namespace TemuKJD.UserForm { if (BaseClass.MainPath == "binxixi") this.panelEx1.Style.BackgroundImage = Properties.Resources.login_bg_pdd; + if (BaseClass.MainPath == "weixin") + this.panelEx1.Style.BackgroundImage = Properties.Resources.login_bg_wx; GetUserList(); #if DEBUG diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs index f862a33..23c30e0 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs @@ -30,7 +30,7 @@ { System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("超级店铺管理"); System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("超级用户管理"); - System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("产品数据库"); + System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("PDD产品库"); System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("SKU替换图"); System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("选品加价管理"); System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("认领待上传"); @@ -139,8 +139,8 @@ treeNode1.Text = "超级店铺管理"; treeNode2.Name = "超级用户管理"; treeNode2.Text = "超级用户管理"; - treeNode3.Name = "产品数据库"; - treeNode3.Text = "产品数据库"; + treeNode3.Name = "PDD产品库"; + treeNode3.Text = "PDD产品库"; treeNode4.Name = "SKU替换图"; treeNode4.Text = "SKU替换图"; treeNode5.Name = "选品加价管理"; @@ -160,14 +160,14 @@ this.tv.TabIndex = 1; this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); // - // PDDAdminForm + // WXAdminForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(933, 446); this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.Name = "PDDAdminForm"; + this.Name = "WXAdminForm"; this.Text = "AdminForm"; this.Load += new System.EventHandler(this.ShopForm_Load); this.panel1.ResumeLayout(false); diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs index f5f4fd4..02aa61e 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs @@ -18,7 +18,7 @@ namespace TemuKJD.WXForms.AdminForms { public Lazy adminAccountForm = new Lazy(); public Lazy adminShopForm = new Lazy(); - //public Lazy dbProdListForm = new Lazy(); + public Lazy pddDbProdListForm = new Lazy(); //public Lazy dbProdImgListForm = new Lazy(); public WXAdminForm() @@ -30,7 +30,7 @@ namespace TemuKJD.WXForms.AdminForms tv.SelectedNode = tv.Nodes[0].Nodes[0]; tv.ExpandGroup(tv.Nodes[0].Name); - List hideName = new List() { "超级用户管理", "超级店铺管理", "产品数据库", "SKU替换图", "选品加价管理", "认领待上传", "库存上传", "商品核价" }; + List hideName = new List() { "超级用户管理", "超级店铺管理", "PDD产品库", "SKU替换图", "选品加价管理", "认领待上传", "库存上传", "商品核价" }; if (BaseClass.GroupId == 3) { @@ -39,7 +39,7 @@ namespace TemuKJD.WXForms.AdminForms { hideName.Remove("超级用户管理"); hideName.Remove("超级店铺管理"); - //hideName.Remove("产品数据库"); + hideName.Remove("PDD产品库"); //hideName.Remove("SKU替换图"); } if (BaseClass.SaLevel==2) @@ -77,9 +77,9 @@ namespace TemuKJD.WXForms.AdminForms case "超级店铺管理": SetForm(adminShopForm.Value); break; - //case "产品数据库": - // SetForm(dbProdListForm.Value); - // break; + case "PDD产品库": + SetForm(pddDbProdListForm.Value); + break; //case "SKU替换图": // SetForm(dbProdImgListForm.Value); // break; diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs index 004ba9a..b448f5d 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs @@ -40,6 +40,14 @@ namespace TemuKJD.WXForms.ProductForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.chkSkipUploaded = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkSameSpecPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.label5 = new System.Windows.Forms.Label(); + this.txtMinPrice = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.txtReplaceText = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.chkHighestPriceSku = new TemuKJD.UserComponent.UcCheckBox(this.components); this.label7 = new System.Windows.Forms.Label(); this.txtWaitSeconds = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); @@ -48,13 +56,11 @@ namespace TemuKJD.WXForms.ProductForms this.btnClearDgv = new DevComponents.DotNetBar.PanelEx(); this.label14 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); - this.txtSinglePriceAdd = new System.Windows.Forms.TextBox(); this.panel4 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.fPnlPriceRule = new System.Windows.Forms.FlowLayoutPanel(); this.ucAddPrice1 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice(); this.ucAddPrice3 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice(); - this.label11 = new System.Windows.Forms.Label(); this.lblNewAddPrice = new System.Windows.Forms.Label(); this.txtAddMorePrice = new System.Windows.Forms.TextBox(); this.txtAddTimes = new System.Windows.Forms.TextBox(); @@ -65,7 +71,13 @@ namespace TemuKJD.WXForms.ProductForms this.label9 = new System.Windows.Forms.Label(); this.chkStepAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.cmbWxSafe = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.cmbSourceType = new System.Windows.Forms.ComboBox(); + this.label12 = new System.Windows.Forms.Label(); this.btnClearFilter = new DevComponents.DotNetBar.PanelEx(); + this.lblGoodsCount = new System.Windows.Forms.Label(); + this.btnClearUpload = new DevComponents.DotNetBar.PanelEx(); this.txtIdFilter = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.cmbCateFilter = new System.Windows.Forms.ComboBox(); @@ -73,9 +85,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbGroupFilter = new System.Windows.Forms.ComboBox(); this.label20 = new System.Windows.Forms.Label(); this.txtExtCodeFilter = new System.Windows.Forms.TextBox(); - this.btnClearUpload = new DevComponents.DotNetBar.PanelEx(); this.lblWaitToUp = new System.Windows.Forms.Label(); - this.lblGoodsCount = new System.Windows.Forms.Label(); this.txtAddCount = new System.Windows.Forms.TextBox(); this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); this.label16 = new System.Windows.Forms.Label(); @@ -84,19 +94,11 @@ namespace TemuKJD.WXForms.ProductForms this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); - this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn(); - this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); - this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.txtTest20981 = new System.Windows.Forms.TextBox(); this.btnTest20981 = new DevComponents.DotNetBar.PanelEx(); this.pbLoading = new System.Windows.Forms.PictureBox(); + this.label11 = new System.Windows.Forms.Label(); + this.txtSinglePriceAdd = new System.Windows.Forms.TextBox(); this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -125,6 +127,17 @@ namespace TemuKJD.WXForms.ProductForms this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.panel1 = new System.Windows.Forms.Panel(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colUploadCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -179,6 +192,14 @@ namespace TemuKJD.WXForms.ProductForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx2.Controls.Add(this.chkSkipUploaded); + this.ucGroupBoxEx2.Controls.Add(this.chkSameSpecPrice); + this.ucGroupBoxEx2.Controls.Add(this.label5); + this.ucGroupBoxEx2.Controls.Add(this.txtMinPrice); + this.ucGroupBoxEx2.Controls.Add(this.label8); + this.ucGroupBoxEx2.Controls.Add(this.txtReplaceText); + this.ucGroupBoxEx2.Controls.Add(this.label3); + this.ucGroupBoxEx2.Controls.Add(this.chkHighestPriceSku); this.ucGroupBoxEx2.Controls.Add(this.label7); this.ucGroupBoxEx2.Controls.Add(this.txtWaitSeconds); this.ucGroupBoxEx2.Controls.Add(this.label6); @@ -187,9 +208,7 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx2.Controls.Add(this.btnClearDgv); this.ucGroupBoxEx2.Controls.Add(this.label14); this.ucGroupBoxEx2.Controls.Add(this.label15); - this.ucGroupBoxEx2.Controls.Add(this.txtSinglePriceAdd); this.ucGroupBoxEx2.Controls.Add(this.panel4); - this.ucGroupBoxEx2.Controls.Add(this.label11); this.ucGroupBoxEx2.Controls.Add(this.lblNewAddPrice); this.ucGroupBoxEx2.Controls.Add(this.txtAddMorePrice); this.ucGroupBoxEx2.Controls.Add(this.txtAddTimes); @@ -206,6 +225,90 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "商品上传"; // + // chkSkipUploaded + // + this.chkSkipUploaded.AutoSize = true; + this.chkSkipUploaded.Checked = true; + this.chkSkipUploaded.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkSkipUploaded.Location = new System.Drawing.Point(537, 91); + this.chkSkipUploaded.Name = "chkSkipUploaded"; + this.chkSkipUploaded.Size = new System.Drawing.Size(135, 21); + this.chkSkipUploaded.TabIndex = 755; + this.chkSkipUploaded.Text = "跳过店铺已上货商品"; + this.chkSkipUploaded.UseVisualStyleBackColor = true; + // + // chkSameSpecPrice + // + this.chkSameSpecPrice.AutoSize = true; + this.chkSameSpecPrice.Checked = true; + this.chkSameSpecPrice.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkSameSpecPrice.Location = new System.Drawing.Point(662, 41); + this.chkSameSpecPrice.Name = "chkSameSpecPrice"; + this.chkSameSpecPrice.Size = new System.Drawing.Size(99, 21); + this.chkSameSpecPrice.TabIndex = 745; + this.chkSameSpecPrice.Text = "颜色规格同价"; + this.chkSameSpecPrice.UseVisualStyleBackColor = true; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(625, 18); + this.label5.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(76, 17); + this.label5.TabIndex = 744; + this.label5.Text = "元时跳过sku"; + // + // txtMinPrice + // + this.txtMinPrice.Location = new System.Drawing.Point(592, 15); + this.txtMinPrice.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.txtMinPrice.Name = "txtMinPrice"; + this.txtMinPrice.Size = new System.Drawing.Size(33, 23); + this.txtMinPrice.TabIndex = 743; + this.txtMinPrice.Text = "10"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(534, 18); + this.label8.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(68, 17); + this.label8.TabIndex = 742; + this.label8.Text = "价格低于:"; + // + // txtReplaceText + // + this.txtReplaceText.Location = new System.Drawing.Point(664, 65); + this.txtReplaceText.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.txtReplaceText.Name = "txtReplaceText"; + this.txtReplaceText.Size = new System.Drawing.Size(285, 23); + this.txtReplaceText.TabIndex = 740; + this.txtReplaceText.Text = "真丝,蚕丝,香云纱,羊绒,羊毛,羊羔绒,羊羔毛,羽绒,皮草"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(534, 68); + this.label3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(140, 17); + this.label3.TabIndex = 741; + this.label3.Text = "移除标题介绍中的词语:"; + // + // chkHighestPriceSku + // + this.chkHighestPriceSku.AutoSize = true; + this.chkHighestPriceSku.Checked = true; + this.chkHighestPriceSku.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkHighestPriceSku.Location = new System.Drawing.Point(537, 41); + this.chkHighestPriceSku.Name = "chkHighestPriceSku"; + this.chkHighestPriceSku.Size = new System.Drawing.Size(119, 21); + this.chkHighestPriceSku.TabIndex = 739; + this.chkHighestPriceSku.Text = "只保留最高价sku"; + this.chkHighestPriceSku.UseVisualStyleBackColor = true; + // // label7 // this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -267,7 +370,7 @@ namespace TemuKJD.WXForms.ProductForms // chkAddMorePriceFirst // this.chkAddMorePriceFirst.AutoSize = true; - this.chkAddMorePriceFirst.Location = new System.Drawing.Point(306, 111); + this.chkAddMorePriceFirst.Location = new System.Drawing.Point(213, 111); this.chkAddMorePriceFirst.Name = "chkAddMorePriceFirst"; this.chkAddMorePriceFirst.Size = new System.Drawing.Size(111, 21); this.chkAddMorePriceFirst.TabIndex = 625; @@ -317,24 +420,13 @@ namespace TemuKJD.WXForms.ProductForms // this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(283, 113); + this.label15.Location = new System.Drawing.Point(184, 113); this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(20, 17); this.label15.TabIndex = 588; this.label15.Text = "元"; // - // txtSinglePriceAdd - // - this.txtSinglePriceAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtSinglePriceAdd.Location = new System.Drawing.Point(252, 110); - this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtSinglePriceAdd.Name = "txtSinglePriceAdd"; - this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23); - this.txtSinglePriceAdd.TabIndex = 587; - this.txtSinglePriceAdd.Text = "1.0"; - this.txtSinglePriceAdd.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); - // // panel4 // this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -445,17 +537,6 @@ namespace TemuKJD.WXForms.ProductForms this.ucAddPrice3.Size = new System.Drawing.Size(420, 23); this.ucAddPrice3.TabIndex = 13; // - // label11 - // - this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(184, 113); - this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(68, 17); - this.label11.TabIndex = 536; - this.label11.Text = "元,单买加"; - // // lblNewAddPrice // this.lblNewAddPrice.AutoSize = true; @@ -529,7 +610,7 @@ namespace TemuKJD.WXForms.ProductForms // // txtStockNum // - this.txtStockNum.Location = new System.Drawing.Point(486, 110); + this.txtStockNum.Location = new System.Drawing.Point(393, 110); this.txtStockNum.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtStockNum.Name = "txtStockNum"; this.txtStockNum.Size = new System.Drawing.Size(32, 23); @@ -540,7 +621,7 @@ namespace TemuKJD.WXForms.ProductForms // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(430, 113); + this.label4.Location = new System.Drawing.Point(337, 113); this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 17); @@ -575,7 +656,13 @@ namespace TemuKJD.WXForms.ProductForms | System.Windows.Forms.AnchorStyles.Left))); this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx4.Controls.Add(this.cmbWxSafe); + this.ucGroupBoxEx4.Controls.Add(this.label13); + this.ucGroupBoxEx4.Controls.Add(this.cmbSourceType); + this.ucGroupBoxEx4.Controls.Add(this.label12); this.ucGroupBoxEx4.Controls.Add(this.btnClearFilter); + this.ucGroupBoxEx4.Controls.Add(this.lblGoodsCount); + this.ucGroupBoxEx4.Controls.Add(this.btnClearUpload); this.ucGroupBoxEx4.Controls.Add(this.txtIdFilter); this.ucGroupBoxEx4.Controls.Add(this.label1); this.ucGroupBoxEx4.Controls.Add(this.cmbCateFilter); @@ -583,29 +670,72 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx4.Controls.Add(this.cmbGroupFilter); this.ucGroupBoxEx4.Controls.Add(this.label20); this.ucGroupBoxEx4.Controls.Add(this.txtExtCodeFilter); - this.ucGroupBoxEx4.Controls.Add(this.btnClearUpload); this.ucGroupBoxEx4.Controls.Add(this.lblWaitToUp); - this.ucGroupBoxEx4.Controls.Add(this.lblGoodsCount); this.ucGroupBoxEx4.Controls.Add(this.txtAddCount); this.ucGroupBoxEx4.Controls.Add(this.panelEx2); this.ucGroupBoxEx4.Controls.Add(this.label16); - this.ucGroupBoxEx4.Location = new System.Drawing.Point(147, 2); + this.ucGroupBoxEx4.Location = new System.Drawing.Point(139, 2); this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; - this.ucGroupBoxEx4.Size = new System.Drawing.Size(312, 140); + this.ucGroupBoxEx4.Size = new System.Drawing.Size(320, 140); this.ucGroupBoxEx4.TabIndex = 666; this.ucGroupBoxEx4.TabStop = false; this.ucGroupBoxEx4.Text = "待传商品"; // + // cmbWxSafe + // + this.cmbWxSafe.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbWxSafe.FormattingEnabled = true; + this.cmbWxSafe.Items.AddRange(new object[] { + "安全商品", + "未校验"}); + this.cmbWxSafe.Location = new System.Drawing.Point(157, 78); + this.cmbWxSafe.Name = "cmbWxSafe"; + this.cmbWxSafe.Size = new System.Drawing.Size(92, 25); + this.cmbWxSafe.TabIndex = 675; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(128, 82); + this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(32, 17); + this.label13.TabIndex = 674; + this.label13.Text = "安检"; + // + // cmbSourceType + // + this.cmbSourceType.FormattingEnabled = true; + this.cmbSourceType.Items.AddRange(new object[] { + "", + "店铺采集", + "机会商品", + "外部数据"}); + this.cmbSourceType.Location = new System.Drawing.Point(36, 78); + this.cmbSourceType.Name = "cmbSourceType"; + this.cmbSourceType.Size = new System.Drawing.Size(92, 25); + this.cmbSourceType.TabIndex = 673; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(7, 82); + this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(32, 17); + this.label12.TabIndex = 672; + this.label12.Text = "来源"; + // // btnClearFilter // this.btnClearFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnClearFilter.CanvasColor = System.Drawing.SystemColors.Control; this.btnClearFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnClearFilter.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClearFilter.Location = new System.Drawing.Point(254, 23); + this.btnClearFilter.Location = new System.Drawing.Point(253, 22); this.btnClearFilter.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnClearFilter.Name = "btnClearFilter"; - this.btnClearFilter.Size = new System.Drawing.Size(48, 51); + this.btnClearFilter.Size = new System.Drawing.Size(58, 52); this.btnClearFilter.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnClearFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnClearFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -622,67 +752,16 @@ namespace TemuKJD.WXForms.ProductForms this.btnClearFilter.Text = "清除\r\n筛选"; this.btnClearFilter.Click += new System.EventHandler(this.btnClearFilter_Click); // - // txtIdFilter + // lblGoodsCount // - this.txtIdFilter.Location = new System.Drawing.Point(158, 51); - this.txtIdFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtIdFilter.Name = "txtIdFilter"; - this.txtIdFilter.Size = new System.Drawing.Size(92, 23); - this.txtIdFilter.TabIndex = 652; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(130, 54); - this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(32, 17); - this.label1.TabIndex = 651; - this.label1.Text = "编号"; - // - // cmbCateFilter - // - this.cmbCateFilter.FormattingEnabled = true; - this.cmbCateFilter.Location = new System.Drawing.Point(158, 22); - this.cmbCateFilter.Name = "cmbCateFilter"; - this.cmbCateFilter.Size = new System.Drawing.Size(92, 25); - this.cmbCateFilter.TabIndex = 663; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(130, 26); - this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(32, 17); - this.label2.TabIndex = 662; - this.label2.Text = "类目"; - // - // cmbGroupFilter - // - this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(37, 22); - this.cmbGroupFilter.Name = "cmbGroupFilter"; - this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25); - this.cmbGroupFilter.TabIndex = 641; - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(8, 25); - this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(32, 17); - this.label20.TabIndex = 570; - this.label20.Text = "分组"; - // - // txtExtCodeFilter - // - this.txtExtCodeFilter.Location = new System.Drawing.Point(37, 51); - this.txtExtCodeFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtExtCodeFilter.Name = "txtExtCodeFilter"; - this.txtExtCodeFilter.Size = new System.Drawing.Size(92, 23); - this.txtExtCodeFilter.TabIndex = 555; + this.lblGoodsCount.AutoSize = true; + this.lblGoodsCount.Location = new System.Drawing.Point(9, 110); + this.lblGoodsCount.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblGoodsCount.Name = "lblGoodsCount"; + this.lblGoodsCount.Size = new System.Drawing.Size(71, 17); + this.lblGoodsCount.TabIndex = 537; + this.lblGoodsCount.Text = "产品库 0 件"; + this.lblGoodsCount.Click += new System.EventHandler(this.lblGoodsCount_Click); // // btnClearUpload // @@ -690,10 +769,10 @@ namespace TemuKJD.WXForms.ProductForms this.btnClearUpload.CanvasColor = System.Drawing.SystemColors.Control; this.btnClearUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnClearUpload.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClearUpload.Location = new System.Drawing.Point(226, 105); + this.btnClearUpload.Location = new System.Drawing.Point(253, 79); this.btnClearUpload.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnClearUpload.Name = "btnClearUpload"; - this.btnClearUpload.Size = new System.Drawing.Size(76, 23); + this.btnClearUpload.Size = new System.Drawing.Size(58, 23); this.btnClearUpload.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnClearUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnClearUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -707,40 +786,91 @@ namespace TemuKJD.WXForms.ProductForms this.btnClearUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnClearUpload.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; this.btnClearUpload.TabIndex = 548; - this.btnClearUpload.Text = "清空待上传"; + this.btnClearUpload.Text = "清空待传"; this.btnClearUpload.Click += new System.EventHandler(this.btnClearUpload_Click); // + // txtIdFilter + // + this.txtIdFilter.Location = new System.Drawing.Point(157, 51); + this.txtIdFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtIdFilter.Name = "txtIdFilter"; + this.txtIdFilter.Size = new System.Drawing.Size(92, 23); + this.txtIdFilter.TabIndex = 652; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(129, 54); + this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(32, 17); + this.label1.TabIndex = 651; + this.label1.Text = "编号"; + // + // cmbCateFilter + // + this.cmbCateFilter.FormattingEnabled = true; + this.cmbCateFilter.Location = new System.Drawing.Point(157, 22); + this.cmbCateFilter.Name = "cmbCateFilter"; + this.cmbCateFilter.Size = new System.Drawing.Size(92, 25); + this.cmbCateFilter.TabIndex = 663; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(129, 26); + this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(32, 17); + this.label2.TabIndex = 662; + this.label2.Text = "类目"; + // + // cmbGroupFilter + // + this.cmbGroupFilter.FormattingEnabled = true; + this.cmbGroupFilter.Location = new System.Drawing.Point(36, 22); + this.cmbGroupFilter.Name = "cmbGroupFilter"; + this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25); + this.cmbGroupFilter.TabIndex = 641; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(7, 25); + this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(32, 17); + this.label20.TabIndex = 570; + this.label20.Text = "分组"; + // + // txtExtCodeFilter + // + this.txtExtCodeFilter.Location = new System.Drawing.Point(36, 51); + this.txtExtCodeFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtExtCodeFilter.Name = "txtExtCodeFilter"; + this.txtExtCodeFilter.Size = new System.Drawing.Size(92, 23); + this.txtExtCodeFilter.TabIndex = 555; + // // lblWaitToUp // this.lblWaitToUp.AutoSize = true; this.lblWaitToUp.Cursor = System.Windows.Forms.Cursors.Hand; this.lblWaitToUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWaitToUp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.lblWaitToUp.Location = new System.Drawing.Point(8, 108); + this.lblWaitToUp.Location = new System.Drawing.Point(119, 110); this.lblWaitToUp.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.lblWaitToUp.Name = "lblWaitToUp"; - this.lblWaitToUp.Size = new System.Drawing.Size(95, 17); + this.lblWaitToUp.Size = new System.Drawing.Size(71, 17); this.lblWaitToUp.TabIndex = 541; - this.lblWaitToUp.Text = "待上传商品 0 件"; + this.lblWaitToUp.Text = "待上传 0 件"; this.lblWaitToUp.Click += new System.EventHandler(this.lblWaitToUp_Click); // - // lblGoodsCount - // - this.lblGoodsCount.AutoSize = true; - this.lblGoodsCount.Location = new System.Drawing.Point(155, 81); - this.lblGoodsCount.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.lblGoodsCount.Name = "lblGoodsCount"; - this.lblGoodsCount.Size = new System.Drawing.Size(131, 17); - this.lblGoodsCount.TabIndex = 537; - this.lblGoodsCount.Text = "产品库中共有 0 件商品"; - this.lblGoodsCount.Click += new System.EventHandler(this.lblGoodsCount_Click); - // // txtAddCount // - this.txtAddCount.Location = new System.Drawing.Point(10, 78); + this.txtAddCount.Location = new System.Drawing.Point(213, 107); this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtAddCount.Name = "txtAddCount"; - this.txtAddCount.Size = new System.Drawing.Size(47, 23); + this.txtAddCount.Size = new System.Drawing.Size(36, 23); this.txtAddCount.TabIndex = 536; this.txtAddCount.Text = "500"; // @@ -750,9 +880,9 @@ namespace TemuKJD.WXForms.ProductForms this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand; this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.panelEx2.Location = new System.Drawing.Point(60, 78); + this.panelEx2.Location = new System.Drawing.Point(253, 107); this.panelEx2.Name = "panelEx2"; - this.panelEx2.Size = new System.Drawing.Size(92, 23); + this.panelEx2.Size = new System.Drawing.Size(58, 23); this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; this.panelEx2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.panelEx2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -765,13 +895,13 @@ namespace TemuKJD.WXForms.ProductForms this.panelEx2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.panelEx2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.panelEx2.TabIndex = 431; - this.panelEx2.Text = "随机添加商品"; + this.panelEx2.Text = "随机添加"; this.panelEx2.Click += new System.EventHandler(this.btnRandomAdd_Click); // // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(8, 54); + this.label16.Location = new System.Drawing.Point(7, 54); this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(32, 17); @@ -787,7 +917,7 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; - this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 140); + this.ucGroupBoxEx1.Size = new System.Drawing.Size(136, 140); this.ucGroupBoxEx1.TabIndex = 399; this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "基础"; @@ -801,7 +931,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnRefreshShop.Location = new System.Drawing.Point(17, 31); this.btnRefreshShop.Name = "btnRefreshShop"; - this.btnRefreshShop.Size = new System.Drawing.Size(110, 24); + this.btnRefreshShop.Size = new System.Drawing.Size(102, 24); this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -853,6 +983,8 @@ namespace TemuKJD.WXForms.ProductForms this.splitContainer2.Panel2.Controls.Add(this.txtTest20981); this.splitContainer2.Panel2.Controls.Add(this.btnTest20981); this.splitContainer2.Panel2.Controls.Add(this.pbLoading); + this.splitContainer2.Panel2.Controls.Add(this.label11); + this.splitContainer2.Panel2.Controls.Add(this.txtSinglePriceAdd); this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct); this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); this.splitContainer2.Size = new System.Drawing.Size(1523, 372); @@ -886,6 +1018,7 @@ namespace TemuKJD.WXForms.ProductForms this.colSelectProduct, this.colLoginStatus, this.colCanUse, + this.colUploadCount, this.colRemaining, this.colMessage}); this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; @@ -898,88 +1031,6 @@ namespace TemuKJD.WXForms.ProductForms this.dgvShop.TabIndex = 6; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // - // colSelect - // - this.colSelect.HeaderText = "全选"; - this.colSelect.Name = "colSelect"; - this.colSelect.ReadOnly = true; - this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colSelect.Width = 28; - // - // colShopLoginName - // - this.colShopLoginName.HeaderText = "店铺登录名"; - this.colShopLoginName.Name = "colShopLoginName"; - this.colShopLoginName.ReadOnly = true; - this.colShopLoginName.Visible = false; - // - // colShopId - // - this.colShopId.HeaderText = "店铺Id"; - this.colShopId.Name = "colShopId"; - this.colShopId.ReadOnly = true; - this.colShopId.Visible = false; - this.colShopId.Width = 55; - // - // colShopName - // - this.colShopName.FillWeight = 150F; - this.colShopName.HeaderText = "店铺名称"; - this.colShopName.Name = "colShopName"; - this.colShopName.ReadOnly = true; - this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colShopName.Width = 70; - // - // colShopNotes - // - this.colShopNotes.HeaderText = "分组"; - this.colShopNotes.Name = "colShopNotes"; - this.colShopNotes.ReadOnly = true; - this.colShopNotes.Width = 70; - // - // colSelectProduct - // - this.colSelectProduct.HeaderText = "选择商品"; - this.colSelectProduct.Name = "colSelectProduct"; - this.colSelectProduct.ReadOnly = true; - this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colSelectProduct.Visible = false; - this.colSelectProduct.Width = 62; - // - // colLoginStatus - // - this.colLoginStatus.HeaderText = "状态"; - this.colLoginStatus.Name = "colLoginStatus"; - this.colLoginStatus.ReadOnly = true; - this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colLoginStatus.Width = 40; - // - // colCanUse - // - this.colCanUse.HeaderText = "可用"; - this.colCanUse.Name = "colCanUse"; - this.colCanUse.ReadOnly = true; - this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colCanUse.Visible = false; - this.colCanUse.Width = 28; - // - // colRemaining - // - this.colRemaining.HeaderText = "月限额"; - this.colRemaining.Name = "colRemaining"; - this.colRemaining.ReadOnly = true; - this.colRemaining.Visible = false; - // - // colMessage - // - this.colMessage.HeaderText = "消息"; - this.colMessage.Name = "colMessage"; - this.colMessage.ReadOnly = true; - // // txtTest20981 // this.txtTest20981.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1028,6 +1079,30 @@ namespace TemuKJD.WXForms.ProductForms this.pbLoading.TabStop = false; this.pbLoading.Visible = false; // + // label11 + // + this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(25, 47); + this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(68, 17); + this.label11.TabIndex = 536; + this.label11.Text = "元,单买加"; + this.label11.Visible = false; + // + // txtSinglePriceAdd + // + this.txtSinglePriceAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtSinglePriceAdd.Location = new System.Drawing.Point(93, 44); + this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSinglePriceAdd.Name = "txtSinglePriceAdd"; + this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23); + this.txtSinglePriceAdd.TabIndex = 587; + this.txtSinglePriceAdd.Text = "1.0"; + this.txtSinglePriceAdd.Visible = false; + this.txtSinglePriceAdd.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); + // // dgvSelectProduct // this.dgvSelectProduct.AllowUserToAddRows = false; @@ -1347,6 +1422,95 @@ namespace TemuKJD.WXForms.ProductForms this.panel1.TabIndex = 189; this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colShopLoginName + // + this.colShopLoginName.HeaderText = "店铺登录名"; + this.colShopLoginName.Name = "colShopLoginName"; + this.colShopLoginName.ReadOnly = true; + this.colShopLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.FillWeight = 150F; + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 66; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "分组"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 66; + // + // colSelectProduct + // + this.colSelectProduct.HeaderText = "选择商品"; + this.colSelectProduct.Name = "colSelectProduct"; + this.colSelectProduct.ReadOnly = true; + this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelectProduct.Visible = false; + this.colSelectProduct.Width = 62; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 38; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colUploadCount + // + this.colUploadCount.HeaderText = "已传"; + this.colUploadCount.Name = "colUploadCount"; + this.colUploadCount.ReadOnly = true; + this.colUploadCount.Width = 38; + // + // colRemaining + // + this.colRemaining.HeaderText = "月限额"; + this.colRemaining.Name = "colRemaining"; + this.colRemaining.ReadOnly = true; + this.colRemaining.Visible = false; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + // // WXDBProdUploadForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1428,16 +1592,6 @@ namespace TemuKJD.WXForms.ProductForms private UserComponent.UcCheckBox chkStepAddPrice; private DevComponents.DotNetBar.PanelEx btnClearDgv; private UserComponent.UcCheckBox chkAddMorePriceFirst; - private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; - private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct; - private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; - private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; - private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private System.Windows.Forms.FlowLayoutPanel fPnlPriceRule; private UcAddPrice ucAddPrice1; private UcAddPrice ucAddPrice3; @@ -1482,5 +1636,28 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.Label label7; private System.Windows.Forms.TextBox txtWaitSeconds; private System.Windows.Forms.Label label6; + private UserComponent.UcCheckBox chkHighestPriceSku; + private System.Windows.Forms.TextBox txtReplaceText; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox txtMinPrice; + private System.Windows.Forms.Label label8; + private UserComponent.UcCheckBox chkSameSpecPrice; + private System.Windows.Forms.ComboBox cmbSourceType; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.ComboBox cmbWxSafe; + private System.Windows.Forms.Label label13; + private UserComponent.UcCheckBox chkSkipUploaded; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colUploadCount; + private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index f935b02..a37d403 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -26,6 +26,7 @@ using TemuKJD.WXForms.ShopForms; using AllBase.Model.Result.PDDResult; using AllBase.Model.Param.WXParam; using AllBase.Model.Result.WXResult; +using Newtonsoft.Json; namespace TemuKJD.WXForms.ProductForms { @@ -56,6 +57,8 @@ namespace TemuKJD.WXForms.ProductForms this.panel1.Height = this.Height - 60; this.panel1.SendToBack(); + cmbWxSafe.SelectedIndex = 0; + lstTemuDBProductSelect = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("wx_db_prod_upload_list"); if (lstTemuDBProductSelect == null) lstTemuDBProductSelect = new NaiBa.Util.ConcurrentList(); @@ -106,11 +109,11 @@ namespace TemuKJD.WXForms.ProductForms wxUploadRule = new WXUploadRule(); - this.lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + this.lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件"; int prodCount = 0; var list = GetRandomProductList(out prodCount, 1, 1); - lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品"; + lblGoodsCount.Text = "产品库 " + prodCount + " 件"; this.panel1.SendToBack(); chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false); @@ -126,12 +129,12 @@ namespace TemuKJD.WXForms.ProductForms dgvSelectProduct.Columns["colSkuFakeImg"].Visible = false; -// if (BaseClass.SaLevel == 1) -// { -// dgvSelectProduct.Columns["colSkuFakeImg"].Visible = true; -// } +// if (BaseClass.SaLevel == 1) +// { +// dgvSelectProduct.Columns["colSkuFakeImg"].Visible = true; +// } //#if DEBUG -// dgvSelectProduct.Columns["colSkuFakeImg"].Visible = true; +// dgvSelectProduct.Columns["colSkuFakeImg"].Visible = true; //#endif IsLoadComplate = true; @@ -254,7 +257,8 @@ namespace TemuKJD.WXForms.ProductForms shopEntity.Notes, "选择商品", canUse ? "在线" : "掉线", - canUse, + canUse, + 0, shopEntity.AddProductRemaining, string.Empty ); @@ -485,7 +489,6 @@ namespace TemuKJD.WXForms.ProductForms } if (cancellationTokenSource.IsCancellationRequested) break; - var randomShop = randomShopLst[Randomx.GetId(randomShopLst.Count)]; while (currentShopList.Count >= 5) // 最多5店同传 { Thread.Sleep(100); @@ -493,25 +496,30 @@ namespace TemuKJD.WXForms.ProductForms if (cancellationTokenSource.IsCancellationRequested) break; + var randomShop = randomShopLst[Randomx.GetId(randomShopLst.Count)]; while (currentShopList.Any(s => s.ShopId == randomShop.ShopId)) { Thread.Sleep(500); - randomShop = randomShopLst[Randomx.GetId(randomShopLst.Count)]; + var randomShopTmpLst = randomShopLst.Where(s => !currentShopList.Contains(s)).ToList(); + if (randomShopTmpLst.Count == 0) + continue; + randomShop = randomShopTmpLst[Randomx.GetId(randomShopTmpLst.Count)]; } currentShopList.Add(randomShop); if (cancellationTokenSource.IsCancellationRequested) break; + // 商品已全部上传,退出 if (lstTemuDBProductSelect.Count <= 0) { currentShopList.Remove(randomShop); break; } - var prod = lstTemuDBProductSelect[0]; + var selectProd = lstTemuDBProductSelect[0]; if (randomShop != null) { - prod.shop_id = randomShop.ShopId; - prod.shop_account = randomShop.ShopAccount = randomShop.ShopAccount; + selectProd.shop_id = randomShop.ShopId; + selectProd.shop_account = randomShop.ShopAccount = randomShop.ShopAccount; } else { @@ -525,7 +533,7 @@ namespace TemuKJD.WXForms.ProductForms NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_db_prod_upload_list", this.lstTemuDBProductSelect); Invoke(new Action(() => { - lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件"; })); Invoke(new Action(() => @@ -535,7 +543,7 @@ namespace TemuKJD.WXForms.ProductForms this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1); })); - if (prod == null) + if (selectProd == null) { Invoke(new Action(() => { @@ -545,29 +553,43 @@ namespace TemuKJD.WXForms.ProductForms continue; } + // 过滤标题 + var lstTitleReplaceText = new List(); + lstTitleReplaceText.Clear(); + if (!txtReplaceText.Text.Trim().IsNullOrEmpty()) + lstTitleReplaceText.AddRange(txtReplaceText.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)); + // 过滤标题内指定词语 + if (lstTitleReplaceText.Count > 0) + { + foreach (var txt in lstTitleReplaceText) + { + selectProd.product_name = selectProd.product_name.Replace(txt, ""); + } + } + Invoke(new Action(() => { int rowIndex = 0; this.dgvSelectProduct.Rows.Insert(rowIndex, true, - prod.id, - prod.shop_id, - prod.shop_account, + selectProd.id, + selectProd.shop_id, + selectProd.shop_account, "登录", "进店", - prod.spu_id, - prod.skc_id, - prod.main_img, + selectProd.spu_id, + selectProd.skc_id, + selectProd.main_img, null, "", null, - prod.product_name, // 用户端显示商品原名 - prod.cat_name, - prod.ext_code, - prod.status, - prod.draft_id, - prod.notes, - (prod.user_notes + " 编辑").Trim(), + selectProd.product_name, // 用户端显示商品原名 + selectProd.cat_name, + selectProd.ext_code, + selectProd.status, + selectProd.draft_id, + selectProd.notes, + (selectProd.user_notes + " 编辑").Trim(), "删除", "", ""); @@ -591,12 +613,12 @@ namespace TemuKJD.WXForms.ProductForms DateTime startTime = DateTime.Now; for (int j = 0; j < 1; j++) { - var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == prod.shop_id); + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == selectProd.shop_id); if (shop == null) continue; var row = dgvSelectProduct.Rows.Cast().FirstOrDefault(r => - r.Cells["colSelectId"]?.Value.ToString() == prod.id.ToString()); + r.Cells["colSelectId"]?.Value.ToString() == selectProd.id.ToString()); double duration = 0; if (row == null) { @@ -607,14 +629,14 @@ namespace TemuKJD.WXForms.ProductForms continue; } - KJDDBProduct kjdDbProd = prod.kjdDbProduct; + KJDDBProduct kjdDbProd = selectProd.kjdDbProduct; if (kjdDbProd == null) - kjdDbProd = GetProductDetail(prod.out_product_Id.ToString()); + kjdDbProd = GetProductDetail(selectProd.out_product_Id.ToString()); if (kjdDbProd == null || kjdDbProd.id == 0) { if (kjdDbProd?.id == 0) { - prod.status = "已清除"; + selectProd.status = "已清除"; } Invoke(new Action(() => @@ -649,7 +671,7 @@ namespace TemuKJD.WXForms.ProductForms break; //将商品上传 - result = UploadProduct(shop, kjdDbProd, prod, row.Cells["colOpResult"], startTime); + result = UploadProduct(shop, kjdDbProd, selectProd, row.Cells["colOpResult"], startTime); Invoke(new Action(() => { @@ -674,10 +696,29 @@ namespace TemuKJD.WXForms.ProductForms } Thread.Sleep(Randomx.GetId(200, 300)); + //额外等待时间(无论失败与否) + var waitTime = 0; + Invoke(new Action(() => { waitTime = txtWaitSeconds.Text.Trim().ParseToInt(); })); + if (waitTime > 0) + Thread.Sleep(Randomx.GetId(waitTime * 1000, (waitTime + 10) * 1000)); + + selectProd.status = BaseRegex.GetStringJson(ref result, "status"); + if (string.IsNullOrWhiteSpace(selectProd.status)) + selectProd.status = "待上传"; + var productDraftId = BaseRegex.GetStringJson(ref result, "draftId"); + var timeSpan = DateTime.Now - startTime; duration = timeSpan.TotalSeconds; + // 至少15秒才完成一件商品 + while (duration < 15) + { + Thread.Sleep(1000); + timeSpan = DateTime.Now - startTime; + duration = timeSpan.TotalSeconds; + } var error = BaseRegex.GetStringJson(ref result, "errMsg"); + // 上传失败 if (!result.Contains("\"success\":true") && !result.Contains("上传成功")) { if (string.IsNullOrWhiteSpace(error)) @@ -686,39 +727,32 @@ namespace TemuKJD.WXForms.ProductForms { if (row.Index >= 0) { + row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id row.Cells["colOpResult"].Value = error + " " + duration.ParseToInt() + "秒"; } })); - goto UploadEnd; } - prod.status = BaseRegex.GetStringJson(ref result, "status"); - if (string.IsNullOrWhiteSpace(prod.status)) - prod.status = "待上传"; - var productDraftId = BaseRegex.GetStringJson(ref result, "draftId"); - - Invoke(new Action(() => + // 上传成功/上传到草稿箱 + else { - if (row.Index >= 0) + Invoke(new Action(() => { - row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id - row.Cells["colAddTime"].Value = DateTime.Now.ToString("yy-MM-dd HH:mm:ss"); - row.Cells["colOpResult"].Value = (prod.status == "已上传" ? "已成功上传" : "已上传 发生错误:") + (" " + error).TrimEnd(' ') + " " + duration.ParseToInt() + "秒"; - row.Cells["colMsg"].Value = prod.status; - } - })); - - UploadEnd:; - //额外等待时间(无论失败与否) - var waitTime = 0; - Invoke(new Action(() => { waitTime = txtWaitSeconds.Text.Trim().ParseToInt(); })); - if (waitTime > 0) - Thread.Sleep(Randomx.GetId(waitTime * 1000, (waitTime + 10) * 1000)); + if (row.Index >= 0) + { + row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id + row.Cells["colAddTime"].Value = DateTime.Now.ToString("yy-MM-dd HH:mm:ss"); + row.Cells["colOpResult"].Value = (selectProd.status == "已上传" ? "已成功上传" : "已上传 发生错误:") + (" " + error).TrimEnd(' ') + " " + duration.ParseToInt() + "秒"; + row.Cells["colMsg"].Value = selectProd.status; + } + })); + } } + currentShopList.Remove(randomShop); }); } - for (int i = 0; i < 200 && currentShopList.Count > 0; i++) + for (int i = 0; i < 300 && currentShopList.Count > 0; i++) { Thread.Sleep(1000); if (cancellationTokenSource.IsCancellationRequested) @@ -784,7 +818,7 @@ namespace TemuKJD.WXForms.ProductForms string UploadProduct(ShopLoginInfo shop, KJDDBProduct dbProd, TemuDBProductSelect selectProd, DataGridViewCell cell, DateTime startTime) { - Thread.Sleep(Randomx.GetId(300, 2000)); + Thread.Sleep(Randomx.GetId(200, 300)); if (shop == null || string.IsNullOrEmpty(shop.ShopId) || shop.LoginStatus != "登录成功") { return "店铺为空或未登录!"; @@ -796,17 +830,227 @@ namespace TemuKJD.WXForms.ProductForms cell.Value = "正在初始化上传"; })); } - + + if (chkSkipUploaded.Checked) + { + var searchExtCode = "EC1" + dbProd.spu_id + "A"; + var searchRst = WXUpload.searchProduct(shop, searchExtCode); + if (!searchRst.Contains("\"code\":0") && !searchRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref searchRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = searchRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询错误 " + error + "\"}"; + } + try + { + var num = JObject.Parse(searchRst)["totalNum"].ParseToInt(); + if (num > 0) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品已存在,选择跳过\"}"; + } + } + catch (Exception ex) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询错误 " + ex.Message + "\"}"; + } + } + + #region 将产品数据初始化成微信小店支持的参数 + JObject prodJObj = new JObject(); + try + { + prodJObj = JObject.Parse(dbProd.product_json); + + var lstTitleReplaceText = new List(); + lstTitleReplaceText.Clear(); + if (!txtReplaceText.Text.Trim().IsNullOrEmpty()) + lstTitleReplaceText.AddRange(txtReplaceText.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)); + // 过滤标题内指定词语 + if (lstTitleReplaceText.Count > 0) + { + foreach (var txt in lstTitleReplaceText) + { + dbProd.product_name = dbProd.product_name.Replace(txt, ""); + } + + var goods_name = prodJObj["detail"]["goods_name"].ParseToString(); + foreach (var txt in lstTitleReplaceText) + { + goods_name = goods_name.Replace(txt, ""); + } + prodJObj["detail"]["goods_name"] = goods_name; + + var tiny_name = prodJObj["detail"]["tiny_name"].ParseToString(); + foreach (var txt in lstTitleReplaceText) + { + tiny_name = tiny_name.Replace(txt, ""); + } + prodJObj["detail"]["tiny_name"] = tiny_name; + + var goods_desc = prodJObj["detail"]["goods_desc"].ParseToString(); + foreach (var txt in lstTitleReplaceText) + { + goods_desc = goods_desc.Replace(txt, ""); + } + prodJObj["detail"]["goods_desc"] = goods_desc; + + var share_desc = prodJObj["detail"]["share_desc"].ParseToString(); + foreach (var txt in lstTitleReplaceText) + { + share_desc = share_desc.Replace(txt, ""); + } + prodJObj["detail"]["share_desc"] = share_desc; + } + // 替换货号 + if (!string.IsNullOrEmpty(dbProd.ext_code)) + prodJObj["detail"]["out_goods_sn"] = dbProd.ext_code; + // 替换编辑过的sku + if (!string.IsNullOrEmpty(dbProd.sku_edit_json)) + prodJObj["detail"]["sku"] = JArray.Parse(JsonHelper.SerializeObject(JsonHelper.DeserializeJsonToList(dbProd.sku_edit_json))); + if (chkSameSpecPrice.Checked) + { + var priceTextLst = dbProd.price_text.Split('-'); + if (priceTextLst.Length != 2 || priceTextLst[0] != priceTextLst[1]) + { + Dictionary specPriceDic = new Dictionary(); + Dictionary specMultiPriceDic = new Dictionary(); + var skuJArr = prodJObj["detail"]["sku"] as JArray; + try + { + // 计算主spec的最高价 + foreach (var skuJObj in skuJArr) + { + var specJArr = skuJObj["spec"] as JArray; + if (!specPriceDic.ContainsKey(specJArr[0]["spec_name"].ParseToString()) || skuJObj["price"].ParseToInt() > specPriceDic[specJArr[0]["spec_name"].ParseToString()]) + { + specPriceDic[specJArr[0]["spec_name"].ParseToString()] = skuJObj["price"].ParseToInt(); + } + if (!specMultiPriceDic.ContainsKey(specJArr[0]["spec_name"].ParseToString()) || skuJObj["multi_price"].ParseToInt() > specMultiPriceDic[specJArr[0]["spec_name"].ParseToString()]) + { + specMultiPriceDic[specJArr[0]["spec_name"].ParseToString()] = skuJObj["multi_price"].ParseToInt(); + } + } + // 统一按最高价设置 + foreach (var skuJObj in skuJArr) + { + var specJArr = skuJObj["spec"] as JArray; + skuJObj["price"] = specPriceDic[specJArr[0]["spec_name"].ParseToString()]; + skuJObj["multi_price"] = specMultiPriceDic[specJArr[0]["spec_name"].ParseToString()]; + } + } + catch (Exception ex) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品数据初始化失败" + ex.Message + "\"}"; + } + } + } + if (chkHighestPriceSku.Checked) + { + int price = 0; + var skuJArr = prodJObj["detail"]["sku"] as JArray; + try + { + // 计算主spec的最高价 + foreach (var skuJObj in skuJArr) + { + if (price < skuJObj["multi_price"].ParseToInt()) + price = skuJObj["multi_price"].ParseToInt(); + } + + var product_json_tmp = JsonHelper.SerializeObject(prodJObj); + + // 移除第一组所有sku + skuJArr.RemoveAll(); + + // 序列化第二组,从组中挑选符合价格条件的sku往第一组内填写 + var prodJObj2 = JObject.Parse(product_json_tmp); + var skuJArr2 = prodJObj2["detail"]["sku"] as JArray; + foreach (var skuJObj2 in skuJArr2) + { + if (skuJObj2["multi_price"].ParseToInt() >= price) + skuJArr.Add(skuJObj2); + } + if (skuJArr.Count == 0) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品sku差价不满足上货条件,跳过\"}"; + } + } + catch (Exception ex) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品数据初始化失败" + ex.Message + "\"}"; + } + } + // 过滤低价sku,如果所有sku都不达标,跳过商品 + if (!string.IsNullOrEmpty(txtMinPrice.Text)) + { + var product_json_tmp = JsonHelper.SerializeObject(prodJObj); + + // 移除第一组所有sku + var skuJArr = prodJObj["detail"]["sku"] as JArray; + skuJArr.RemoveAll(); + + // 序列化第二组,从组中挑选符合价格条件的sku往第一组内填写 + var prodJObj2 = JObject.Parse(product_json_tmp); + var skuJArr2 = prodJObj2["detail"]["sku"] as JArray; + foreach (var skuJObj2 in skuJArr2) + { + if (skuJObj2["multi_price"].ParseToInt() >= this.txtMinPrice.Text.Trim().ParseToDecimal() * 100) + skuJArr.Add(skuJObj2); + } + if (skuJArr.Count == 0) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品sku价格不满足上货条件,跳过\"}"; + } + } + dbProd.product_json = JsonHelper.SerializeObject(prodJObj); + } + catch (Exception ex) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品数据初始化失败" + ex.Message + "\"}"; + } + #endregion + var prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); prodInfo.detail.galleries.RemoveAll(g => g.type == 6); // 视频暂时移除,以后再视情况加上 + + int mainImgCount = (prodInfo?.detail?.galleries?.Where(g => g.type == 1).Count()).ParseToInt(); + if (mainImgCount > 0 && mainImgCount < 3) + { + var gallery1 = prodInfo?.detail?.galleries?.Where(g => g.type == 2).FirstOrDefault(); + if (gallery1 != null) + { + prodInfo.detail.galleries.Add(new gallery_item() + { + type = 1, + url = gallery1.url, + width = gallery1.width, + height = gallery1.height, + }); + } + if (mainImgCount == 1 && (prodInfo?.detail?.galleries?.Where(g => g.type == 1).Count()).ParseToInt() > 1) + { + var gallery2 = prodInfo?.detail?.galleries?[1]; + if (gallery2 != null) + { + prodInfo.detail.galleries.Add(new gallery_item() + { + type = 1, + url = gallery2.url, + width = gallery2.width, + height = gallery2.height, + }); + } + } + } if ((prodInfo?.detail?.galleries?.Where(g => g.type == 1).Count()).ParseToInt() < 3) { Invoke(new Action(() => { cell.Value = "主图数量少于三张"; })); - return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"msg\":\"主图数量少于三张\"}"; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"主图数量少于三张\"}"; } // 生成初始化上传商品对象 @@ -814,10 +1058,30 @@ namespace TemuKJD.WXForms.ProductForms // 生成上传商品对象 var upProdParam = new WXUploadProductParam(); - upProdInitParam.product.info.title = prodInfo.detail.goods_name; - upProdParam.product.info.title = prodInfo.detail.goods_name; + // 设置标题 + upProdInitParam.product.info.title = dbProd.product_name.IsNullOrEmpty() ? prodInfo.detail.goods_name : dbProd.product_name; + upProdParam.product.info.title = dbProd.product_name.IsNullOrEmpty() ? prodInfo.detail.goods_name : dbProd.product_name; upProdParam.sessionInfo.sessionId = upProdInitParam.product.sessionId; - + // 设置货号 + var extCode = dbProd.ext_code.IsNullOrEmpty() ? prodInfo.detail.out_goods_sn : dbProd.ext_code; + if (extCode.IsNullOrEmpty()) + { + //extCode = "EC" + Randomx.GetId(1000).ToString().PadLeft(3, '0') + dbProd.spu_id + "C"; + extCode = "EC1" + dbProd.spu_id + "A"; + } + upProdParam.product.info.spuCode = extCode; + + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在识别商品"; + })); + } + Thread.Sleep(Randomx.GetId(500, 800)); + + //------------------------------------------------------------------------------------------------------------------------------------- + // ai识别类目暂存主图位置 int imgId = 0; string tempImgPath = Path.GetTempPath() + "\\"; string folderLetters = "abcdefghijklmnopqrstuvwxyz1234567890"; @@ -826,16 +1090,27 @@ namespace TemuKJD.WXForms.ProductForms tempImgPath += folderLetters[Randomx.GetId(folderLetters.Length)]; } List tempImgFullPathLst = new List(); - + + //------------------------------------------------------------------------------------------------------------------------------------- + // 上传主图 foreach (var gallery_item in prodInfo.detail.galleries.Where(g => g.type == 1).Take(9)) // 9张主图 { var upImgAuthRst = WXUpload.getUploadTempImgAuth(shop); + for (int i = 0; i < 10 && upImgAuthRst.Contains("LogicError"); i++) + { + Thread.Sleep(Randomx.GetId(3000, 6000)); + upImgAuthRst = WXUpload.getUploadTempImgAuth(shop); + Invoke(new Action(() => + { + cell.Value = "图片提报失败,正在重试。"; + })); + } if (!upImgAuthRst.Contains("\"code\":0")) { var error = BaseRegex.GetStringJson(ref upImgAuthRst, "msg"); if (string.IsNullOrEmpty(error)) error = upImgAuthRst; - return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + error + "\"}"; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"申请上传主图失败 " + error + "\"}"; } string disK = BaseRegex.GetStringJson(ref upImgAuthRst, "disK"); long disT = BaseRegex.GetLongJson(ref upImgAuthRst, "disT"); @@ -858,6 +1133,7 @@ namespace TemuKJD.WXForms.ProductForms g.DrawImage(image, new Rectangle(0, 0, imageBg.Width, imageBg.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); } + // 取前三张图片保存到系统temp路径,配合商品标题获取商品类目 if (imgId < 3) { imgId++; @@ -890,7 +1166,7 @@ namespace TemuKJD.WXForms.ProductForms } catch (Exception ex) { - return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + "修改sku图片失败 " + ex.Message + "\"}"; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"修改主图失败 " + ex.Message + "\"}"; } //------------------------------------------------------------------------------------------------------------------------------------- @@ -909,6 +1185,16 @@ namespace TemuKJD.WXForms.ProductForms Thread.Sleep(Randomx.GetId(10, 50)); } + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在生成类目属性"; + })); + } + Thread.Sleep(Randomx.GetId(500, 800)); + //------------------------------------------------------------------------------------------------------------------------------------- + // 根据Ai分类,获取类目信息 //{"code":0,"predInfo":{"firstCatRes":[{"catId":10000111,"catName":"服饰内衣","level":1},{"catId":10000111,"catName":"服饰内衣","level":1},{"catId":10000111,"catName":"服饰内衣","level":1}],"secondCatRes":[{"catId":10000113,"catName":"女装","level":2},{"catId":10000113,"catName":"女装","level":2},{"catId":10000113,"catName":"女装","level":2}],"thirdCatRes":[{"catId":547705,"catName":"牛仔裤","level":3,"modelVersion":""},{"catId":547704,"catName":"加绒裤","level":3,"modelVersion":"商品标题含'加绒加厚、保暖'等关键词,这表示裤子具备加绒保暖功能。主图展示了加绒内衬,也符合【服饰内衣:女装:裤子:加绒裤】类目特征。"},{"catId":547701,"catName":"休闲裤","level":3,"modelVersion":""}],"singleSecondCatRes":[],"singleFirstCatRes":[],"isSupportedCate":1},"aiCategoryList":[{"id":547705,"paths":[{"id":"10000111","name":"服饰内衣","sonIdList":["10000397","10000115","10000112","10000113","10000114"],"fId":"0","level":1,"leaf":false},{"id":"10000113","name":"女装","sonIdList":["546810","546811","530041","547706","6090","6089","6088","6087","6083","6076","6073","6070","6065","6063","6058","10000672","10000671","10000670","10000669","10000668","10000667","10000666","10000665","10000664","10000663","10000662","10000661","10000660","10000659","10000658","10000657","10000656","10000655"],"fId":"10000111","level":2,"leaf":false},{"id":"10000672","name":"裤子","sonIdList":["547699","547700","547701","547702","547703","547704","547705"],"fId":"10000113","level":3,"leaf":false},{"id":"547705","name":"牛仔裤","fId":"10000672","level":4,"leaf":true,"state":0,"hasTrialCategory":false,"isTrialCategory":false,"isLocalLife":false}],"depositAmount":0,"catAuth":true,"limitSubjectTypes":[]},{"id":547704,"paths":[{"id":"10000111","name":"服饰内衣","sonIdList":["10000397","10000115","10000112","10000113","10000114"],"fId":"0","level":1,"leaf":false},{"id":"10000113","name":"女装","sonIdList":["546810","546811","530041","547706","6090","6089","6088","6087","6083","6076","6073","6070","6065","6063","6058","10000672","10000671","10000670","10000669","10000668","10000667","10000666","10000665","10000664","10000663","10000662","10000661","10000660","10000659","10000658","10000657","10000656","10000655"],"fId":"10000111","level":2,"leaf":false},{"id":"10000672","name":"裤子","sonIdList":["547699","547700","547701","547702","547703","547704","547705"],"fId":"10000113","level":3,"leaf":false},{"id":"547704","name":"加绒裤","fId":"10000672","level":4,"leaf":true,"state":0,"hasTrialCategory":false,"isTrialCategory":false,"isLocalLife":false}],"depositAmount":0,"catAuth":true,"limitSubjectTypes":[]},{"id":547701,"paths":[{"id":"10000111","name":"服饰内衣","sonIdList":["10000397","10000115","10000112","10000113","10000114"],"fId":"0","level":1,"leaf":false},{"id":"10000113","name":"女装","sonIdList":["546810","546811","530041","547706","6090","6089","6088","6087","6083","6076","6073","6070","6065","6063","6058","10000672","10000671","10000670","10000669","10000668","10000667","10000666","10000665","10000664","10000663","10000662","10000661","10000660","10000659","10000658","10000657","10000656","10000655"],"fId":"10000111","level":2,"leaf":false},{"id":"10000672","name":"裤子","sonIdList":["547699","547700","547701","547702","547703","547704","547705"],"fId":"10000113","level":3,"leaf":false},{"id":"547701","name":"休闲裤","fId":"10000672","level":4,"leaf":true,"state":0,"hasTrialCategory":false,"isTrialCategory":false,"isLocalLife":false}],"depositAmount":0,"catAuth":true,"limitSubjectTypes":[]}],"version":"ProductClsRAG","noQualificationCatIds":[547705,547704,547701],"depositCatInfos":[{"catId":547705,"amountToPay":0,"error":false},{"catId":547704,"amountToPay":0,"error":false},{"catId":547701,"amountToPay":0,"error":false}],"visionCallMethod":"ProductClsRAG"} var productClassifyRst = WXUpload.getProductClassify(shop, upProdInitParam.product.info.title, tempImgFullPathLst); if (!productClassifyRst.Contains("\"code\":0")) @@ -916,18 +1202,454 @@ namespace TemuKJD.WXForms.ProductForms var error = BaseRegex.GetStringJson(ref productClassifyRst, "msg"); if (string.IsNullOrEmpty(error)) error = productClassifyRst; - return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + error + "\"}"; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"获取类目失败 " + error + "\"}"; } WXGetProdCateInfo cateInfo = new WXGetProdCateInfo(); + List aiCateIdLst = new List(); try { cateInfo = JsonHelper.DeserializeJsonToObject(productClassifyRst); + foreach (var catePath in cateInfo.aiCategoryList.FirstOrDefault().paths) + { + aiCateIdLst.Add(catePath.id.ParseToLong()); + } + string getCateRst = WXUpload.getCategoryOnShelf(shop, aiCateIdLst); + if (!getCateRst.Contains("\"code\":0")) + { + var error = BaseRegex.GetStringJson(ref getCateRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = getCateRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"获取类目模板失败" + error + "\"}"; + } + + JObject jCateRst = JObject.Parse(getCateRst); + upProdParam.product.info.category = JsonHelper.DeserializeJsonToList(JsonHelper.SerializeObject(jCateRst["category"])); + // 这里用了ai获取类目,如下填写 + upProdParam.product.info.recommendCategory = new recommendCategoryParam() + { + isAccepted = true, + categoryNames = new List(), + recommendSource = "ai", + interfaceName = "ProductClsRAG", + useNewInterface = 1, + }; + foreach (var cateParam in upProdParam.product.info.category) + { + upProdParam.product.info.recommendCategory.categoryNames.Add(cateParam.name); + } } catch (Exception ex) { return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + "根据图片获取类目失败 " + ex.Message + "\"}"; } + // 检测是否有类目上传权限 + long leafCatId = (upProdParam.product.info.category.LastOrDefault()?.catId).ParseToLong(); + var cateUpCheckRst = WXUpload.batchCheckCategoryRelation(shop, leafCatId); + if (!cateUpCheckRst.Contains("\"code\":0") && !cateUpCheckRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref cateUpCheckRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = cateUpCheckRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目校验错误 " + error + "\"}"; + } + if (!cateUpCheckRst.Contains("\"result\":1")) + { + Thread.Sleep(Randomx.GetId(1000, 2000)); + var cateAuthorRst = WXUpload.addFinderCategoryV2(shop, leafCatId); + if (!cateAuthorRst.Contains("\"code\":0") && !cateAuthorRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref cateAuthorRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = cateAuthorRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请错误 " + error + "\"}"; + } + } + + //todo //客服地址https://store.weixin.qq.com/shop/kf + // ai获取短标题 + #region 短标题 + WXGetShortTitleParam titleParam = new WXGetShortTitleParam() + { + categories = new List(), + headImgUrls = upProdParam.product.info.headImg, + productTitle = upProdParam.product.info.title, + }; + foreach (var cate in upProdParam.product.info.category) + { + titleParam.categories.Add(new categorieParam() { catId = cate.catId, catName = cate.name }); + } + var shortTitleRst = WXUpload.genProductShortTitle(shop, titleParam); + if (!shortTitleRst.Contains("\"code\":0") && !shortTitleRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref shortTitleRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = shortTitleRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"短标题获取失败 " + error + "\"}"; + } + upProdParam.product.info.shortTitle = BaseRegex.GetStringJson(ref shortTitleRst, "shortTitle"); + upProdParam.product.info.aiGenShortTitle = upProdParam.product.info.shortTitle; + #endregion + + + #region 售后信息 + var addressRst = WXUpload.getAddress(shop); + if (!addressRst.Contains("\"code\":0") && !addressRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref addressRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = addressRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"售后地址获取失败 " + error + "\"}"; + } + upProdParam.product.info.afterSaleInfo = new afterSaleInfoParam(); + upProdParam.product.info.afterSaleInfo.afterSaleAddressId = BaseRegex.GetStringJson(ref addressRst, "addressId"); + #endregion + + #region 运费模板 + var expressRst = WXUpload.getFreightTemplate(shop); + if (!expressRst.Contains("\"code\":0") && !expressRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref expressRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = expressRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"运费模板获取失败 " + error + "\"}"; + } + upProdParam.product.info.expressInfo = new expressInfoParam(); + upProdParam.product.info.expressInfo.templateId = BaseRegex.GetStringJson(ref expressRst, "templateId"); + #endregion + + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在生成商品详情"; + })); + } + Thread.Sleep(Randomx.GetId(500, 800)); + #region 详情图 + upProdParam.product.info.detail = new productDetailParam(); // 详情图 + foreach (var gallery_item in prodInfo.detail.galleries.Where(g => g.type == 2)) + { + var locationStr = UploadImg(shop, gallery_item.url, cell); + if (!locationStr.Contains("\"success\":true")) + return locationStr; + var location = BaseRegex.GetStringJson(ref locationStr, "Location"); + upProdParam.product.info.detail.detailImg.Add(location); + Thread.Sleep(Randomx.GetId(10, 50)); + } + #endregion + + #region 匹配产品属性 + //真丝、蚕丝、香云纱、羊绒、羊毛、羊羔毛、羽绒、皮草 + upProdParam.product.info.param = new List(); // 商品属性值 + var productAttr = upProdParam.product.info.category.LastOrDefault().catInfo.productAttr; + foreach (var propInfo in prodInfo.property.goods_properties) + { + var attr = productAttr.attr.FirstOrDefault(r => r.name == propInfo.name); + if (attr == null) + { + if (propInfo.name.Contains("面料俗称")) + { + attr = productAttr.attr.FirstOrDefault(r => r.name == "面料材质"); + } + if (propInfo.name.Contains("适用年龄")) + { + attr = productAttr.attr.FirstOrDefault(r => r.name == "适用年龄" || r.name == "适用年龄段"); + } + if (propInfo.name.Contains("填充物")) + { + attr = productAttr.attr.FirstOrDefault(r => r.name == "填充物种类" || r.name == "填充物"); + } + } + if (attr == null) + { + continue; + } + var attrValueLst = attr.value.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries).ToList(); + var attrValue = attrValueLst.FirstOrDefault(v => v == propInfo.values.FirstOrDefault().value); + if (propInfo.name == "风格" && attrValue == null) + { + attrValue = attrValueLst.FirstOrDefault(v => v == propInfo.values.FirstOrDefault().value + "风"); + } + if (attr.type == "string") + { + attrValue = propInfo.values.FirstOrDefault()?.value; + } + if (attrValue.IsNullOrEmpty() && attr.isRequired == true) + { + if (attrValueLst.Contains("其他")) + attrValue = "其他"; + else if (attrValueLst.Contains("常规")) + attrValue = "常规"; + else if (attrValueLst.Contains("通用")) + attrValue = "通用"; + else + attrValue = attrValueLst.Where(v => !"真丝、蚕丝、香云纱、羊绒、羊毛、羊羔绒、羊羔毛、羽绒、皮草".Contains(v)).OrderBy(x => Guid.NewGuid()).FirstOrDefault(); + } + if (attrValue.IsNullOrEmpty()) + { + if (attrValueLst.Contains("其他")) + attrValue = "其他"; + else if (attrValueLst.Contains("通用")) + attrValue = "通用"; + } + if (attrValue.IsNullOrEmpty() && attr.type == "string") + { + attrValue = propInfo.values.FirstOrDefault()?.value; + } + if (attr.type == "decimal4_unit" || attr.type == "integer_unit") + { + if (attr.value == "%") + attrValue = "10 %"; + else if (attr.value == "g;kg") + attrValue = "50 g"; + else if (attr.value == "g") + attrValue = "10 g"; + else if (attr.value == "kg") + attrValue = "1 kg"; + } + + if (string.IsNullOrEmpty(attrValue)) + continue; + + var wxPropParam = new propParam(); + upProdParam.product.info.param.Add(wxPropParam); + var wxCategoryParam1 = new categoryPropParam() + { + catType = 7, + name = attr.name, + catInfo = new catInfoParam() { inputType = attr.normalRelease.ruleType, isRequired = attr.isRequired == true ? 1 : 0, isCustomize = 0 } + }; + var wxCategoryParam2 = new categoryPropParam() + { + catType = 7, + name = attrValue, + catInfo = new catInfoParam() { inputType = attr.normalRelease.ruleType, isRequired = attr.isRequired == true ? 1 : 0, isCustomize = 0 } + }; + wxPropParam.categorys.Add(wxCategoryParam1); + wxPropParam.categorys.Add(wxCategoryParam2); + } + foreach (var attr in productAttr.attr) + { + if (attr.isRequired != true) + continue; + // 已填写内没有但是必填属性 + if (upProdParam.product.info.param.Any(p => p.categorys.FirstOrDefault()?.name == attr.name)) + continue; + + var attrValueLst = attr.value.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries).ToList(); + string attrValue = ""; + if (attr.type == "string") + { + attrValue = "其他"; + } + if (attrValue.IsNullOrEmpty() && attr.isRequired == true) + { + if (attrValueLst.Contains("其他")) + attrValue = "其他"; + else if (attrValueLst.Contains("常规")) + attrValue = "常规"; + else if (attrValueLst.Contains("通用")) + attrValue = "通用"; + else if (attr.value.Contains("绒丝;羽毛;白鸭绒;白鹅绒;灰鸭绒;灰鹅绒;鸭毛片;鹅毛片")) + { + attrValue = "绒丝"; + } + else if (attrValueLst.Any(v => v.Contains("%"))) + { + attrValue = attrValueLst.FirstOrDefault(); + } + else + attrValue = attrValueLst.Where(v => !"真丝、蚕丝、香云纱、羊绒、羊毛、羊羔绒、羊羔毛、羽绒、皮草".Contains(v)).OrderBy(x => Guid.NewGuid()).FirstOrDefault(); + } + if (attr.type == "decimal4_unit" || attr.type == "integer_unit") + { + if (attr.value == "%") + attrValue = "10 %"; + else if (attr.value == "g;kg") + attrValue = "50 g"; + else if (attr.value == "g") + attrValue = "10 g"; + else if (attr.value == "kg") + attrValue = "1 kg"; + } + + var wxPropParam = new propParam(); + upProdParam.product.info.param.Add(wxPropParam); + var wxCategoryParam1 = new categoryPropParam() + { + catType = 7, + name = attr.name, + catInfo = new catInfoParam() { inputType = attr.normalRelease.ruleType, isRequired = attr.isRequired == true ? 1 : 0, isCustomize = 0 } + }; + var wxCategoryParam2 = new categoryPropParam() + { + catType = 7, + name = attrValue, + catInfo = new catInfoParam() { inputType = attr.normalRelease.ruleType, isRequired = attr.isRequired == true ? 1 : 0, isCustomize = 0 } + }; + wxPropParam.categorys.Add(wxCategoryParam1); + wxPropParam.categorys.Add(wxCategoryParam2); + } + #endregion + + + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在生成sku"; + })); + } + Thread.Sleep(1000); + + #region sku规格属性 + upProdParam.product.info.productSaleAttrs = new List(); + if (prodInfo.detail.sku.FirstOrDefault()?.spec?.Count > 0) + { + productSaleAttrParam attrParam = new productSaleAttrParam() + { + key = prodInfo.detail.sku.FirstOrDefault()?.spec[0].parent_name, + hasImg = true, + items = new List() + }; + upProdParam.product.info.productSaleAttrs.Add(attrParam); + foreach (var sku in prodInfo.detail.sku) + { + var spec = sku.spec[0]; + if (!attrParam.items.Any(it => it.value == spec.spec_name)) + { + // 上传sku图 + var locationStr = UploadImg(shop, sku.thumb_url, cell); + if (!locationStr.Contains("\"success\":true")) + return locationStr; + var location = BaseRegex.GetStringJson(ref locationStr, "Location"); + Thread.Sleep(Randomx.GetId(10, 50)); + + attrParam.items.Add(new productSaleAttrItemParam() { value = spec.spec_name, imgUrl = location, }); + } + } + } + if (prodInfo.detail.sku.FirstOrDefault()?.spec?.Count > 1) + { + productSaleAttrParam attrParam = new productSaleAttrParam() + { + key = prodInfo.detail.sku.FirstOrDefault()?.spec[1].parent_name, + hasImg = false, + items = new List() + }; + upProdParam.product.info.productSaleAttrs.Add(attrParam); + foreach (var sku in prodInfo.detail.sku) + { + var spec = sku.spec[1]; + if (!attrParam.items.Any(it => it.value == spec.spec_name)) + attrParam.items.Add(new productSaleAttrItemParam() { value = spec.spec_name }); + } + } + #endregion + + #region sku信息 + upProdParam.product.productSkus = new List(); + int skuIndex = 0; + int id = 3; + long catId = 200000000003; + long fCatId = 200000000003; + long valueCatId = (17 + Randomx.GetNumber(11)).ParseToLong(); + Dictionary dicSpecParentNameId = new Dictionary(); + Dictionary dicSpecParentNameCatId = new Dictionary(); + Dictionary dicSpecNamefCatId = new Dictionary(); + Dictionary dicSpecNameCatId = new Dictionary(); + foreach (var skuInfo in prodInfo.detail.sku) + { + foreach (var spec in skuInfo.spec) + { + if (!dicSpecParentNameId.Keys.Contains(spec.parent_name)) + { + dicSpecParentNameId[spec.parent_name] = id++; + dicSpecParentNameCatId[spec.parent_name] = catId++; + } + if (!dicSpecNamefCatId.Keys.Contains(spec.spec_name)) + { + dicSpecNamefCatId[spec.spec_name] = fCatId++; + dicSpecNameCatId[spec.spec_name] = valueCatId++; + } + } + } + foreach (var skuInfo in prodInfo.detail.sku) + { + productSkuParam skuParam = new productSkuParam(); + upProdParam.product.productSkus.Add(skuParam); + for (int i = skuInfo.spec.Count - 1; i >= 0; i--) + { + var specInfo = skuInfo.spec[i]; + skuParam.__skuKey = specInfo.parent_name + "." + specInfo.spec_name + "_"; + skuParam.__skuKey += specInfo.spec_name; + } + skuParam.__skuKey.TrimEnd('_'); + skuParam.index = skuIndex++; + skuParam.productSkuInfo = new productSkuInfoParam(); + // 加价 + skuParam.productSkuInfo.salePrice = (skuInfo.multi_price * defaultAddPriceRule.AddPriceTimes + defaultAddPriceRule.AddMorePrice * 100).ParseToInt(); + if (defaultAddPriceRule.AddMorePriceFirst) + skuParam.productSkuInfo.salePrice = ((skuInfo.multi_price + defaultAddPriceRule.AddMorePrice * 100) * defaultAddPriceRule.AddPriceTimes).ParseToInt(); + // 阶梯式加价,如果命中则按阶梯式加价进行 + if (isStepAddPrice) + { + foreach (var addPrice in lstAddPriceRule) + { + if (skuInfo.multi_price > addPrice.MoreThanPrice * 100 && skuInfo.multi_price <= addPrice.LessThanPrice * 100) + { + if (defaultAddPriceRule.AddMorePriceFirst) // 先加后乘 + skuParam.productSkuInfo.salePrice = ((skuInfo.multi_price + addPrice.AddMorePrice * 100) * addPrice.AddPriceTimes).ParseToInt(); + else + skuParam.productSkuInfo.salePrice = (skuInfo.multi_price * addPrice.AddPriceTimes + addPrice.AddMorePrice * 100).ParseToInt(); + break; + } + } + } + // sku图 + skuParam.productSkuInfo.thumbImg = upProdParam.product.info.productSaleAttrs[0].items.FirstOrDefault(a => a.value == skuInfo.spec[0].spec_name)?.imgUrl; + // 库存 + skuParam.productSkuInfo.stockInfo = new stockInfoParam() { stockNum = defaultAddPriceRule.StockNum }; + skuParam.productSkuInfo.saleParam = new List(); + foreach (var specInfo in skuInfo.spec) + { + saleParamParam saleParam = new saleParamParam(); + skuParam.productSkuInfo.saleParam.Add(saleParam); + saleParam.categorys = new List(); + + // specKey + categoryKeyParam skuCateKeyParam = new categoryKeyParam(); + saleParam.categorys.Add(skuCateKeyParam); + skuCateKeyParam.isCustomize = true; + skuCateKeyParam.isMainSale = true; + skuCateKeyParam.name = specInfo.parent_name; + skuCateKeyParam.id = dicSpecParentNameId[specInfo.parent_name].ParseToInt(); // 3; + skuCateKeyParam.catId = dicSpecParentNameCatId[specInfo.parent_name]; + skuCateKeyParam.label = "自定义规格"; + skuCateKeyParam.catInfo = new skuCatInfoParam() { isCustomize = 1 }; + skuCateKeyParam.catType = 8; + + // specValue + categoryValueParam skuCateValueParam = new categoryValueParam(); + saleParam.categorys.Add(skuCateValueParam); + skuCateValueParam.fCatId = dicSpecNamefCatId[specInfo.spec_name]; + skuCateValueParam.catId = dicSpecNameCatId[specInfo.spec_name]; + skuCateValueParam.name = specInfo.spec_name; + skuCateValueParam.skuNameValue = specInfo.spec_name; + skuCateValueParam.desc = ""; + skuCateValueParam.catInfo = new categoryValueCatInfo() { editByUser = 1 }; + skuCateValueParam.thumbImg = ""; + var specIndex = skuInfo.spec.IndexOf(specInfo); + skuCateValueParam.priority = prodInfo.detail.sku.Select(s => s.spec[specIndex].spec_name).Distinct().ToList().IndexOf(specInfo.spec_name); + skuCateValueParam.selected = false; + } + skuParam.productSkuInfo.skuDeliverInfo = new skuDeliverInfoParam(); + skuParam.productSkuInfo.stockDiff = new stockDiffParam() { diffType = 1, num = defaultAddPriceRule.StockNum }; + skuParam.status = 5; + } + #endregion + if (cell != null) { @@ -936,7 +1658,35 @@ namespace TemuKJD.WXForms.ProductForms cell.Value = "正在提交商品"; })); } - Thread.Sleep(2000); + Thread.Sleep(Randomx.GetId(1000, 2000)); + + var uploadDraftRst = WXUpload.uploadProductDraft(shop, upProdParam); + if (!uploadDraftRst.Contains("\"code\":0") && !uploadDraftRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref uploadDraftRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = uploadDraftRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"草稿保存失败 " + error + "\"}"; + } + if (cell != null) + { + Invoke(new Action(() => + { + var timeSpan = DateTime.Now - startTime; + var duration = timeSpan.TotalSeconds; + cell.Value = "商品已保存草稿,正在提交上架" + " " + duration.ParseToInt() + "秒"; + })); + } + + upProdParam.product.productKey.productId = BaseRegex.GetLongJson(ref uploadDraftRst, "productId").ParseToString(); + var uploadProdRst = WXUpload.upProductV2(shop, upProdParam); + if (!uploadProdRst.Contains("\"code\":0") && !uploadProdRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref uploadProdRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = uploadProdRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"草稿箱\",\"errMsg\":\"上架失败 " + error + "\"}"; + } if (cell != null) { Invoke(new Action(() => @@ -947,13 +1697,107 @@ namespace TemuKJD.WXForms.ProductForms })); } - return "{\"success\":true,\"draftId\":" + "1000000000000000000000" + ",\"status\":\"已上传\",\"msg\":\"上传成功\"}"; + // 已传的商品保存为安全商品 + if (dbProd.wx_safe_status == "未校验") + { + var url = BaseClass.BuildObjString("product/mdy_pdd_product"); + var data = ""; + Invoke(new Action(() => + { + data = UserLogin.GetSignaturex(); + data += "&spu_id=" + dbProd.spu_id; + data += "&wx_safe_status=安全商品"; + })); + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + } + + //colUploadCount + var dgvShopRow = dgvShop.Rows.Cast().FirstOrDefault(row => row.Cells["colShopId"]?.Value.ParseToString() == shop.ShopId); + if (dgvShopRow != null) + { + Invoke(new Action(() => + { + dgvShopRow.Cells["colUploadCount"].Value = dgvShopRow.Cells["colUploadCount"].Value.ParseToInt() + 1; + })); + } + + return "{\"success\":true,\"draftId\":" + upProdParam.product.productKey.productId + ",\"status\":\"已上传\",\"msg\":\"上传成功\"}"; } + public string UploadImg(ShopLoginInfo shop, string img_url, DataGridViewCell cell = null) + { + var upImgAuthRst = WXUpload.getUploadTempImgAuth(shop); + for (int i = 0; i < 10 && upImgAuthRst.Contains("LogicError"); i++) + { + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "图片提报失败,正在重试。"; + })); + } + Thread.Sleep(Randomx.GetId(3000, 6000)); + upImgAuthRst = WXUpload.getUploadTempImgAuth(shop); + } + if (!upImgAuthRst.Contains("\"code\":0")) + { + var error = BaseRegex.GetStringJson(ref upImgAuthRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = upImgAuthRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"申请上传图片失败 " + error + "\"}"; + } + string disK = BaseRegex.GetStringJson(ref upImgAuthRst, "disK"); + long disT = BaseRegex.GetLongJson(ref upImgAuthRst, "disT"); + string ext = BaseRegex.GetStringJson(ref upImgAuthRst, "ext"); + string imgBase64 = ""; + //------------------------------------------------------------------------------------------------------------------------------------- + //生成详情图base64字符串 + string getImgError; + var image = GetHtml.GetUrlImg(img_url.Replace("https://", "http://"), out getImgError); + var imageBg = new Bitmap(image.Width, image.Height); + if (!string.IsNullOrEmpty(getImgError) || image == null) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"初始化图片上传失败\"}"; + } + try + { + using (Graphics g = Graphics.FromImage(imageBg)) + { + g.DrawImage(image, new Rectangle(0, 0, imageBg.Width, imageBg.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); + } + using (MemoryStream memoryStream = new MemoryStream()) + { + imageBg.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg); + byte[] imageBytes = memoryStream.ToArray(); + imgBase64 = Convert.ToBase64String(imageBytes); + } + } + catch (Exception ex) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + "修改图片失败 " + ex.Message + "\"}"; + } + + //------------------------------------------------------------------------------------------------------------------------------------- + //上传详情图,获取图片路径 + var upImgRst = WXUpload.adtimageupload(shop, imgBase64, disK, disT, ext).ParseToString(); + var location = BaseRegex.GetStringJson(ref upImgRst, "Location"); + if (string.IsNullOrEmpty(location)) + { + var error = BaseRegex.GetStringJson(ref upImgAuthRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = upImgAuthRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"图片上传失败 " + error + "\"}"; + } + return "{\"success\":true,\"location\":\"" + location + "\"}"; + } @@ -981,18 +1825,28 @@ namespace TemuKJD.WXForms.ProductForms int addCount = txtAddCount.Text.Trim().ParseToInt(); Task.Run(() => { + List prodLst = new List(); while (addCount > 0) { int prodCount = 0; - var list = GetRandomProductList(out prodCount, 1, 50); - if (list.Count == 0) // 等于0要么库里没数据要么出错了,跳出 - break; + // 如果产品数量在0到50之间,说明数据库商品数量不足,无需再重复筛选,直接随机打乱 + if (prodLst.Count == 0 || prodLst.Count == Math.Min(50, addCount)) + { + prodLst = GetRandomProductList(out prodCount, 1, Math.Min(50, addCount)); + Thread.Sleep(Randomx.GetId(50, 100)); + } + else + { + prodLst = prodLst.OrderBy(x => Guid.NewGuid()).ToList(); + Thread.Sleep(Randomx.GetId(10, 30)); + } Invoke(new Action(() => { - lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品"; + lblGoodsCount.Text = "产品库 " + prodCount + " 件"; })); - Thread.Sleep(Randomx.GetId(50,100)); - foreach (var prod in list) + if (prodLst.Count == 0) // 等于0要么库里没数据要么出错了,跳出 + break; + foreach (var prod in prodLst) { var selectProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prod)); selectProd.out_product_Id = prod.id.ToString(); @@ -1003,7 +1857,7 @@ namespace TemuKJD.WXForms.ProductForms Invoke(new Action(() => { - lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件"; })); addCount--; if (addCount <= 0) @@ -1034,6 +1888,8 @@ namespace TemuKJD.WXForms.ProductForms data += "&in_skc_ids=" + txtIdFilter.Text; data += "&in_groups=" + cmbGroupFilter.Text; data += "&in_cates=" + cmbCateFilter.Text; + data += "&product_get_type=" + cmbSourceType.Text.Trim(); + data += "&wx_safe_status=" + cmbWxSafe.Text.Trim(); })); var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -1077,7 +1933,7 @@ namespace TemuKJD.WXForms.ProductForms this.lstTemuDBProductSelect.Clear(); NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_db_prod_upload_list", this.lstTemuDBProductSelect); - lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件"; } private void lblNewAddPrice_Click(object sender, EventArgs e) @@ -1168,7 +2024,7 @@ namespace TemuKJD.WXForms.ProductForms PDDDBProdUserSelectCacheForm selectCacheForm = new PDDDBProdUserSelectCacheForm(lstTemuDBProductSelect); selectCacheForm.ShowDialog(); - lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件"; } private void btnClearFilter_Click(object sender, EventArgs e) @@ -1177,14 +2033,24 @@ namespace TemuKJD.WXForms.ProductForms txtExtCodeFilter.Text = ""; cmbGroupFilter.Text = ""; cmbCateFilter.Text = ""; + cmbWxSafe.SelectedIndex = 0; int prodCount; GetRandomProductList(out prodCount, 1, 1); - lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品"; + lblGoodsCount.Text = "产品库 " + prodCount + " 件"; } } public class WXUpload { + public static string searchProduct(ShopLoginInfo shop, string extCode) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/searchProduct?" + + "token=&lang=zh_CN&pageSize=20&productStatus[]=-1&productSource=[1,16,32]&searchSource=1&useNew=true&pageNum=1&status[]=5&spuCode=" + extCode; + string refere = "https://store.weixin.qq.com/shop/goods/list?currentTab=PRODUCT_STATUS_ON"; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, refere); + return result; + } + public static string getUploadTempImgAuth(ShopLoginInfo shop, int uploadScene = 3) { string url = "https://store.weixin.qq.com/shop-faas/mmecchannelspicture/cgi/getUploadTempImgAuth?token=&lang=zh_CN&uploadScene=" + uploadScene; @@ -1241,6 +2107,24 @@ Content-Type: image/jpeg return result; } + public static string batchCheckCategoryRelation(ShopLoginInfo shop, long catId) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradecategory/cgi/product/batchCheckCategoryRelation?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + string body = @"{""categoryIdList"":[" + catId + "]}"; + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + + public static string addFinderCategoryV2(ShopLoginInfo shop, long catId) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradecategory/cgi/addFinderCategoryV2?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + string body = @"{""categoryInfo"":{""categories"":[{""id"":""" + catId + @"""}]},""brandIdList"":[],""leafCategoryId"":""" + catId + @""",""reuse"":0,""applyType"":1}"; + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + public static string genProductShortTitle(ShopLoginInfo shop, WXGetShortTitleParam getShortTitleParam) { string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductupload/common/cgi/goods/genProductShortTitle?token=&lang=zh_CN"; @@ -1258,6 +2142,47 @@ Content-Type: image/jpeg var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer); return result; } + + /// + /// 取售后地址 + /// + /// + /// + public static string getAddress(ShopLoginInfo shop) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeexpress/cgi/getAddress?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer); + return result; + } + + + + public static string uploadProductDraft(ShopLoginInfo shop, WXUploadProductParam prodParam) + { + string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductupload/common/cgi/goods/uploadProductDraft?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; + var prodStr = JsonConvert.SerializeObject(prodParam, jsonSetting); + JObject jObj = new JObject(); + jObj.Add("data", prodStr); + string body = JsonHelper.SerializeObject(jObj); + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + + public static string upProductV2(ShopLoginInfo shop, WXUploadProductParam prodParam) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/upProductV2?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; + var prodStr = JsonConvert.SerializeObject(prodParam, jsonSetting); + JObject jObj = new JObject(); + jObj.Add("data", prodStr); + string body = JsonHelper.SerializeObject(jObj); + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } } public class AddPriceRule diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.resx b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.resx index ca5e014..cab7006 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.resx +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.resx @@ -138,6 +138,9 @@ True + + True + True diff --git a/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs index 679e61a..143588a 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs @@ -275,7 +275,7 @@ namespace TemuKJD.WXForms.ShopForms } else { - ShopBLL.MdyServerShopSubInfo(shopInfo); + ShopBLL.MdyPDDServerShopSubInfo(shopInfo); btnRefreshCookie_Click(null, null); } } diff --git a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs index c45a836..d890e32 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs @@ -176,9 +176,8 @@ namespace TemuKJD.WXForms.ShopForms var result = GetHtml.PostUtf8(url, data); } - } + } // 店铺cookie写入服务端,多店共用一个登录账号一组cookie - WXShopListForm.UpdateServerShopCookies(shop); // 手动更新内存中的店铺cookie var lstShop = GlobalConfig.ShopLoginList.Where(l => l.LoginName == shop?.LoginName).ToList(); foreach (var s in lstShop) @@ -187,6 +186,8 @@ namespace TemuKJD.WXForms.ShopForms s.Cookies = cookies; s.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd"); } + //shop.Cookies = cookies; + WXShopListForm.UpdateServerShopCookies(shop); OnSaveComplete(shop); if (this.Created && this.chkCloseAfterLogin.Checked)