From b44fa2a6c3aa8cb9119532fbccd0d5be96ac101d Mon Sep 17 00:00:00 2001 From: wule Date: Tue, 9 Sep 2025 19:07:29 +0800 Subject: [PATCH] =?UTF-8?q?1=20bxx=E7=9B=B8=E5=85=B3=E9=80=BB=E8=BE=91=202?= =?UTF-8?q?=20=E5=BA=97=E9=93=BA=E6=B4=BB=E5=8A=A8=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/BaseClass.cs | 10 +- AllBase/Model/Result/ShopLoginInfo.cs | 4 +- KJDService/KJD_WebService/BLL/PriceManage.cs | 600 ------------- .../KJD_WebService/BLL/ProductManage.cs | 790 ------------------ .../KJD_WebService/BLL/ProductThirdManage.cs | 775 ----------------- KJDService/KJD_WebService/BLL/ShopManage.cs | 771 ----------------- KJDService/KJD_WebService/BLL/ToolManage.cs | 60 -- KJDService/KJD_WebService/BLL/UpadteManage.cs | 49 -- KJDService/KJD_WebService/BLL/UserManage.cs | 470 ----------- KJDService/KJD_WebService/Global.asax.cs | 32 + .../KJD_WebService/KJD_WebService.csproj | 45 +- TEMUKJD/KJD.csproj | 80 +- .../KJDForms/AdminForms/AdminAccountForm.cs | 4 +- .../AdminForms/AdminProductPriceCheckForm.cs | 3 +- .../AdminForms/AdminShopAddSubSaForm.cs | 4 +- .../KJDForms/AdminForms/AdminShopListForm.cs | 170 +--- .../KJDForms/AdminForms/AdminShopLoginForm.cs | 6 +- .../DbProductSelectListManageForm.cs | 5 +- .../DbProductSelectSetSubSaForm.cs | 4 +- .../ProductThirdSelectListManageForm.cs | 5 +- .../MarketingActivityForm.Designer.cs | 255 +++--- .../SalesCenterForms/MarketingActivityForm.cs | 43 +- .../MarketingActivityForm.resx | 3 + .../UcActivityDiscountCtrl.Designer.cs | 29 +- .../UcActivityDiscountCtrl.cs | 11 +- TEMUKJD/KJDForms/ShopForms/ShopListForm.cs | 7 +- .../ShopForms/ShopUpdateCookieForm.cs | 7 +- .../KJDForms/ShopForms/SubAccountListForm.cs | 4 +- .../ShopForms/SubAccountShopEditForm.cs | 12 +- TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs | 4 +- TEMUKJD/MainForm.cs | 30 +- TEMUKJD/Properties/Resources.Designer.cs | 20 + TEMUKJD/Properties/Resources.resx | 6 + TEMUKJD/Resources/login_bg.psd | Bin 2472593 -> 2494136 bytes TEMUKJD/UserForm/LoginForm.cs | 3 + 35 files changed, 460 insertions(+), 3861 deletions(-) delete mode 100644 KJDService/KJD_WebService/BLL/PriceManage.cs delete mode 100644 KJDService/KJD_WebService/BLL/ProductManage.cs delete mode 100644 KJDService/KJD_WebService/BLL/ProductThirdManage.cs delete mode 100644 KJDService/KJD_WebService/BLL/ShopManage.cs delete mode 100644 KJDService/KJD_WebService/BLL/ToolManage.cs delete mode 100644 KJDService/KJD_WebService/BLL/UpadteManage.cs delete mode 100644 KJDService/KJD_WebService/BLL/UserManage.cs diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index a1e051b..0d0588a 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,8 +27,8 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 581; - //public static int VersionCount = 581; + public static int VersionCount = 585; + //public static int VersionCount = 585; /// /// 版本号 @@ -719,6 +719,12 @@ namespace AllBase //return LoginApiUrl + "index.php?obj=" + BaseClass.MainPath + "/" + file; //http://localhost:8000/user/user_login + //pdd相关操作 + if (BaseClass.MainPath == "binxixi") + { + return LoginApiUrl + "/bxx_" + file + "?obj=" + BaseClass.MainPath + "/" + file; + } + return LoginApiUrl + "/" + file+ "?obj=" + BaseClass.MainPath + "/" + file; } /// diff --git a/AllBase/Model/Result/ShopLoginInfo.cs b/AllBase/Model/Result/ShopLoginInfo.cs index 8dcfbb8..aa9bfa6 100644 --- a/AllBase/Model/Result/ShopLoginInfo.cs +++ b/AllBase/Model/Result/ShopLoginInfo.cs @@ -126,7 +126,7 @@ namespace AllBase.Model.Result /// /// 子账户列表(抖店用) /// - public List ShopSubAccountList { get; } = new List(); + public List ShopSubAccountList { get; } = new List(); public int OnlineProductCount { get; set; } = -1; public int OfflineProductCount { get; set; } = -1; @@ -222,7 +222,7 @@ namespace AllBase.Model.Result public int id { get; set; } } - public class DouShopSubAccountInfo : SubAccountInfo + public class ShopSubAccountInfo : SubAccountInfo { public string shop_login_name { get; set; } public string sub_user_id { get { return id.ToString(); } set { id = value.ParseToInt(); } } diff --git a/KJDService/KJD_WebService/BLL/PriceManage.cs b/KJDService/KJD_WebService/BLL/PriceManage.cs deleted file mode 100644 index 60cabbc..0000000 --- a/KJDService/KJD_WebService/BLL/PriceManage.cs +++ /dev/null @@ -1,600 +0,0 @@ -using KJD_Web.Model; -using KJD_Web.Utils; -using MySql.Data.MySqlClient; -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Web; -using System.Web.Security; - -namespace KJD_Web.BLL -{ - public class PriceManage - { - public string AddPrice(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code")).ParseToString(); - int original_price = RegexUtils.GetStringQuery(ref inputData, "original_price").ParseToInt(); - int markup_times = RegexUtils.GetStringQuery(ref inputData, "markup_times").ParseToInt(); - int extra_price = RegexUtils.GetStringQuery(ref inputData, "extra_price").ParseToInt(); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")).ParseToString(); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sqlExist = "select count(ext_code) from kjd.price_markup where ext_code=@ext_code"; - string sql = "insert into kjd.price_markup " + - "(ext_code,original_price,markup_times,extra_price,notes) " + - "values (@ext_code,@original_price,@markup_times,@extra_price,@notes);"; - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@ext_code", Value = ext_code, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@original_price", Value = original_price, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@markup_times", Value = markup_times, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@extra_price", Value = extra_price, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes, }); - - var has = mySql.ExecuteFirst(sqlExist, paramLst.ToArray()); - if (has != "0") - { - mySql.Close(); - return "{\"code\":501,\"msg\":\"货号 " + ext_code + " 价格数据已存在\"}"; - } - - var rst = mySql.ExecuteNonQuery(sql, paramLst.ToArray()); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":502,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string GetPriceList(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - - string start_original_price = RegexUtils.GetStringQuery(ref inputData, "start_original_price"); - string end_original_price = RegexUtils.GetStringQuery(ref inputData, "end_original_price"); - string start_markup_times = RegexUtils.GetStringQuery(ref inputData, "start_markup_times"); - string end_markup_times = RegexUtils.GetStringQuery(ref inputData, "end_markup_times"); - string start_extra_price = RegexUtils.GetStringQuery(ref inputData, "start_extra_price"); - string end_extra_price = RegexUtils.GetStringQuery(ref inputData, "end_extra_price"); - var search_ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "search_ext_code")); - var search_notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "search_notes")); - var in_ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "in_ext_code")); - int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_ext_code", Value = "%" + search_ext_code + "%", }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_notes", Value = "%" + search_notes + "%", }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@start_original_price", Value = start_original_price.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@end_original_price", Value = end_original_price.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@start_markup_times", Value = start_markup_times.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@end_markup_times", Value = end_markup_times.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@start_extra_price", Value = start_extra_price.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@end_extra_price", Value = end_extra_price.ParseToInt(), }); - //paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@in_ext_code", Value = "'" + in_ext_code?.Replace(",", "','") + "'", }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@in_ext_code", Value = in_ext_code.ParseToString() }); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "select count(id) from kjd.price_markup p where 1=1"; - - string where = ""; - if (!string.IsNullOrWhiteSpace(search_ext_code)) - where += " and p.ext_code like @search_ext_code"; - if (!string.IsNullOrWhiteSpace(search_notes)) - where += " and p.notes like @search_notes"; - if (!string.IsNullOrWhiteSpace(start_original_price)) - where += " and p.original_price >= @start_original_price"; - if (!string.IsNullOrWhiteSpace(end_original_price)) - where += " and p.original_price <= @end_original_price"; - if (!string.IsNullOrWhiteSpace(start_markup_times)) - where += " and p.markup_times >= @start_markup_times"; - if (!string.IsNullOrWhiteSpace(end_markup_times)) - where += " and p.markup_times <= @end_markup_times"; - if (!string.IsNullOrWhiteSpace(start_extra_price)) - where += " and p.extra_price >= @start_extra_price"; - if (!string.IsNullOrWhiteSpace(end_extra_price)) - where += " and p.extra_price <= @end_extra_price"; - if (!string.IsNullOrEmpty(in_ext_code)) - where += " and p.ext_code in ('" + in_ext_code?.Replace(",", "','") + "')"; - sql += where; - - var count = mySql.ExecuteRowCount(sql, paramLst.ToArray()); - - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - sql = "select * from kjd.price_markup p where 1=1"; - - //where子句 - sql += where; - - sql += " order by p.id desc"; - sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; - dt = mySql.ExecuteDataTable(sql, paramLst.ToArray()); - } - - mySql.Close(); - if (dt != null) - { - try - { - List priceList = new List(); - foreach (DataRow row in dt.Rows) - { - DBPriceResultParam price = new DBPriceResultParam - { - id = row["id"].ParseToInt(), - extra_price = row["extra_price"].ParseToInt(), - markup_times = row["markup_times"].ParseToInt(), - original_price = row["original_price"].ParseToInt(), - notes = row["notes"].ParseToString(), - ext_code = row["ext_code"].ParseToString(), - add_time = Convert.ToDateTime(row["add_time"]), - mdy_time = Convert.ToDateTime(row["mdy_time"]), - }; - priceList.Add(price); - } - var data = JsonUtils.SerializerObjectToString(priceList); - 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 DelDbPrice(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from kjd.price_markup where id='" + id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - return "{\"code\":500,\"msg\":\"删除失败:" + mySql.Message + "\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyDBPrice(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var db_id = RegexUtils.GetStringQuery(ref inputData, "db_id"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); - string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code")); - string original_price = RegexUtils.GetStringQuery(ref inputData, "original_price"); - string markup_times = RegexUtils.GetStringQuery(ref inputData, "markup_times"); - string extra_price = RegexUtils.GetStringQuery(ref inputData, "extra_price"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@ext_code", Value = ext_code, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@original_price", Value = original_price.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@markup_times", Value = markup_times.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@extra_price", Value = extra_price.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@db_id", Value = db_id, }); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sqlExist = "select count(ext_code) from kjd.price_markup where ext_code=@ext_code and id!=@db_id"; - var has = mySql.ExecuteFirst(sqlExist, paramLst.ToArray()); - if (has != "0") - { - mySql.Close(); - return "{\"code\":501,\"msg\":\"货号 " + ext_code + " 价格数据已存在\"}"; - } - - string sql = "update kjd.price_markup set"; - if (notes != null) - sql += " notes=@notes,"; - if (ext_code != null) - sql += " ext_code=@ext_code,"; - if (original_price != null) - sql += " original_price=@original_price,"; - if (markup_times != null) - sql += " markup_times=@markup_times,"; - if (extra_price != null) - sql += " extra_price=@extra_price,"; - sql = sql.TrimEnd(','); - sql += " where id=@db_id;"; - - var rst = mySql.ExecuteNonQuery(sql, paramLst.ToArray()); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"更新失败:" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string AddPurchasePrice(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); - string shop_name = RegexUtils.GetStringQuery(ref inputData, "shop_name"); - string spu_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "spu_id")).ParseToString(); - string skc_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "skc_id")).ParseToString(); - string cat_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_id")).ParseToString(); - string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name")).ParseToString(); - string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code")).ParseToString(); - string product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_name")).ParseToString(); - string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img")).ParseToString(); - string discount = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "discount")).ParseToString(); - string price_text = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "price_text")).ParseToString(); - string sku_purchase_price_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_purchase_price_json")).ParseToString(); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")).ParseToString(); - - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sqlExist = "select count(spu_id) from kjd.product_purchase_price where spu_id=@spu_id"; - string sql = "insert into kjd.product_purchase_price " + - "(shop_id,shop_name,spu_id,skc_id,cat_id,cat_name,ext_code,product_name,main_img,discount,price_text,sku_purchase_price_json,notes) " + - "values (@shop_id,@shop_name,@spu_id,@skc_id,@cat_id,@cat_name,@ext_code,@product_name,@main_img,@discount,@price_text,@sku_purchase_price_json,@notes);"; - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@shop_id", Value = shop_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@shop_name", Value = shop_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@spu_id", Value = spu_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@skc_id", Value = skc_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@cat_id", Value = cat_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@cat_name", Value = cat_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@ext_code", Value = ext_code, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@product_name", Value = product_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@main_img", Value = main_img, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@discount", Value = discount.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@price_text", Value = price_text, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@sku_purchase_price_json", Value = sku_purchase_price_json, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes, }); - - var has = mySql.ExecuteFirst(sqlExist, paramLst.ToArray()); - if (has != "0") - { - mySql.Close(); - return "{\"code\":501,\"msg\":\"货号 " + ext_code + " 价格数据已存在\"}"; - } - - var rst = mySql.ExecuteNonQuery(sql, paramLst.ToArray()); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":502,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyPurchasePrice(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - var db_id = RegexUtils.GetStringQuery(ref inputData, "db_id"); - string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); - string shop_name = RegexUtils.GetStringQuery(ref inputData, "shop_name"); - string cat_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_id")).ParseToString(); - string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name")).ParseToString(); - string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code")).ParseToString(); - string product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_name")).ParseToString(); - string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img")).ParseToString(); - string discount = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "discount")).ParseToString(); - string price_text = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "price_text")).ParseToString(); - string sku_purchase_price_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_purchase_price_json")).ParseToString(); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")).ParseToString(); - - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@db_id", Value = db_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@shop_id", Value = shop_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@shop_name", Value = shop_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@cat_id", Value = cat_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@cat_name", Value = cat_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@ext_code", Value = ext_code, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@product_name", Value = product_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@main_img", Value = main_img, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@discount", Value = discount.ParseToInt(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@price_text", Value = price_text, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@sku_purchase_price_json", Value = sku_purchase_price_json, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes, }); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "update kjd.product_purchase_price set"; - if (shop_id != null) - sql += " shop_id=@shop_id,"; - if (shop_name != null) - sql += " shop_name=@shop_name,"; - if (cat_id != null) - sql += " cat_id=@cat_id,"; - if (cat_name != null) - sql += " cat_name=@cat_name,"; - if (ext_code != null) - sql += " ext_code=@ext_code,"; - if (product_name != null) - sql += " product_name=@product_name,"; - if (main_img != null) - sql += " main_img=@main_img,"; - if (discount != null) - sql += " discount=@discount,"; - if (price_text != null) - sql += " price_text=@price_text,"; - if (sku_purchase_price_json != null) - sql += " sku_purchase_price_json=@sku_purchase_price_json,"; - if (notes != null) - sql += " notes=@notes,"; - sql = sql.TrimEnd(','); - sql += " where id=@db_id;"; - - var rst = mySql.ExecuteNonQuery(sql, paramLst.ToArray()); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"更新失败:" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string GetPurchasePriceList(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - - var search_spu_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "search_spu_id")); - var search_skc_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "search_skc_id")); - var search_ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "search_ext_code")); - var search_notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "search_notes")); - var in_spu_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "in_spu_id")); - int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_spu_id", Value = "%" + search_spu_id + "%", }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_skc_id", Value = "%" + search_skc_id + "%", }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_ext_code", Value = "%" + search_ext_code + "%", }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_notes", Value = "%" + search_notes + "%", }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@in_spu_id", Value = in_spu_id.ParseToString() }); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "select count(id) from kjd.product_purchase_price p where 1=1"; - - string where = ""; - if (!string.IsNullOrWhiteSpace(search_spu_id)) - where += " and p.spu_id like @search_spu_id"; - if (!string.IsNullOrWhiteSpace(search_skc_id)) - where += " and p.skc_id like @search_skc_id"; - if (!string.IsNullOrWhiteSpace(search_ext_code)) - where += " and p.ext_code like @search_ext_code"; - if (!string.IsNullOrWhiteSpace(search_notes)) - where += " and p.notes like @search_notes"; - if (!string.IsNullOrEmpty(in_spu_id)) - where += " and p.spu_id in ('" + in_spu_id?.Replace(",", "','") + "')"; - sql += where; - - var count = mySql.ExecuteRowCount(sql, paramLst.ToArray()); - - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - sql = "select * from kjd.product_purchase_price p where 1=1"; - - //where子句 - sql += where; - - sql += " order by p.id desc"; - sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; - dt = mySql.ExecuteDataTable(sql, paramLst.ToArray()); - } - - mySql.Close(); - if (dt != null) - { - try - { - List purchasePriceList = new List(); - foreach (DataRow row in dt.Rows) - { - ProductPurchasePriceResultParam price = new ProductPurchasePriceResultParam - { - id = row["id"].ParseToInt(), - shop_id = row["shop_id"].ParseToString(), - shop_name = row["shop_name"].ParseToString(), - cat_id = row["cat_id"].ParseToString(), - cat_name = row["cat_name"].ParseToString(), - main_img = row["main_img"].ParseToString(), - discount = row["discount"].ParseToInt(), - price_text = row["price_text"].ParseToString(), - product_name = row["product_name"].ParseToString(), - skc_id = row["skc_id"].ParseToString(), - sku_purchase_price_json = row["sku_purchase_price_json"].ParseToString(), - spu_id = row["spu_id"].ParseToString(), - notes = row["notes"].ParseToString(), - ext_code = row["ext_code"].ParseToString(), - add_time = Convert.ToDateTime(row["add_time"]), - mdy_time = Convert.ToDateTime(row["mdy_time"]), - }; - purchasePriceList.Add(price); - } - var data = JsonUtils.SerializerObjectToString(purchasePriceList); - 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 DelPurchasePrice(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from kjd.product_purchase_price where id='" + id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - return "{\"code\":500,\"msg\":\"删除失败:" + mySql.Message + "\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - } -} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/ProductManage.cs b/KJDService/KJD_WebService/BLL/ProductManage.cs deleted file mode 100644 index 98472ea..0000000 --- a/KJDService/KJD_WebService/BLL/ProductManage.cs +++ /dev/null @@ -1,790 +0,0 @@ -using KJD_Web.Model; -using KJD_Web.Utils; -using MySql.Data.MySqlClient; -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Web; -using System.Web.Security; - -namespace KJD_Web.BLL -{ - public class ProductManage - { - public string AddProduct(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - string spu_id = RegexUtils.GetStringQuery(ref inputData, "spu_id"); - string skc_id = RegexUtils.GetStringQuery(ref inputData, "skc_id"); - string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id"); - string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name"))?.Replace("'", "\\'"); - string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'"); - string product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_name"))?.Replace("'", "\\'"); - string product_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json"))?.Replace("'", "\\'"); - string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json"))?.Replace("'", "\\'"); - string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img"))?.Replace("'", "\\'"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - - sql = "insert into kjd.product (spu_id,skc_id,cat_id,cat_name,product_name,ext_code,main_img,product_json,size_json,notes,add_time,mdy_time) " + - "values ('" + spu_id + "','" + skc_id + "','" + cat_id + "','" + cat_name + "','" + product_name + "','" + - ext_code + "','" + main_img + "','" + product_json + "','" + size_json + "','" + notes + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string GetProductList(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\":\"校验失败\"}"; - - 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_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 sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'"); - - int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "select count(id) from kjd.product p where 1=1"; - - 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_notes)) - where += " and p.notes like '%" + search_notes + "%'"; - if (!string.IsNullOrEmpty(search_db_ids)) - where += " and p.id in (" + search_db_ids + ")"; - sql += where; - - var count = mySql.ExecuteRowCount(sql); - - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - if (isDetail) - sql = "select * from kjd.product p where 1=1"; - else if (string.IsNullOrEmpty(get_select_count)) - sql = "select p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,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 from kjd.product p where 1=1"; - else - sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,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,COUNT(s.id) AS select_count " + - "FROM kjd.product p LEFT JOIN kjd.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "' " + - "WHERE 1=1"; - - //where子句 - sql += where; - - 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"]), - 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(), - //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(), - 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(), - }; - if (isDetail) - { - prod.product_json = row["product_json"].ToString(); - prod.size_json = row["size_json"].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 DelDbProd(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from kjd.product where id='" - + id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - return "{\"code\":500,\"msg\":\"删除失败:" + mySql.Message + "\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyProductNotes(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.product set"; - if (notes != null) - sql += " notes='" + notes + "',"; - sql = sql.TrimEnd(','); - sql += " where id=" + id + ";"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"更新失败:" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyDBProduct(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - var product_name = RegexUtils.GetStringQuery(ref inputData, "product_name")?.Replace("'", "\\'"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); - string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'"); - string fission_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_words"))?.Replace("'", "\\'"); - string head_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "head_words"))?.Replace("'", "\\'"); - string end_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "end_words"))?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.product set"; - if (product_name != null) - sql += " product_name='" + product_name + "',"; - if (notes != null) - sql += " notes='" + notes + "',"; - if (ext_code != null) - sql += " ext_code='" + ext_code + "',"; - if (fission_words != null) - sql += " fission_words='" + fission_words + "',"; - if (head_words != null) - sql += " head_words='" + head_words + "',"; - if (end_words != null) - sql += " end_words='" + end_words + "',"; - sql = sql.TrimEnd(','); - sql += " where id=" + id + ";"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"更新失败:" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - - public string AddUserSelectProduct(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var out_product_Id = RegexUtils.GetStringQuery(ref inputData, "out_product_id")?.Replace("'", "\\'"); - var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); - var shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account")?.Replace("'", "\\'"); - var user_name = RegexUtils.GetStringQuery(ref inputData, "main_user_name")?.Replace("'", "\\'"); - var sub_user_name = RegexUtils.GetStringQuery(ref inputData, "sub_user_name")?.Replace("'", "\\'"); - var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); - var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); - var add_product_remaining = RegexUtils.GetStringQuery(ref inputData, "add_product_remaining").ParseToInt(); - var add_fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_fission_product_name").ParseToString())?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - if (string.IsNullOrEmpty(shop_id)) - { - return "{\"code\":500,\"msg\":\"没有店铺信息\"}"; - } - - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "insert into kjd.product_select " + - "(out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,fission_product_name,add_time,mdy_time) values " + - "('" + out_product_Id + "','" + shop_id + "','" + shop_account + "','" + user_name + "','" + sub_user_name + "','" + - notes + "','" + status + "','" + add_fission_product_name + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; - if (add_product_remaining > 0) - { - add_product_remaining = add_product_remaining - 1; - sql += "\r\n"; - sql += "update kjd.shop set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";"; - sql += "update kjd.product set select_total_count=select_total_count+1 where id=" + out_product_Id + ";"; - //sql += "update kjd.shop_add_prod_count set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";"; - sql += "INSERT INTO kjd.shop_add_prod_count(shop_id, add_product_remaining) VALUES('" + shop_id + "'," + add_product_remaining + ")" + - "ON DUPLICATE KEY UPDATE add_product_remaining=VALUES(add_product_remaining)"; - } - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyUserSelectProductStatus(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - var draft_id = RegexUtils.GetStringQuery(ref inputData, "draft_id")?.Replace("'", "\\'"); - var up_spu_id = RegexUtils.GetStringQuery(ref inputData, "up_spu_id")?.Replace("'", "\\'"); - var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); - var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); - var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'"); - - long l_draft_id = draft_id.ParseToLong(); - long l_spu_map_table_id = l_draft_id % 128; - long l_select_map_table_id = id.ParseToLong() % 64; - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - // 使用事务一次提交多个sql操作 - //sql += "set @@autocommit=0;\r\n"; - sql += "START TRANSACTION;\r\n"; - if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id)) - { - sql += "insert into kjd_map.spu_map_" + l_spu_map_table_id + - " (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n"; - sql += "insert into kjd_map.product_select_map_" + l_select_map_table_id + - " (product_id,product_select_db_id,shop_id) values(" + draft_id + "," + id + ",'" + shop_id + "');\r\n"; - } - sql += "update kjd.product_select set"; - if (draft_id != null) - sql += " draft_id='" + draft_id + "',"; - if (status != null) - sql += " status='" + status + "',"; - if (status == "已上传") - sql += " add_times=add_times+1,"; - sql += " mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',"; - sql = sql.TrimEnd(','); - sql += " where id=" + id + ";\r\n"; - var rst = mySql.ExecuteNonQuery(sql); - string errMsg = mySql.Message; - if (string.IsNullOrEmpty(errMsg)) - sql = "COMMIT;"; - else - sql = "ROLLBACK;"; - mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + errMsg + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string GetUserSelectProductList(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", "\\'"); - var search_shop_id = RegexUtils.GetStringQuery(ref inputData, "search_shop_id")?.Replace("'", "\\'"); - var search_shop_account = RegexUtils.GetStringQuery(ref inputData, "search_shop_account")?.Replace("'", "\\'"); - var search_spu = RegexUtils.GetStringQuery(ref inputData, "search_spu")?.Replace("'", "\\'"); - var search_skc = RegexUtils.GetStringQuery(ref inputData, "search_skc")?.Replace("'", "\\'"); - var search_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_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'"); - var search_user_notes = RegexUtils.GetStringQuery(ref inputData, "search_user_notes")?.Replace("'", "\\'"); - var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'"); - var search_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "search_sub_sa_name")?.Replace("'", "\\'"); - var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); - var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); - - var no_sub_sa = RegexUtils.GetStringQuery(ref inputData, "no_sub_sa")?.Replace("'", "\\'"); - - int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "select count(s.id) from kjd.product_select s " + - "left join kjd.product p on s.out_product_id=p.id " + - "left join kjd.user u on s.operate_sub_sa_name=u.user_name " + - "where 1=1"; - - string where = ""; - if (!isAdmin) - where += " and (s.user_name='" + user_name + "' or s.sub_user_name like'%" + user_name + "%')"; - if (!string.IsNullOrEmpty(operate_sub_sa_name)) - { - where += " and s.operate_sub_sa_name = '" + operate_sub_sa_name + "'"; - } - if (no_sub_sa == "true") - where += " and s.operate_sub_sa_name is null"; - if (!string.IsNullOrEmpty(search_db_ids)) - where += " and s.id in (" + search_db_ids + ")"; - if (!string.IsNullOrEmpty(shop_ids)) - where += " and s.shop_id in (" + shop_ids + ")"; - if (!string.IsNullOrWhiteSpace(status)) - where += " and s.status = '" + status + "'"; - if (!string.IsNullOrWhiteSpace(search_shop_id)) - where += " and s.shop_id like '%" + search_shop_id + "%'"; - if (!string.IsNullOrWhiteSpace(search_shop_account)) - where += " and s.shop_account like '%" + search_shop_account + "%'"; - if (!string.IsNullOrWhiteSpace(search_notes)) - { - //核价成功 重复 核价成功(重复) - if (search_notes == "无备注") - where += " and s.notes = ''"; - else if (search_notes == "重复") - where += " and s.notes like '%重复%' and s.notes not like '%核价成功%' and s.notes not like '%核价通过%'"; - else if (search_notes == "核价成功") - where += " and (s.notes like '%核价成功%' or s.notes like '%核价通过%') and s.notes not like '%重复%'"; - else if (search_notes == "核价成功(重复)") - where += " and (s.notes like '%核价成功%' or s.notes like '%核价通过%') and s.notes like '%重复%'"; - else - where += " and s.notes like '%" + search_notes + "%'"; - } - if (!string.IsNullOrWhiteSpace(search_user_notes)) - where += " and s.user_notes like '%" + search_user_notes + "%'"; - 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.IsNullOrEmpty(search_sub_sa_name)) - { - where += " and (s.operate_sub_sa_name like '%" + search_sub_sa_name + "%'"; - where += " or u.nick_name like '%" + operate_sub_sa_name + "%')"; - } - - sql += where; - - var count = mySql.ExecuteRowCount(sql); - - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - //if (isDetail) - //sql = "select * from kjd.product_select where 1=1"; - //else - sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," + - "s.sub_user_name,s.notes,s.user_notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," + - "s.fission_product_name,s.operate_sub_sa_name,s.add_sub_sa_time," + - "p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img," + - "u.nick_name as operate_sub_sa_nick " + - "from kjd.product_select s left join kjd.product p on s.out_product_id=p.id " + - "left join kjd.user u on u.user_name=s.operate_sub_sa_name " + - "where 1=1"; - - sql += where; // where子句 - - sql += " order by 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) - { - ProductSelectResultParam prodSelect = new ProductSelectResultParam() - { - id = row["id"].ParseToInt(), - out_product_Id = row["out_product_Id"].ParseToString(), - shop_account = row["shop_account"].ParseToString(), - shop_id = row["shop_id"].ParseToString(), - status = row["status"].ParseToString(), - sub_user_name = row["sub_user_name"].ParseToString(), - user_name = row["user_name"].ParseToString(), - cat_id = row["cat_id"].ParseToString(), - cat_name = row["cat_name"].ParseToString(), - product_name = row["product_name"].ParseToString(), - main_img = row["main_img"].ParseToString(), - ext_code = row["ext_code"].ParseToString(), - add_time = Convert.ToDateTime(row["add_time"]), - mdy_time = Convert.ToDateTime(row["mdy_time"]), - notes = row["notes"].ParseToString(), - draft_id = row["draft_id"].ParseToString(), - add_times = row["add_times"].ParseToInt(), - skc_id = row["skc_id"].ToString(), - spu_id = row["spu_id"].ToString(), - operate_sub_sa_name = row["operate_sub_sa_name"].ToString(), - operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString(), - fission_product_name = row["fission_product_name"].ToString(), - user_notes = row["user_notes"].ToString(), - //product_json = row["product_json"].ToString(), - //size_json = row["size_json"].ToString(), - }; - prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?; - productLst.Add(prodSelect); - } - 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 DelSelectProd(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from kjd.product_select where id='" - + id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - return "{\"code\":500,\"msg\":\"删除失败:" + mySql.Message + "\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - /// - /// 设置上传商品的二级超管 - /// - /// - public string SetSelectProductSubSa(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":50001,\"msg\":\"没有用户名\"}"; - } - - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); - var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); - var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(shop_id)) - { - return "{\"code\":50002,\"msg\":\"未选择任何待上传\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.product_select set"; - if (operate_sub_sa_name != null) - sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',"; - sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',"; - sql = sql.TrimEnd(','); - if (!string.IsNullOrEmpty(id)) - sql += " where id in (" + id + ")"; - else if (!string.IsNullOrEmpty(shop_id)) - sql += " where shop_id in ('" + shop_id.Replace(",","','") + "')"; - else - sql += " where 1=2"; - if(!string.IsNullOrEmpty(status)) - sql += " and status='" + status + "';"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyProductSelectNotes(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); - string user_notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "user_notes")); - string fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_product_name")); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.product_select set"; - if (notes != null) - sql += " notes=@notes,"; - if (user_notes != null) - sql += " user_notes=@user_notes,"; - if (fission_product_name != null) - sql += " fission_product_name=@fission_product_name,"; - sql = sql.TrimEnd(','); - sql += " where id=@id;"; - - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@id", Value = id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@fission_product_name", Value = fission_product_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@user_notes", Value = user_notes, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes, }); - - var rst = mySql.ExecuteNonQuery(sql, paramLst.ToArray()); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"更新失败:" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - } -} - - -/* - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "spu_id", Value = spu_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "skc_id", Value = skc_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "cat_id", Value = cat_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "cat_name", Value = cat_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_name", Value = product_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "ext_code", Value = ext_code, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "main_img", Value = main_img, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_json", Value = product_json, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "size_json", Value = size_json, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "notes", Value = notes.ParseToString(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_md5", Value = product_md5, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "add_time", Value = add_time, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "mdy_time", Value = mdy_time, }); - rst = mySql.ExecuteInsertId(sql, paramLst.ToArray());*/ \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/ProductThirdManage.cs deleted file mode 100644 index 2779a79..0000000 --- a/KJDService/KJD_WebService/BLL/ProductThirdManage.cs +++ /dev/null @@ -1,775 +0,0 @@ -using KJD_Web.Model; -using KJD_Web.Utils; -using MySql.Data.MySqlClient; -using MySqlX.XDevAPI.Common; -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Web; -using System.Web.Security; - -namespace KJD_Web.BLL -{ - public class ProductThirdManage - { - public string AddProduct(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - string spu_id = RegexUtils.GetStringQuery(ref inputData, "spu_id"); - string skc_id = RegexUtils.GetStringQuery(ref inputData, "skc_id"); - string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id"); - string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name")); - string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code")); - string product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_name")); - string product_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json")); - string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json")); - string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img")); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - var json_sign = RegexUtils.GetStringJson(ref product_json, "signedImageUrl"); // 取商品json数据里不同签名的部分 - var product_md5 = EncrypUtil.GetMd5(product_json?.Replace(json_sign, "") + size_json); - var product_md5_2 = EncrypUtil.GetMd5(product_json?.Replace("'", "\\'").Replace(json_sign, "") + size_json); - sql = "select id from kjd.third_product where product_md5='" + product_md5 + "' or product_md5='" + product_md5_2 + "';"; - var rst = mySql.ExecuteFirstInt(sql).ParseToLong(); - if (rst <= 0) - { - //sql = "insert into kjd.third_product (spu_id,skc_id,cat_id,cat_name,product_name,ext_code,main_img,product_json,size_json,notes,product_md5,add_time,mdy_time) " + - // "values ('" + spu_id + "','" + skc_id + "','" + cat_id + "','" + cat_name + "','" + product_name + "','" + - // ext_code + "','" + main_img + "','" + product_json + "','" + size_json + "','" + notes + "','" + product_md5 + "','" + - // DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + - // DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; - //rst = mySql.ExecuteInsertId(sql); - - sql = "insert into kjd.third_product (spu_id,skc_id,cat_id,cat_name,product_name," + - "ext_code,main_img,product_json,size_json,notes,product_md5,add_time,mdy_time) " + - "values (@spu_id,@skc_id,@cat_id,@cat_name,@product_name," + - "@ext_code,@main_img,@product_json,@size_json,@notes,@product_md5," + - "@add_time,@mdy_time);"; - string add_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - string mdy_time = add_time; - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@spu_id", Value = spu_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@skc_id", Value = skc_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@cat_id", Value = cat_id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@cat_name", Value = cat_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@product_name", Value = product_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@ext_code", Value = ext_code, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@main_img", Value = main_img, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@product_json", Value = product_json, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@size_json", Value = size_json, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes.ParseToString(), }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@product_md5", Value = product_md5, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@add_time", Value = add_time, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@mdy_time", Value = mdy_time, }); - rst = mySql.ExecuteInsertId(sql, paramLst.ToArray()); - mySql.Close(); - } - if (rst > 0) - { - return "{\"code\":200,\"msg\":\"success\",\"id\":" + rst + "}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string GetProductList(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\":\"校验失败\"}"; - - 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_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'"); - var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'"); - - int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "select count(id) from kjd.third_product where 1=1"; - - string where = ""; - if (!string.IsNullOrWhiteSpace(search_spu)) - where += " and spu_id like '%" + search_spu + "%'"; - if (!string.IsNullOrWhiteSpace(search_skc)) - where += " and skc_id like '%" + search_skc + "%'"; - if (!string.IsNullOrWhiteSpace(search_cat)) - where += " and cat_name like '%" + search_cat + "%'"; - if (!string.IsNullOrWhiteSpace(search_ext_code)) - where += " and ext_code like '%" + search_ext_code + "%'"; - if (!string.IsNullOrWhiteSpace(search_prod_name)) - where += " and product_name like '%" + search_prod_name + "%'"; - if (!string.IsNullOrWhiteSpace(search_notes)) - where += " and notes like '%" + search_notes + "%'"; - if (!string.IsNullOrEmpty(search_db_ids)) - where += " and id in (" + search_db_ids + ")"; - sql += where; - - var count = mySql.ExecuteRowCount(sql); - - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - if (isDetail) - sql = "select * from kjd.third_product where 1=1"; - else - sql = "select id,spu_id,skc_id,cat_id,cat_name,change_cat_id,change_cat_name,ext_code,product_name,main_img,notes," + - "add_time,mdy_time from kjd.third_product where 1=1"; - - sql += where; - - sql += " order by 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"]), - skc_id = row["skc_id"].ToString(), - spu_id = row["spu_id"].ToString(), - cat_id = row["cat_id"].ToString(), - cat_name = row["cat_name"].ToString(), - change_cat_id = row["change_cat_id"].ToString(), - change_cat_name = row["change_cat_name"].ToString(), - product_name = row["product_name"].ToString(), - main_img = row["main_img"].ToString(), - ext_code = row["ext_code"].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(), - }; - if (isDetail) - { - prod.product_json = row["product_json"].ToString(); - prod.size_json = row["size_json"].ToString(); - } - 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 DelDbProd(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from kjd.third_product where id='" - + id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - return "{\"code\":500,\"msg\":\"删除失败:" + mySql.Message + "\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyProductNotes(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.third_product set"; - if (notes != null) - sql += " notes='" + notes + "',"; - sql = sql.TrimEnd(','); - sql += " where id=" + id + ";"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"更新失败:" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyProductCategory(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - string change_cat_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "change_cat_id"))?.Replace("'", "\\'"); - string change_cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "change_cat_name"))?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.third_product set"; - if (change_cat_id != null) - sql += " change_cat_id='" + change_cat_id + "',"; - if (change_cat_name != null) - sql += " change_cat_name='" + change_cat_name + "',"; - sql = sql.TrimEnd(','); - sql += " where id=" + id + ";"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"更新失败:" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - - public string AddUserSelectProduct(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var out_product_Id = RegexUtils.GetStringQuery(ref inputData, "out_product_id")?.Replace("'", "\\'"); - var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); - var shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account")?.Replace("'", "\\'"); - var user_name = RegexUtils.GetStringQuery(ref inputData, "main_user_name")?.Replace("'", "\\'"); - var sub_user_name = RegexUtils.GetStringQuery(ref inputData, "sub_user_name")?.Replace("'", "\\'"); - var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); - var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); - var add_product_remaining = RegexUtils.GetStringQuery(ref inputData, "add_product_remaining").ParseToInt(); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - if (string.IsNullOrEmpty(shop_id)) - { - return "{\"code\":500,\"msg\":\"没有店铺信息\"}"; - } - - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "insert into kjd.third_product_select (out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,add_time,mdy_time) " + - "values ('" + out_product_Id + "','" + shop_id + "','" + shop_account + "','" + user_name + "','" + sub_user_name + "','" + - notes + "','" + status + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; - if (add_product_remaining > 0) - { - add_product_remaining = add_product_remaining - 1; - sql += "\r\n"; - sql += "update kjd.shop set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";"; - //sql += "update kjd.shop_add_prod_count set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";"; - sql += "INSERT INTO kjd.shop_add_prod_count(shop_id, add_product_remaining) VALUES('" + shop_id + "'," + add_product_remaining + ")" + - "ON DUPLICATE KEY UPDATE add_product_remaining=VALUES(add_product_remaining)"; - } - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyUserSelectProductStatus(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - var draft_id = RegexUtils.GetStringQuery(ref inputData, "draft_id")?.Replace("'", "\\'"); - var up_spu_id = RegexUtils.GetStringQuery(ref inputData, "up_spu_id")?.Replace("'", "\\'"); - var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); - var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); - var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'"); - - long l_draft_id = draft_id.ParseToLong(); - long l_spu_map_table_id = l_draft_id % 128; - long l_select_map_table_id = id.ParseToLong() % 64; - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - // 使用事务一次提交多个sql操作 - //sql += "set @@autocommit=0;\r\n"; - sql += "START TRANSACTION;\r\n"; - if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id)) - { - sql += "insert into kjd_map.spu_map_" + l_spu_map_table_id + - " (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n"; - sql += "insert into kjd_map.product_third_select_map_" + l_select_map_table_id + - " (product_id,product_select_db_id,shop_id) values(" + draft_id + "," + id + ",'" + shop_id + "');\r\n"; - } - sql += "update kjd.third_product_select set"; - if (draft_id != null) - sql += " draft_id='" + draft_id + "',"; - if (status != null) - sql += " status='" + status + "',"; - if (status == "已上传") - sql += " add_times=add_times+1,"; - sql += " mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',"; - sql = sql.TrimEnd(','); - sql += " where id=" + id + ";\r\n"; - var rst = mySql.ExecuteNonQuery(sql); - string errMsg = mySql.Message; - if (string.IsNullOrEmpty(errMsg)) - sql = "COMMIT;"; - else - sql = "ROLLBACK;"; - mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + errMsg + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string GetUserSelectProductList(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", "\\'"); - var search_shop_id = RegexUtils.GetStringQuery(ref inputData, "search_shop_id")?.Replace("'", "\\'"); - var search_shop_account = RegexUtils.GetStringQuery(ref inputData, "search_shop_account"); - 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"); - var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'"); - var search_user_notes = RegexUtils.GetStringQuery(ref inputData, "search_user_notes")?.Replace("'", "\\'"); - var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'"); - var search_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "search_sub_sa_name")?.Replace("'", "\\'"); - var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); - var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); - - var no_sub_sa = RegexUtils.GetStringQuery(ref inputData, "no_sub_sa")?.Replace("'", "\\'"); - - int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "select count(s.id) from kjd.third_product_select s " + - "left join kjd.third_product p on s.out_product_id=p.id " + - "left join kjd.user u on s.operate_sub_sa_name=u.user_name " + - "where 1=1"; - - string where = ""; - if (!isAdmin) - where += " and (s.user_name='" + user_name + "' or s.sub_user_name like'%" + user_name + "%')"; - if (!string.IsNullOrEmpty(operate_sub_sa_name)) - { - where += " and s.operate_sub_sa_name = '" + operate_sub_sa_name + "'"; - } - if (no_sub_sa == "true") - where += " and s.operate_sub_sa_name is null"; - if (!string.IsNullOrEmpty(search_db_ids)) - where += " and s.id in (" + search_db_ids + ")"; - if (!string.IsNullOrEmpty(shop_ids)) - where += " and s.shop_id in (" + shop_ids + ")"; - if (!string.IsNullOrWhiteSpace(status)) - where += " and s.status = '" + status + "'"; - if (!string.IsNullOrWhiteSpace(search_shop_id)) - where += " and s.shop_id like '%" + search_shop_id + "%'"; - if (!string.IsNullOrWhiteSpace(search_shop_account)) - where += " and s.shop_account like @search_shop_account"; - if (!string.IsNullOrWhiteSpace(search_notes)) - { - //核价成功 重复 核价成功(重复) - if (search_notes == "无备注") - where += " and s.notes = ''"; - else if (search_notes == "重复") - where += " and s.notes like '%重复%' and s.notes not like '%核价成功%' and s.notes not like '%核价通过%'"; - else if (search_notes == "核价成功") - where += " and (s.notes like '%核价成功%' or s.notes like '%核价通过%') and s.notes not like '%重复%'"; - else if (search_notes == "核价成功(重复)") - where += " and (s.notes like '%核价成功%' or s.notes like '%核价通过%') and s.notes like '%重复%'"; - else - where += " and s.notes like '%" + search_notes + "%'"; - } - if (!string.IsNullOrWhiteSpace(search_user_notes)) - where += " and s.user_notes like '%" + search_user_notes + "%'"; - 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.IsNullOrEmpty(search_sub_sa_name)) - { - where += " and (s.operate_sub_sa_name like '%" + search_sub_sa_name + "%'"; - where += " or u.nick_name like '%" + operate_sub_sa_name + "%')"; - } - - sql += where; - - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_shop_account", Value = "%" + search_shop_account + "%", }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_prod_name", Value = "%" + search_prod_name + "%", }); - - var count = mySql.ExecuteRowCount(sql, paramLst.ToArray()); - - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - //if (isDetail) - //sql = "select * from kjd.third_product_select where 1=1"; - //else - sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," + - "s.sub_user_name,s.notes,s.user_notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," + - "s.fission_product_name,s.operate_sub_sa_name,s.add_sub_sa_time," + - "p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.change_cat_id,p.change_cat_name,p.ext_code,p.product_name,p.main_img," + - "u.nick_name as operate_sub_sa_nick " + - "from kjd.third_product_select s left join kjd.third_product p on s.out_product_id=p.id " + - "left join kjd.user u on u.user_name=s.operate_sub_sa_name " + - "where 1=1"; - - sql += where; // where子句 - - sql += " order by id desc"; - sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; - dt = mySql.ExecuteDataTable(sql, paramLst.ToArray()); - } - - mySql.Close(); - if (dt != null) - { - try - { - List productLst = new List(); - foreach (DataRow row in dt.Rows) - { - ProductSelectResultParam prodSelect = new ProductSelectResultParam() - { - id = row["id"].ParseToInt(), - out_product_Id = row["out_product_Id"].ParseToString(), - shop_account = row["shop_account"].ParseToString(), - shop_id = row["shop_id"].ParseToString(), - status = row["status"].ParseToString(), - sub_user_name = row["sub_user_name"].ParseToString(), - user_name = row["user_name"].ParseToString(), - cat_id = row["cat_id"].ParseToString(), - cat_name = row["cat_name"].ParseToString(), - change_cat_id = row["change_cat_id"].ParseToString(), - change_cat_name = row["change_cat_name"].ParseToString(), - product_name = row["product_name"].ParseToString(), - main_img = row["main_img"].ParseToString(), - ext_code = row["ext_code"].ParseToString(), - add_time = Convert.ToDateTime(row["add_time"]), - mdy_time = Convert.ToDateTime(row["mdy_time"]), - notes = row["notes"].ParseToString(), - draft_id = row["draft_id"].ParseToString(), - add_times = row["add_times"].ParseToInt(), - skc_id = row["skc_id"].ToString(), - spu_id = row["spu_id"].ToString(), - operate_sub_sa_name = row["operate_sub_sa_name"].ToString(), - operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString(), - fission_product_name = row["fission_product_name"].ToString(), - user_notes = row["user_notes"].ToString(), - //product_json = row["product_json"].ToString(), - //size_json = row["size_json"].ToString(), - }; - prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?; - productLst.Add(prodSelect); - } - 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 DelSelectProd(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from kjd.third_product_select where id='" - + id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - return "{\"code\":500,\"msg\":\"删除失败:" + mySql.Message + "\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - /// - /// 设置上传商品的二级超管 - /// - /// - public string SetSelectProductSubSa(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":50001,\"msg\":\"没有用户名\"}"; - } - - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); - var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); - var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(shop_id)) - { - return "{\"code\":50002,\"msg\":\"未选择任何待上传\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.third_product_select set"; - if (operate_sub_sa_name != null) - sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',"; - sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',"; - sql = sql.TrimEnd(','); - if (!string.IsNullOrEmpty(id)) - sql += " where id in (" + id + ")"; - else if (!string.IsNullOrEmpty(shop_id)) - sql += " where shop_id in ('" + shop_id.Replace(",","','") + "')"; - else - sql += " where 1=2"; - if(!string.IsNullOrEmpty(status)) - sql += " and status='" + status + "';"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string MdyProductSelectNotes(string inputData, bool isAdmin = 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\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var id = RegexUtils.GetStringQuery(ref inputData, "db_id"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); - string user_notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "user_notes")); - string fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_product_name")); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.third_product_select set"; - if (notes != null) - sql += " notes=@notes,"; - if (user_notes != null) - sql += " user_notes=@user_notes,"; - if (fission_product_name != null) - sql += " fission_product_name=@fission_product_name,"; - sql = sql.TrimEnd(','); - sql += " where id=@id;"; - - List paramLst = new List(); - paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "@id", Value = id, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@fission_product_name", Value = fission_product_name, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@user_notes", Value = user_notes, }); - paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@notes", Value = notes, }); - - var rst = mySql.ExecuteNonQuery(sql, paramLst.ToArray()); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"更新失败:" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - } -} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/ShopManage.cs b/KJDService/KJD_WebService/BLL/ShopManage.cs deleted file mode 100644 index 10be36f..0000000 --- a/KJDService/KJD_WebService/BLL/ShopManage.cs +++ /dev/null @@ -1,771 +0,0 @@ -using KJD_Web.Model; -using KJD_Web.Model.ShopModel; -using KJD_Web.Utils; -using MySqlX.XDevAPI; -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Web; -using System.Web.Security; - -namespace KJD_Web.BLL -{ - public class ShopManage - { - public string GetShop(string inputData, bool isAdmin = false) - { - if (!string.IsNullOrEmpty(inputData)) - { - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - var search_id = RegexUtils.GetStringQuery(ref inputData, "search_id"); - var search_user_name = RegexUtils.GetStringQuery(ref inputData, "search_user_name"); - var search_login_name = RegexUtils.GetStringQuery(ref inputData, "search_login_name"); - var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes"); - var search_name = RegexUtils.GetStringQuery(ref inputData, "search_name"); - var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); - var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); - if (!string.IsNullOrWhiteSpace(shop_ids)) - { - List shopIdLst = shop_ids.Split(',').ToList(); - shop_ids = "'" + string.Join("','", shopIdLst) + "'"; - } - var shop_names = RegexUtils.GetStringQuery(ref inputData, "shop_names"); - if (!string.IsNullOrWhiteSpace(shop_names)) - { - List shopNameLst = shop_names.Split(',').ToList(); - shop_names = "'" + string.Join("','", shopNameLst) + "'"; - } - var shop_notes = RegexUtils.GetStringQuery(ref inputData, "shop_notes"); - if (!string.IsNullOrWhiteSpace(shop_notes)) - { - List shopNotesLst = shop_notes.Split(',').ToList(); - shop_notes = "'" + string.Join("','", shopNotesLst) + "'"; - } - - var page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - var page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(); - - if (page_size == 0) - page_size = 50; - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "SELECT COUNT(s.id) FROM kjd.shop s WHERE 1=1"; - - //where子句 - string where = ""; - if (isAdmin) - where += " and (s.cookie='' or s.shop_id!='')"; - if (!isAdmin) - where += " and (s.user_name='" + user_name + "' or s.sub_user_name like '%" + user_name + "%')"; - if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) - where += " and s.operate_sub_sa_name='" + operate_sub_sa_name + "'"; - if (!string.IsNullOrWhiteSpace(search_user_name)) - where += " and s.user_name like '%" + search_user_name + "%'"; - if (!string.IsNullOrWhiteSpace(search_login_name)) - where += " and s.login_name like '%" + search_login_name + "%'"; - if (!string.IsNullOrWhiteSpace(search_notes)) - where += " and s.notes like '%" + search_notes + "%'"; - if (!string.IsNullOrWhiteSpace(search_id)) - where += " and s.shop_id like '%" + search_id + "%'"; - if (!string.IsNullOrWhiteSpace(search_name)) - where += " and s.shop_account like '%" + search_name + "%'"; - if (!string.IsNullOrWhiteSpace(shop_ids)) - where += " and s.shop_id in (" + shop_ids + ")"; - if (!string.IsNullOrWhiteSpace(shop_names)) - where += " and s.shop_account in (" + shop_names + ")"; - if (!string.IsNullOrWhiteSpace(shop_notes)) - where += " and s.notes in (" + shop_notes + ")"; - sql += where; - - var count = mySql.ExecuteRowCount(sql); - - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.shop_id,s.shop_account,s.sub_user_name,s.user_name," + - "s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month,s.add_time,s.mdy_time," + - "s.add_sub_sa_time,s.operate_sub_sa_name"; - //sql += " FROM kjd.shop s WHERE 1=1"; - sql += " FROM kjd.shop s LEFT JOIN kjd.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1"; - - sql += where; // where 子句 - - sql += " ORDER BY s.id DESC"; - sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size; - dt = mySql.ExecuteDataTable(sql); - } - - mySql.Close(); - if (dt != null) - { - List shopList=new List(); - foreach (DataRow row in dt.Rows) - { - ShopParam shop = new ShopParam - { - id = Convert.ToInt32(row["id"]), - login_name = row["login_name"].ToString(), - login_pass = row["login_pass"].ToString(), - cookie = row["cookie"].ToString(), - cookie2 = row["cookie2"].ToString(), - shop_id = row["shop_id"].ToString(), - shop_account = row["shop_account"].ToString(), - sub_user_name = row["sub_user_name"].ToString(), - user_name = row["user_name"].ToString(), - company_name = row["company_name"].ToString(), - notes = row["notes"].ToString(), - login_status = row["login_status"].ToString(), - login_status2 = row["login_status2"].ToString(), - add_product_remaining = row["add_product_remaining"].ParseToInt(), - add_product_month = row["add_product_month"].ParseToInt(), - operate_sub_sa_name = row["operate_sub_sa_name"] as string, - - }; - shopList.Add(shop); - } - - //sql = "\r\nINSERT INTO kjd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; - //foreach (var shop in shopList) - //{ - // sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + shop.add_product_remaining + "," + shop.add_product_month + "),"; - //} - //sql = sql.TrimEnd(',') + " \r\n"; - //sql += "ON DUPLICATE KEY UPDATE " + - // "shop_account=VALUES(shop_account)," + - // "add_product_remaining=VALUES(add_product_remaining)," + - // "add_product_month=VALUES(add_product_month);"; - //var result = mySql.ExecuteNonQuery(sql); - //mySql.Close(); - - int month = DateTime.Now.Month; - var shopMonthList = shopList.Where(s => s.add_product_month != month); - if (shopMonthList.Count() > 0) - { - int remainCount = 100; - var shopMonthIdList = shopMonthList.Select(s => s.id); - mySql = new MysqlUtils(conn); - string ids = string.Join(",", shopMonthIdList); - sql = ""; - sql += "update kjd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + - " where 1=1 and id in (" + ids + ");"; - - sql += "\r\nINSERT INTO kjd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; - foreach (var shop in shopMonthList) - { - sql+= "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),"; - } - sql = sql.TrimEnd(',') + " \r\n"; - sql += "ON DUPLICATE KEY UPDATE " + - "shop_account=VALUES(shop_account)," + - "add_product_remaining=VALUES(add_product_remaining)," + - "add_product_month=VALUES(add_product_month);"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - - if (rst) - { - foreach (var shop in shopMonthList) - { - shop.add_product_month = month; - shop.add_product_remaining = remainCount; - } - } - } - var data = JsonUtils.SerializerObjectToString(shopList); - - - //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; - return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - - public string SubSaGetSelectProdShop(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - var search_id = RegexUtils.GetStringQuery(ref inputData, "search_id"); - var search_user_name = RegexUtils.GetStringQuery(ref inputData, "search_user_name"); - var search_login_name = RegexUtils.GetStringQuery(ref inputData, "search_login_name"); - var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes"); - var search_name = RegexUtils.GetStringQuery(ref inputData, "search_name"); - var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); - var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); - if (!string.IsNullOrWhiteSpace(shop_ids)) - { - List shopIdLst = shop_ids.Split(',').ToList(); - shop_ids = "'" + string.Join("','", shopIdLst) + "'"; - } - var shop_names = RegexUtils.GetStringQuery(ref inputData, "shop_names"); - if (!string.IsNullOrWhiteSpace(shop_names)) - { - List shopNameLst = shop_names.Split(',').ToList(); - shop_names = "'" + string.Join("','", shopNameLst) + "'"; - } - var shop_notes = RegexUtils.GetStringQuery(ref inputData, "shop_notes"); - if (!string.IsNullOrWhiteSpace(shop_notes)) - { - List shopNotesLst = shop_notes.Split(',').ToList(); - shop_notes = "'" + string.Join("','", shopNotesLst) + "'"; - } - - var page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - var page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(); - - if (page_size == 0) - page_size = 50; - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - string sql = "SELECT COUNT(s.id) FROM kjd.shop s WHERE 1=1"; - - //where子句 - string where = ""; - if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) - where += " and (s.shop_id in (SELECT DISTINCT shop_id From kjd.product_select WHERE operate_sub_sa_name='" + operate_sub_sa_name + "') or " + - "s.shop_id in (SELECT DISTINCT shop_id From kjd.third_product_select WHERE operate_sub_sa_name='" + operate_sub_sa_name + "'))"; - where += " and (s.cookie='' or s.shop_id!='')"; - //if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) - // where += " and s.operate_sub_sa_name='" + operate_sub_sa_name + "'"; - if (!string.IsNullOrWhiteSpace(search_user_name)) - where += " and s.user_name like '%" + search_user_name + "%'"; - if (!string.IsNullOrWhiteSpace(search_login_name)) - where += " and s.login_name like '%" + search_login_name + "%'"; - if (!string.IsNullOrWhiteSpace(search_notes)) - where += " and s.notes like '%" + search_notes + "%'"; - if (!string.IsNullOrWhiteSpace(search_id)) - where += " and s.shop_id like '%" + search_id + "%'"; - if (!string.IsNullOrWhiteSpace(search_name)) - where += " and s.shop_account like '%" + search_name + "%'"; - if (!string.IsNullOrWhiteSpace(shop_ids)) - where += " and s.shop_id in (" + shop_ids + ")"; - if (!string.IsNullOrWhiteSpace(shop_names)) - where += " and s.shop_account in (" + shop_names + ")"; - if (!string.IsNullOrWhiteSpace(shop_notes)) - where += " and s.notes in (" + shop_notes + ")"; - sql += where; - - var count = mySql.ExecuteRowCount(sql); - - DataTable dt; - if (count == 0) - { - dt = new DataTable(); - } - else - { - sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.shop_id,s.shop_account,s.sub_user_name,s.user_name," + - "s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month,s.add_time,s.mdy_time," + - "s.add_sub_sa_time,s.operate_sub_sa_name"; - sql += " FROM kjd.shop s LEFT JOIN kjd.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1"; - - sql += where; // where 子句 - - sql += " ORDER BY s.id DESC"; - sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size; - dt = mySql.ExecuteDataTable(sql); - } - - mySql.Close(); - if (dt != null) - { - List shopList = new List(); - foreach (DataRow row in dt.Rows) - { - ShopParam shop = new ShopParam - { - id = Convert.ToInt32(row["id"]), - login_name = row["login_name"].ToString(), - login_pass = row["login_pass"].ToString(), - cookie = row["cookie"].ToString(), - cookie2 = row["cookie2"].ToString(), - shop_id = row["shop_id"].ToString(), - shop_account = row["shop_account"].ToString(), - sub_user_name = row["sub_user_name"].ToString(), - user_name = row["user_name"].ToString(), - company_name = row["company_name"].ToString(), - notes = row["notes"].ToString(), - login_status = row["login_status"].ToString(), - login_status2 = row["login_status2"].ToString(), - add_product_remaining = row["add_product_remaining"].ParseToInt(), - add_product_month = row["add_product_month"].ParseToInt(), - operate_sub_sa_name = row["operate_sub_sa_name"] as string, - - }; - shopList.Add(shop); - } - - //sql = "\r\nINSERT INTO kjd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; - //foreach (var shop in shopList) - //{ - // sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + shop.add_product_remaining + "," + shop.add_product_month + "),"; - //} - //sql = sql.TrimEnd(',') + " \r\n"; - //sql += "ON DUPLICATE KEY UPDATE " + - // "shop_account=VALUES(shop_account)," + - // "add_product_remaining=VALUES(add_product_remaining)," + - // "add_product_month=VALUES(add_product_month);"; - //var result = mySql.ExecuteNonQuery(sql); - //mySql.Close(); - - int month = DateTime.Now.Month; - var shopMonthList = shopList.Where(s => s.add_product_month != month); - if (shopMonthList.Count() > 0) - { - int remainCount = 100; - var shopMonthIdList = shopMonthList.Select(s => s.id); - mySql = new MysqlUtils(conn); - string ids = string.Join(",", shopMonthIdList); - sql = ""; - sql += "update kjd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + - " where 1=1 and id in (" + ids + ");"; - - sql += "\r\nINSERT INTO kjd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; - foreach (var shop in shopMonthList) - { - sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),"; - } - sql = sql.TrimEnd(',') + " \r\n"; - sql += "ON DUPLICATE KEY UPDATE " + - "shop_account=VALUES(shop_account)," + - "add_product_remaining=VALUES(add_product_remaining)," + - "add_product_month=VALUES(add_product_month);"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - - if (rst) - { - foreach (var shop in shopMonthList) - { - shop.add_product_month = month; - shop.add_product_remaining = remainCount; - } - } - } - var data = JsonUtils.SerializerObjectToString(shopList); - - - //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; - return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - - - - public string UpdateAddProdRemaining(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - var remainCount = RegexUtils.GetStringQuery(ref inputData, "remain_count"); - var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); - if (!string.IsNullOrWhiteSpace(shop_ids)) - { - List shopIdLst = shop_ids.Split(',').ToList(); - shop_ids = "'" + string.Join("','", shopIdLst) + "'"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - sql += "update kjd.shop_add_prod_count set add_product_remaining=" + remainCount + - " where 1=1 and shop_id in (" + shop_ids + ");"; - - var rst = mySql.ExecuteNonQuery(sql); - var msg = mySql.Message; - mySql.Close(); - - if (rst) - return "{\"code\":200,\"msg\":\"success\"}"; - else - return "{\"code\":50000,\"msg\":\"" + msg + "\"}"; - } - else - { - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - } - - //获取一个手机登录号码下的所有店铺(以便有则更新,无则新增) - public string GetOneLoginNameShop(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "select id,login_name,login_pass,cookie,cookie2,shop_id,shop_account,sub_user_name,user_name from kjd.shop where user_name='" - + user_name + "' and login_name='" + login_name + "'"; - - var dt = mySql.ExecuteDataTable(sql); - mySql.Close(); - if (dt != null) - { - List shopList = new List(); - foreach (DataRow row in dt.Rows) - { - ShopParam shop = new ShopParam - { - id = Convert.ToInt32(row["id"]), - login_name = row["login_name"].ToString(), - login_pass = row["login_pass"].ToString(), - cookie = row["cookie"].ToString(), - cookie2 = row["cookie2"].ToString(), - shop_id = row["shop_id"].ToString(), - shop_account = row["shop_account"].ToString(), - sub_user_name = row["sub_user_name"].ToString(), - user_name = row["user_name"].ToString(), - company_name = row["company_name"].ToString(), - notes = row["notes"].ToString(), - login_status = row["login_status"].ToString(), - }; - shopList.Add(shop); - } - var data = JsonUtils.SerializerObjectToString(shopList); - return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - - //获取一个手机登录号码下特定ID的店铺 - public string GetOneIdShop(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); - var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "select id,login_name,login_pass,cookie,cookie2,shop_id,shop_account,sub_user_name,user_name from kjd.shop where user_name='" - + user_name + "' and login_name='" + login_name + "' and shop_id='" + shop_id + "'"; - - var dt = mySql.ExecuteDataTable(sql); - mySql.Close(); - if (dt != null) - { - List shopList = new List(); - foreach (DataRow row in dt.Rows) - { - ShopParam shop = new ShopParam - { - id = Convert.ToInt32(row["id"]), - login_name = row["login_name"].ToString(), - login_pass = row["login_pass"].ToString(), - cookie = row["cookie"].ToString(), - cookie2 = row["cookie2"].ToString(), - shop_id = row["shop_id"].ToString(), - shop_account = row["shop_account"].ToString(), - sub_user_name = row["sub_user_name"].ToString(), - user_name = row["user_name"].ToString(), - company_name = row["company_name"].ToString(), - notes = row["notes"].ToString(), - login_status = row["login_status"].ToString(), - }; - shopList.Add(shop); - } - var data = JsonUtils.SerializerObjectToString(shopList); - return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - - public string AddShop(string inputData, bool isAdmin=false) - { - if (!string.IsNullOrEmpty(inputData)) - { - string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - if (isAdmin) - user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); - string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); - string login_pass = RegexUtils.GetStringQuery(ref inputData, "login_pass"); - string sub_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_user_name")); - string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); - string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); - string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); - string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account"); - string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - if (string.IsNullOrEmpty(login_name)) - { - return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - if (string.IsNullOrEmpty(shop_id)) - sql = "select exists (select 1 from kjd.shop where login_name='" + login_name + "' and user_name='" + user_name + "')"; - else - sql = "select exists (select 1 from kjd.shop where login_name='" + login_name + "' and user_name='" + user_name + - "' and shop_id='" + shop_id + "')"; - var exist = mySql.ExecuteFirstInt(sql); - if (exist>0) - { - mySql.Close(); - return "{\"code\":500,\"msg\":\"店铺" + login_name +" " + shop_account + "已存在\"}"; - } - - sql = "insert into kjd.shop (login_name,login_pass,cookie,cookie2,shop_account,shop_id,sub_user_name,user_name,group_name,notes,add_time,mdy_time) " + - "values ('" + login_name + "','" + login_pass + "','" + cookie + "','" + cookie2 + "','" + shop_account + "','" + shop_id + "','" + - sub_user_name + "','" + user_name + "','" + group_name + "','" + notes + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - - public string MdyShop(string inputData, bool isAdmin=false) - { - if (!string.IsNullOrEmpty(inputData)) - { - string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - if (isAdmin) - user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); - string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); - string login_pass = RegexUtils.GetStringQuery(ref inputData, "login_pass"); - string sub_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_user_name")); - string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); - string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); - string new_shop_id = RegexUtils.GetStringQuery(ref inputData, "new_shop_id"); - string old_shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); - string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account"); - string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name"); - string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); - string login_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status")); - - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - if (string.IsNullOrEmpty(login_name)) - { - return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.shop set"; - if (login_pass != null) - sql += " login_pass='" + login_pass + "',"; - if (cookie != null) - sql += " cookie='" + cookie + "',"; - if (cookie2 != null) - sql += " cookie2='" + cookie2 + "',"; - if (new_shop_id != null) - sql += " shop_id='" + new_shop_id + "',"; - if (shop_account != null) - sql += " shop_account='" + shop_account + "',"; - if (sub_user_name != null) - sql += " sub_user_name='" + sub_user_name + "',"; - if (group_name != null) - sql += " group_name='" + group_name + "',"; - if (notes != null) - sql += " notes='" + notes + "',"; - if (login_status != null) - sql += " login_status='" + login_status + "',"; - sql = sql.TrimEnd(','); - sql += " where login_name='" + login_name + "' and (user_name='" + user_name + "' or sub_user_name like '%" + user_name + "%')"; - if (!string.IsNullOrEmpty(old_shop_id)) - sql += " and shop_id='" + old_shop_id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - - public string MdyCookieAndLoginStatus(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); - string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); - string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); - string login_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status")); - string login_status2 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status2")); - - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - if (string.IsNullOrEmpty(login_name)) - { - return "{\"code\":500,\"msg\":\"店铺没有登录名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.shop set"; - if (cookie != null) - sql += " cookie='" + cookie + "',"; - if (cookie2 != null) - sql += " cookie2='" + cookie2 + "',"; - if (login_status != null) - sql += " login_status='" + login_status + "',"; - if (login_status2 != null) - sql += " login_status2='" + login_status2 + "',"; - sql = sql.TrimEnd(','); - sql += " where login_name='" + login_name + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - - - public string DelShop(string inputData, bool isAdmin=false) - { - if (!string.IsNullOrEmpty(inputData)) - { - var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - if (isAdmin) - user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); - var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":500,\"msg\":\"没有用户名\"}"; - } - if (string.IsNullOrEmpty(login_name)) - { - return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from kjd.shop where user_name='" + user_name + "' and login_name='" + login_name + "'"; - if (!string.IsNullOrEmpty(shop_id)) - sql += " and shop_id='" + shop_id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - - /// - /// 设置店铺的二级超管 - /// - /// - public string SetShopSubSa(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":50001,\"msg\":\"没有用户名\"}"; - } - - var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); - var login_name = RegexUtils.GetStringQuery(ref inputData, "shop_login_name")?.Replace("'", "\\'"); - var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); - - if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(login_name)) - { - return "{\"code\":50002,\"msg\":\"未选择任何待上传\"}"; - } - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "update kjd.shop set"; - if (operate_sub_sa_name != null) - sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',"; - sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',"; - sql = sql.TrimEnd(','); - if (!string.IsNullOrEmpty(id)) - sql += " where id in (" + id + ")"; - else if (!string.IsNullOrEmpty(login_name)) - sql += " where login_name in ('" + login_name.Replace(",", "','") + "')"; - else - sql += " where 1=2"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - } -} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/ToolManage.cs b/KJDService/KJD_WebService/BLL/ToolManage.cs deleted file mode 100644 index 20dbc9e..0000000 --- a/KJDService/KJD_WebService/BLL/ToolManage.cs +++ /dev/null @@ -1,60 +0,0 @@ -using KJD_Web.Utils; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace KJD_Web.BLL -{ - public class ToolManage - { - //mysql workbench 存储过程,可以使用分隔符重定义 -// string 存储过程1 = @" -//DELIMITER $ -//DROP PROCEDURE IF EXISTS add_spu_map; -//CREATE PROCEDURE add_spu_map() -//BEGIN -//insert into kjd_map.spu_map_0 (draft_id,from_spu_id,shop_id) values(9122600878,727585921,'3049342434562'); -//update kjd.third_product_select set draft_id='9122600878', status='已上传', add_times=add_times+1, mdy_time='2025-08-06 11:54:50' where id=6532; -//END $ -//DELIMITER ; -//CALL add_spu_map();"; - - //腾讯云服务器存储过程,不能使用分隔符重定义 -// string 存储过程2 = @" -//DROP PROCEDURE IF EXISTS add_spu_map; -//CREATE PROCEDURE add_spu_map() -//BEGIN -//insert into kjd_map.spu_map_1 (draft_id,from_spu_id,shop_id) values(9122600878,727585921,'3049342434562'); -//update kjd.third_product_select set draft_id='9122600878', status='已上传', add_times=add_times+1, mdy_time='2025-08-06 11:54:50' where id=6532; -//END ; -//CALL add_spu_map();"; - - public void CreateTable() - { -// string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; -// MysqlUtils mySql = new MysqlUtils(conn); -// string sql = ""; -// string sql1 = ""; -// for (int i = 0; i < 64; i++) -// { -// //sql = @"drop table if exists kjd_map.spu_map_" + i + ";\r\n"; -// sql = @"CREATE TABLE IF NOT EXISTS kjd_map.product_third_select_map_" + i + @" ( -// `id` int NOT NULL AUTO_INCREMENT, -// `product_id` bigint NOT NULL COMMENT '草稿箱/商品Id', -// `product_select_db_id` bigint NOT NULL COMMENT '选品上传数据库Id', -// `shop_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '上传的店铺', -// PRIMARY KEY (`id`) -//) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '上传商品与母店商品spu映射关系';"; - -// sql += @" -//ALTER TABLE -// kjd_map.product_third_select_map_" + i + @" -//ADD -// COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP"; -// var rst = mySql.ExecuteNonQuery(sql); -// } -// mySql.Close(); - } - } -} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/UpadteManage.cs b/KJDService/KJD_WebService/BLL/UpadteManage.cs deleted file mode 100644 index 47383d6..0000000 --- a/KJDService/KJD_WebService/BLL/UpadteManage.cs +++ /dev/null @@ -1,49 +0,0 @@ -using KJD_Web.Utils; -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace KJD_Web.BLL -{ - public class UpadteManage - { - public string GetUpdate(string inputData) - { - //string time1 = Encryption(time); - //return "time=" + time + "&code=" + time1 + "&NbCodeVersion=1" + "&version=" + BaseClass.VersionCount - - if (!string.IsNullOrEmpty(inputData)) - { - var time = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt(); - var serverVersion = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateVersion"].ConnectionString; - var UpdateFiles = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateFiles"].ConnectionString; - var UpdateExe = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExe"].ConnectionString; - var UpdateExeChk = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExeChk"].ConnectionString; - var LowVersion = System.Configuration.ConfigurationManager.ConnectionStrings["LowVersion"].ConnectionString; - - if (version > LowVersion.ParseToInt()) - { - return "{\"code\":200,\"msg\":\"success\",\"next_version\":" + serverVersion + ",\"exe_check\":\"" + UpdateExeChk + - "\",\"exe_address\":\"" + UpdateExe + "\",\"file_address\":\"" + UpdateFiles + "\"}"; - } - else if (version > 0) - { - return "{\"code\":501,\"msg\":\"版本过低已无法直接升级,请联系管理员获取最新安装包\"}"; - } - else - { - return "{\"code\":502,\"msg\":\"get update version failed\"}"; - } - } - return "{\"code\":19999,\"msg\":\"未知错误\"}"; - } - } -} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/UserManage.cs b/KJDService/KJD_WebService/BLL/UserManage.cs deleted file mode 100644 index d37f504..0000000 --- a/KJDService/KJD_WebService/BLL/UserManage.cs +++ /dev/null @@ -1,470 +0,0 @@ -using KJD_Web.Model; -using KJD_Web.Utils; -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Web; -using System.Web.UI.WebControls; - -namespace KJD_Web.BLL -{ - public class UserManage - { - public string CheckUserLogin(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'"); - var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "select * from kjd.user where user_name='" - + mobile + "' and password='" + password + "'"; - - var dt = mySql.ExecuteDataTable(sql); - mySql.Close(); - if (dt != null) - { - foreach (DataRow row in dt.Rows) - { - UserLoginResultParam user = new UserLoginResultParam - { - id = Convert.ToInt32(row["id"]), - user_name = row["user_name"].ToString(), - nick_name = row["nick_name"].ToString(), - mobile = row["user_name"].ToString(), - password = row["password"].ToString(), - group_id = row["group_id"].ToString(), - card_id = row["card_id"].ToString(), - company_name = row["company_name"].ToString(), - is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0, - sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0, - }; - - if (string.IsNullOrEmpty(user.company_name)) - { - user.company_name = "-"; - } - var data = JsonUtils.SerializerObjectToString(user); - return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; - } - return "{\"code\":1,\"msg\":\"用户名或密码错误\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string AddSubUser(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var parent_user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_nick_name"))?.Replace("'", "\\'"); - var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_name"))?.Replace("'", "\\'"); - var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_mobile"))?.Replace("'", "\\'"); - var password = RegexUtils.GetStringQuery(ref inputData, "sub_password")?.Replace("'", "\\'"); - var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); - var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); - var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "company"))?.Replace("'", "\\'"); - var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - sql = "select exists (select 1 from kjd.user where user_name='" + user_name + "')"; - var exist = mySql.ExecuteFirstInt(sql); - if (exist > 0) - { - mySql.Close(); - return "{\"code\":500,\"msg\":\"用户名已存在\"}"; - } - - sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,add_time,mdy_time) " + - "values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" + - group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (!rst) - return "{\"code\":501,\"msg\":\""+ mySql.Message + "\"}"; - else - return "{\"code\":200,\"msg\":\"子账户创建成功!\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string GetSubUser(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var password = RegexUtils.GetStringQuery(ref inputData, "password"); - var group = RegexUtils.GetStringQuery(ref inputData, "group"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "select * from kjd.user where parent_user_name='" - + user_name + "'"; - - var dt = mySql.ExecuteDataTable(sql); - mySql.Close(); - if (dt != null) - { - List userList = new List(); - foreach (DataRow row in dt.Rows) - { - - UserLoginResultParam user = new UserLoginResultParam - { - id = Convert.ToInt32(row["id"]), - user_name = row["user_name"].ToString(), - nick_name = row["nick_name"].ToString(), - mobile = row["mobile"].ToString(), - password = row["password"].ToString(), - group_id = row["group_id"].ToString(), - card_id = row["card_id"].ToString(), - parent_user_name = row["parent_user_name"].ToString(), - company_name = row["company_name"].ToString(), - notes = row["notes"].ToString(), - }; - if (string.IsNullOrEmpty(user.mobile)) - { - user.mobile = row["user_name"].ToString(); - } - userList.Add(user); - } - var data = JsonUtils.SerializerObjectToString(userList); - return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string UpdateSubUser(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var id = RegexUtils.GetStringQuery(ref inputData, "id")?.Replace("'", "\\'"); - var parent_user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_nick_name"))?.Replace("'", "\\'"); - var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_name"))?.Replace("'", "\\'"); - var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_mobile"))?.Replace("'", "\\'"); - var password = RegexUtils.GetStringQuery(ref inputData, "sub_password")?.Replace("'", "\\'"); - var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); - var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); - var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - //sql = "select * from kjd.user where parent_user_name='" - // + user_name + "'"; - sql = "update kjd.user set"; - if (!string.IsNullOrEmpty(nick_name)) - sql += " nick_name='" + nick_name + "',"; - if (!string.IsNullOrEmpty(user_name)) - sql += " user_name='" + user_name + "',"; - if (!string.IsNullOrEmpty(mobile)) - sql += " mobile='" + mobile + "',"; - if (!string.IsNullOrEmpty(password)) - sql += " password='" + password + "',"; - if (!string.IsNullOrEmpty(group_id)) - sql += " group_id=" + group_id + ","; - if (!string.IsNullOrEmpty(card_id)) - sql += " card_id='" + card_id + "',"; - if (!string.IsNullOrEmpty(notes)) - sql += " notes='" + notes + "',"; - sql = sql.TrimEnd(','); - sql += " where id=" + id + ""; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - - public string DelUser(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); - var id = RegexUtils.GetStringQuery(ref inputData, "id"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from kjd.user where id='" - + id + "'"; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - return "{\"code\":500,\"msg\":\"删除失败,请稍后重试\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string GetAllUser(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); - var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); - var search = RegexUtils.GetStringQuery(ref inputData, "search")?.Replace("'", "\\'"); - var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - //string sql = "select * from kjd.user where group_id=3"; - string sql = "select * from kjd.user where 1=1"; - if (!string.IsNullOrEmpty(group_id)) - sql += " and group_id=" + group_id; - if (!string.IsNullOrEmpty(sa_level)) - sql += " and sa_level=" + sa_level; - if (!string.IsNullOrEmpty(search)) - sql += " and (user_name like '%" + search + - "%' or nick_name like '%" + search + - "%' or company_name like '%" + search + "%')"; - sql += " order by id desc"; - - var dt = mySql.ExecuteDataTable(sql); - mySql.Close(); - if (dt != null) - { - List userList = new List(); - foreach (DataRow row in dt.Rows) - { - - UserLoginResultParam user = new UserLoginResultParam - { - id = Convert.ToInt32(row["id"]), - user_name = row["user_name"].ToString(), - nick_name = row["nick_name"].ToString(), - mobile = row["mobile"].ToString(), - password = row["password"].ToString(), - group_id = row["group_id"].ToString(), - card_id = row["card_id"].ToString(), - parent_user_name = row["parent_user_name"].ToString(), - company_name = row["company_name"].ToString(), - notes = row["notes"].ToString(), - is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0, - sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0, - }; - if (string.IsNullOrEmpty(user.mobile)) - { - user.mobile = row["user_name"].ToString(); - } - userList.Add(user); - } - var data = JsonUtils.SerializerObjectToString(userList); - return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string AddUser(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_nick_name"))?.Replace("'", "\\'"); - var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'"); - var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_mobile"))?.Replace("'", "\\'"); - var password = RegexUtils.GetStringQuery(ref inputData, "add_password")?.Replace("'", "\\'"); - var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_company"))?.Replace("'", "\\'"); - var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); ; - var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); - var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); - var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - sql = "select exists (select 1 from kjd.user where user_name='" + user_name + "')"; - var exist = mySql.ExecuteFirstInt(sql); - if (exist > 0) - { - mySql.Close(); - return "{\"code\":500,\"msg\":\"用户名已存在\"}"; - } - - sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,add_time,mdy_time) " + - "values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" + - group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (!rst) - return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}"; - else - return "{\"code\":200,\"msg\":\"success\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - public string UpdateUser(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var id = RegexUtils.GetStringQuery(ref inputData, "id")?.Replace("'", "\\'"); - var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_nick_name"))?.Replace("'", "\\'"); - var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'"); - var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_mobile"))?.Replace("'", "\\'"); - var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_company"))?.Replace("'", "\\'"); - var password = RegexUtils.GetStringQuery(ref inputData, "add_password")?.Replace("'", "\\'"); - var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); - var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); - var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); - var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); - int r2 = 0; - int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = ""; - //sql = "select * from kjd.user where parent_user_name='" - // + user_name + "'"; - sql = "update kjd.user set"; - if (!string.IsNullOrEmpty(nick_name)) - sql += " nick_name='" + nick_name + "',"; - if (!string.IsNullOrEmpty(user_name)) - sql += " user_name='" + user_name + "',"; - if (!string.IsNullOrEmpty(mobile)) - sql += " mobile='" + mobile + "',"; - if (!string.IsNullOrEmpty(company_name)) - sql += " company_name='" + company_name + "',"; - if (!string.IsNullOrEmpty(password)) - sql += " password='" + password + "',"; - if (!string.IsNullOrEmpty(group_id)) - sql += " group_id=" + group_id + ","; - if (!string.IsNullOrEmpty(card_id)) - sql += " card_id='" + card_id + "',"; - if (!string.IsNullOrEmpty(notes)) - sql += " notes='" + notes + "',"; - if (!string.IsNullOrEmpty(sa_level)) - sql += " sa_level=" + sa_level + ","; - sql = sql.TrimEnd(','); - sql += " where id=" + id + ""; - - var rst = mySql.ExecuteNonQuery(sql); - mySql.Close(); - if (rst) - { - return "{\"code\":200,\"msg\":\"success\"}"; - } - else - { - return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - - - - public string ChangePassword(string inputData) - { - var userName = RegexUtils.GetStringJson(ref inputData, "user_name")?.Replace("'", "\\'"); - var password = RegexUtils.GetStringJson(ref inputData, "password")?.Replace("'", "\\'"); - var newPassword = RegexUtils.GetStringJson(ref inputData, "new_password")?.Replace("'", "\\'"); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["Conn"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "select user_id,password from pepdtp.user where user_id='" - + userName + "' and password='" + password + "'"; - - var dw = mySql.ExecuteDataTableRow(sql); - if (dw != null) - { - UserLoginResultParam user = new UserLoginResultParam - { - user_name = dw["user_id"].ToString(), - password = dw["password"].ToString(), - }; - sql = "update pepdtp.user set password = '" + newPassword + "' where user_id='" + userName + "'"; - var result = mySql.ExecuteNonQuery(sql); - mySql.Close(); - - if (result) - { - return "{\"code\":0,\"msg\":\"密码修改成功!\"}"; - } - else - return "{\"code\":19999,\"msg\":\"密码修改失败!请稍后再试。\"}"; - } - else - { - mySql.Close(); - return "{\"code\":1,\"msg\":\"原密码错误。\"}"; - } - } - - public string return_package_secret_key { get; set; } = "aaMETt2bPe6YHzZ1ojbC+6wOvgtwehqc6A+/Rz+pCUU="; - - public string GetPackageSign(string inputData) - { - if (!string.IsNullOrEmpty(inputData)) - { - var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'"); - var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); - var timestamp = RegexUtils.GetStringQuery(ref inputData, "timestamp")?.Replace("'", "\\'"); - var mallId = RegexUtils.GetStringQuery(ref inputData, "mallId")?.Replace("'", "\\'"); - var returnPackageNo = RegexUtils.GetStringQuery(ref inputData, "returnPackageNo")?.Replace("'", "\\'"); - int r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt(); - string c2 = RegexUtils.GetStringQuery(ref inputData, "c2"); - - if (EncrypUtil.Encryption(r2) != c2) - return "{\"code\":2,\"msg\":\"不合法的输入内容\"}"; - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - string sql = "select * from kjd.user where user_name='" - + mobile + "' and password='" + password + "'"; - - sql = "select * from kjd.user where user_name='" + mobile + "'"; - - var dt = mySql.ExecuteDataTable(sql); - mySql.Close(); - if (dt == null || dt.Rows.Count <=0) - { - return "{\"code\":1,\"msg\":\"用户不存在\"}"; - } - - string sign = EncrypUtil.GetMd5(timestamp + return_package_secret_key + mallId + returnPackageNo).ToLower(); - - return "{\"code\":200, \"sign\":\"" + sign + "\", \"msg\":\"\"}"; - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; - } - } -} \ No newline at end of file diff --git a/KJDService/KJD_WebService/Global.asax.cs b/KJDService/KJD_WebService/Global.asax.cs index 851483f..6941abb 100644 --- a/KJDService/KJD_WebService/Global.asax.cs +++ b/KJDService/KJD_WebService/Global.asax.cs @@ -53,6 +53,38 @@ namespace KJD_Web hPath = hPath.Replace("/price/", "/PriceService.asmx/"); Context.RewritePath(hPath); } + + + if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_user/")) + { + hPath = hPath.Replace("/bxx_user/", "/BXXUserService.asmx/"); + Context.RewritePath(hPath); + } + else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_shop/")) + { + hPath = hPath.Replace("/bxx_shop/", "/BXXShopService.asmx/"); + Context.RewritePath(hPath); + } + //else if (!hPath.Contains(".asmx") && hPath.Contains("/update/")) + //{ + // hPath = hPath.Replace("/update/", "/UpdateService.asmx/"); + // Context.RewritePath(hPath); + //} + else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_product/")) + { + hPath = hPath.Replace("/bxx_product/", "/BXXProductService.asmx/"); + Context.RewritePath(hPath); + } + else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_product_third/")) + { + hPath = hPath.Replace("/bxx_product_third/", "/BXXProductThirdService.asmx/"); + Context.RewritePath(hPath); + } + else if (!hPath.Contains(".asmx") && hPath.Contains("/bxx_price/")) + { + hPath = hPath.Replace("/bxx_price/", "/BXXPriceService.asmx/"); + Context.RewritePath(hPath); + } } protected void Application_AuthenticateRequest(object sender, EventArgs e) diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj index 9236207..ba4b05f 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj +++ b/KJDService/KJD_WebService/KJD_WebService.csproj @@ -75,23 +75,33 @@ + + + + + - - - - - - - + + + + + + + + + + + + Global.asax @@ -103,10 +113,22 @@ + + BXXPriceService.asmx + Component + PriceService.asmx Component + + BXXProductService.asmx + Component + + + BXXProductThirdService.asmx + Component + ProductThirdService.asmx Component @@ -116,6 +138,10 @@ ProductService.asmx Component + + BXXShopService.asmx + Component + ShopService.asmx Component @@ -128,6 +154,10 @@ ToolService.asmx Component + + BXXUserService.asmx + Component + UserService.asmx Component @@ -157,6 +187,7 @@ Web.config + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 6a87714..6745477 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -490,6 +490,56 @@ MainForm.cs + + Form + + + PDDShopAddEditForm.cs + + + Form + + + MPddShopForm.cs + + + Form + + + PDDShopListForm.cs + + + Form + + + PDDShopLoginForm.cs + + + Form + + + PDDShopUpdateCookieForm.cs + + + Form + + + PDDSubAccountListForm.cs + + + Form + + + PDDSubAccountShopEditForm.cs + + + + + UserControl + + + UcSubAccount.cs + @@ -791,6 +841,30 @@ MainForm.cs + + PDDShopAddEditForm.cs + + + MPddShopForm.cs + + + PDDShopListForm.cs + + + PDDShopLoginForm.cs + + + PDDShopUpdateCookieForm.cs + + + PDDSubAccountListForm.cs + + + PDDSubAccountShopEditForm.cs + + + UcSubAccount.cs + ResXFileCodeGenerator Designer @@ -838,6 +912,8 @@ + + @@ -942,9 +1018,7 @@ Work - - - + diff --git a/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.cs index 386d871..dc65acc 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.cs @@ -16,7 +16,7 @@ namespace TemuKJD.KJDForms.AdminForms { public partial class AdminAccountForm : BaseForm { - public static List AllUsers { get; set; } = new List(); + public static List AllUsers { get; set; } = new List(); public MainForm Mf { get; set; } = null; public string Uid { get; set; } = ""; @@ -125,7 +125,7 @@ namespace TemuKJD.KJDForms.AdminForms foreach (Newtonsoft.Json.Linq.JObject obj in userObj["data"]) { string oStr = JsonHelper.SerializeObject(obj); - DouShopSubAccountInfo user = new DouShopSubAccountInfo(); + ShopSubAccountInfo user = new ShopSubAccountInfo(); user.id = BaseRegex.GetIntJson(ref oStr, "id"); user.user_name = BaseRegex.GetStringJson(ref oStr, "user_name"); user.nick_name = BaseRegex.GetStringJson(ref oStr, "nick_name"); diff --git a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs index 3d9b765..032ba6c 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs @@ -13,6 +13,7 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +using TemuKJD.BLL; using TemuKJD.Extension; using TemuKJD.KJDForms.BaseForms; using TemuKJD.KJDForms.ShopForms; @@ -204,7 +205,7 @@ namespace TemuKJD.KJDForms.AdminForms pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); pageCount = Math.Max(pageCount, 1); - return AdminShopListForm.DeserializationShop(html); + return ShopBLL.DeserializationShop(html); } private void btnEmpty_Click(object sender, EventArgs e) diff --git a/TEMUKJD/KJDForms/AdminForms/AdminShopAddSubSaForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminShopAddSubSaForm.cs index 1a81a28..5b8e59f 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminShopAddSubSaForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminShopAddSubSaForm.cs @@ -19,7 +19,7 @@ namespace TemuKJD.KJDForms.AdminForms { List lstShopLoginName = new List(); - List lstSubSa = new List(); + List lstSubSa = new List(); public AdminShopAddSubSaForm(List ShopSelectIds = null) { InitializeComponent(); @@ -79,7 +79,7 @@ namespace TemuKJD.KJDForms.AdminForms foreach (Newtonsoft.Json.Linq.JObject obj in userObj["data"]) { string oStr = JsonHelper.SerializeObject(obj); - DouShopSubAccountInfo user = new DouShopSubAccountInfo(); + ShopSubAccountInfo user = new ShopSubAccountInfo(); user.id = BaseRegex.GetIntJson(ref oStr, "id"); user.user_name = BaseRegex.GetStringJson(ref oStr, "user_name"); user.nick_name = BaseRegex.GetStringJson(ref oStr, "nick_name"); diff --git a/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs index 42bb094..6dcc8d1 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs @@ -15,6 +15,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +using TemuKJD.BLL; using TemuKJD.Extension; using TemuKJD.KJDForms.BaseForms; using TemuKJD.KJDForms.ShopForms; @@ -287,7 +288,8 @@ namespace TemuKJD.KJDForms.AdminForms case "删除": if (BaseMsgForm.ShowConfirm("确定删除店铺吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) return; - AdminDelServerShop(shop); + if (ShopBLL.AdminDelServerShop(shop)) + SearchShop(this.ucSplitPage1.CurrentPage); break; case "编辑": ShopAddEditForm editForm = new ShopAddEditForm(shop); @@ -351,12 +353,12 @@ namespace TemuKJD.KJDForms.AdminForms } else { - AdminAddServerShop(shopInfo); + ShopBLL.AdminAddServerShop(shopInfo); } } else { - AdminMdyServerShop(shopInfo); + ShopBLL.AdminMdyServerShop(shopInfo); } SearchShop(this.ucSplitPage1.CurrentPage); } @@ -422,165 +424,7 @@ namespace TemuKJD.KJDForms.AdminForms pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); pageCount = Math.Max(pageCount, 1); - return DeserializationShop(html); - } - - public static List AdminGetServerShopLstByIds(List shop_ids) - { - List list = new List(); - shop_ids = shop_ids.Where(s => !string.IsNullOrEmpty(s)).ToList(); - - var url = BaseClass.BuildObjString("shop/admin_get_shop_list"); - var data = UserLogin.GetSignaturex() + - "&shop_ids='" + string.Join("','", shop_ids) + "'"; - data += "&page_size=200"; - 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("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass")) - { - return new List(); - } - - return DeserializationShop(html); - } - - public static string AdminGetServerShopLstForSetCookie(ShopLoginInfo loginShop, List lstRst) - { - if (lstRst == null) - lstRst = new List(); - - var url = BaseClass.BuildObjString("shop/admin_get_shop_list"); - var data = UserLogin.GetSignaturex() + - "&search_user_name=" + loginShop.UserName + - "&search_login_name=" + loginShop.LoginName; - 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("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass")) - { - return "获取失败:" + BaseRegex.GetStringJson(ref html, "msg"); - } - - lstRst.AddRange(DeserializationShop(html)); - - return "success"; - } - - public static List DeserializationShop(string shopJson) - { - List list = new List(); - if (!shopJson.Contains("data")) - return list; - - var jArr = JObject.Parse(shopJson)["data"]; - if (jArr.Count() == 0) - return list; - - foreach (JObject jObj in jArr) - { - string shopStr = jObj.ToString(); - ShopLoginInfo shop = new ShopLoginInfo(); - shop.DbId = BaseRegex.GetStringJson(ref shopStr, "id"); - if (shop.DbId == null) - continue; - shop.LoginName = BaseRegex.GetStringJson(ref shopStr, "login_name"); - shop.Password = BaseRegex.GetStringJson(ref shopStr, "login_pass"); - shop.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id"); - shop.ShopAccount = BaseRegex.GetStringJson(ref shopStr, "shop_account"); - shop.UserName = BaseRegex.GetStringJson(ref shopStr, "user_name"); - shop.SubUserName = BaseRegex.GetStringJson(ref shopStr, "sub_user_name"); - shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "shop_group"); - shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie"); - shop.Cookies = shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+"); - shop.Cookies2 = BaseRegex.GetStringJson(ref shopStr, "cookie2").ParseToString(); - shop.Cookies2 = shop.Cookies2.Replace("&", "&").Replace("%", "%").Replace("+", "+"); - shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name"); - shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes"); - shop.LoginStatus = BaseRegex.GetStringJson(ref shopStr, "login_status"); - shop.LoginStatus2 = BaseRegex.GetStringJson(ref shopStr, "login_status2"); - shop.OperateSubSaName = BaseRegex.GetStringJson(ref shopStr, "operate_sub_sa_name"); - shop.AddProductRemaining = BaseRegex.GetIntJson(ref shopStr, "add_product_remaining"); - - list.Add(shop); - } - return list; - } - - public static string AdminAddServerShop(ShopLoginInfo _shop) - { - var url = BaseClass.BuildObjString("shop/admin_add_shop"); - var data = UserLogin.GetSignaturex() - + "&shop_user_name=" + _shop.UserName - + "&login_name=" + _shop.LoginName - + "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password) - + "&shop_id=" + _shop.ShopId - + "&shop_account=" + _shop.ShopAccount - + "&cookie=" + _shop.Cookies - + "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.GroupName) - + "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName) - + "¬es=" + GetHtml.UrlEncodeUtf8(_shop.Notes) - + "&login_status=" + _shop.LoginStatus; - - 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 AdminMdyServerShop(ShopLoginInfo _shop) - { - var url = BaseClass.BuildObjString("shop/admin_mdy_shop"); - var data = UserLogin.GetSignaturex() - + "&shop_user_name=" + _shop.UserName - + "&login_name=" + _shop.LoginName - + "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password) - + "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.GroupName) - + "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName) - + "¬es=" + GetHtml.UrlEncodeUtf8(_shop.Notes); - - 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 void AdminDelServerShop(ShopLoginInfo _shop) - { - var url = BaseClass.BuildObjString("shop/admin_del_shop"); - var data = UserLogin.GetSignaturex() + "&login_name=" + _shop.LoginName - + "&shop_user_name=" + _shop.UserName; - var result = GetHtml.PostUtf8(url, data); - if (!result.Contains("\"code\":200")) - BaseMsgForm.ShowError("删除失败:" + BaseRegex.GetStringJson(ref result, "msg")); - else - { - SearchShop(this.ucSplitPage1.CurrentPage); - } + return ShopBLL.DeserializationShop(html); } private void btnCheck_Click(object sender, EventArgs e) @@ -642,7 +486,7 @@ namespace TemuKJD.KJDForms.AdminForms var shop = shops.FirstOrDefault(v => v.LoginName == shopLoginNames[i]); // 先从服务端取最新cookie - var serverCampanys = AdminGetServerShopLstByIds(campanys.Select(c => c.ShopId).ToList()); + var serverCampanys = ShopBLL.AdminGetServerShopLstByIds(campanys.Select(c => c.ShopId).ToList()); var serverShop = serverCampanys.FirstOrDefault(); if (shop != null && serverShop != null) { diff --git a/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.cs index 2fb927f..96e429e 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.cs @@ -25,6 +25,8 @@ using Work; using Work.BLL.Tools; using TemuKJD.KJDForms.ShopForms; using TemuKJD.KJDForms.ToolForms; +using TemuKJD.BLL; + namespace TemuKJD.KJDForms.AdminForms { public partial class AdminShopLoginForm : LRBaseForm @@ -167,7 +169,7 @@ namespace TemuKJD.KJDForms.AdminForms { newShop.LoginStatus = "登录成功"; newShop.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd"); - var html = AdminShopListForm.AdminAddServerShop(newShop); // 店铺写入到服务端 + var html = ShopBLL.AdminAddServerShop(newShop); // 店铺写入到服务端 if (!html.Contains("\"code\":200")) isSuccess = false; } @@ -266,7 +268,7 @@ namespace TemuKJD.KJDForms.AdminForms { newShop.LoginStatus2 = "国际版在线"; newShop.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd"); - var html = AdminShopListForm.AdminAddServerShop(newShop); // 店铺写入到服务端 + var html = ShopBLL.AdminAddServerShop(newShop); // 店铺写入到服务端 if (!html.Contains("\"code\":200")) isSuccess = false; } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs index 1153bf6..8a45025 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs @@ -24,6 +24,7 @@ using TemuKJD.KJDForms.ShopForms; using System.Globalization; using TemuKJD.KJDForms.ToolForms; using System.Text.RegularExpressions; +using TemuKJD.BLL; namespace TemuKJD.KJDForms.ProductSelectForms { @@ -192,7 +193,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.ucSplitPage1.TotalPage = pageCount; var shopIdLst = list.Select(p => p.shop_id).Distinct().ToList(); - shopLst = AdminShopListForm.AdminGetServerShopLstByIds(shopIdLst); + shopLst = ShopBLL.AdminGetServerShopLstByIds(shopIdLst); if (defaultBitmap == null) defaultBitmap = new Bitmap(80, 80); @@ -789,7 +790,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms public ShopLoginInfo AdminGetServerShop(string shop_id) { - List list = AdminShopListForm.AdminGetServerShopLstByIds(new string[] { shop_id }.ToList()); + List list = ShopBLL.AdminGetServerShopLstByIds(new string[] { shop_id }.ToList()); return list.FirstOrDefault(); } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectSetSubSaForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectSetSubSaForm.cs index 6477f8f..d50e0e4 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectSetSubSaForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectSetSubSaForm.cs @@ -27,7 +27,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms List lstShopSelectId = new List(); SetSubSaType setSubSaType; - List lstSubSa = new List(); + List lstSubSa = new List(); public DbProductSelectSetSubSaForm(List ProductSelectIds = null, List ShopSelectIds = null, SetSubSaType type = SetSubSaType.DbProduct) { @@ -123,7 +123,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms foreach (Newtonsoft.Json.Linq.JObject obj in userObj["data"]) { string oStr = JsonHelper.SerializeObject(obj); - DouShopSubAccountInfo user = new DouShopSubAccountInfo(); + ShopSubAccountInfo user = new ShopSubAccountInfo(); user.id = BaseRegex.GetIntJson(ref oStr, "id"); user.user_name = BaseRegex.GetStringJson(ref oStr, "user_name"); user.nick_name = BaseRegex.GetStringJson(ref oStr, "nick_name"); diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs index 474af8e..1897e72 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs @@ -25,6 +25,7 @@ using TemuKJD.KJDForms.ProductSelectForms; using System.Text.RegularExpressions; using System.Globalization; using TemuKJD.KJDForms.ToolForms; +using TemuKJD.BLL; namespace TemuKJD.KJDForms.ProductThirdSelectForms { @@ -125,7 +126,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms this.ucSplitPage1.TotalPage = pageCount; var shopIdLst = list.Select(p => p.shop_id).Distinct().ToList(); - shopLst = AdminShopListForm.AdminGetServerShopLstByIds(shopIdLst); + shopLst = ShopBLL.AdminGetServerShopLstByIds(shopIdLst); if (defaultBitmap == null) defaultBitmap = new Bitmap(80, 80); @@ -753,7 +754,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms public ShopLoginInfo GetServerShopById(string shop_id) { - List list = AdminShopListForm.AdminGetServerShopLstByIds(new string[] { shop_id }.ToList()); + List list = ShopBLL.AdminGetServerShopLstByIds(new string[] { shop_id }.ToList()); return list.FirstOrDefault(); } diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs index e9cfc35..e43f49d 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs @@ -30,17 +30,15 @@ namespace TemuKJD.KJDForms.SalesCenterForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.chkIfLowCancel = new TemuKJD.UserComponent.UcCheckBox(this.components); this.actDiscount80 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl(); this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f = new TemuKJD.UserComponent.UcCheckBox(this.components); this.ucCheckBox2 = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -55,6 +53,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.chkFullShop = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkNoSaleProd = new TemuKJD.UserComponent.UcCheckBox(this.components); this.panel1 = new System.Windows.Forms.Panel(); + this.numOnSaleDays2 = new System.Windows.Forms.NumericUpDown(); this.numSaleCount = new System.Windows.Forms.NumericUpDown(); this.cmbDays = new System.Windows.Forms.ComboBox(); this.label4 = new System.Windows.Forms.Label(); @@ -62,6 +61,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.label2 = new System.Windows.Forms.Label(); this.numOnSaleDays = new System.Windows.Forms.NumericUpDown(); this.label1 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); @@ -102,6 +102,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colRecommendPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colRecommendInventory = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colTargetActivityStock = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colPrcie = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colInventory = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -118,6 +119,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.actDiscount85.SuspendLayout(); this.actDiscount70.SuspendLayout(); this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numSaleCount)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays)).BeginInit(); this.ucGroupBoxEx1.SuspendLayout(); @@ -171,6 +173,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx3.Controls.Add(this.chkIfLowCancel); this.ucGroupBoxEx3.Controls.Add(this.actDiscount80); this.ucGroupBoxEx3.Controls.Add(this.actDiscount85); this.ucGroupBoxEx3.Controls.Add(this.actDiscount70); @@ -186,6 +189,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.ucGroupBoxEx3.TabStop = false; this.ucGroupBoxEx3.Text = "活动设置"; // + // chkIfLowCancel + // + this.chkIfLowCancel.AutoSize = true; + this.chkIfLowCancel.Location = new System.Drawing.Point(653, 84); + this.chkIfLowCancel.Name = "chkIfLowCancel"; + this.chkIfLowCancel.Size = new System.Drawing.Size(207, 21); + this.chkIfLowCancel.TabIndex = 723; + this.chkIfLowCancel.Text = "设置库存低于最低库存不报名活动"; + this.chkIfLowCancel.UseVisualStyleBackColor = true; + this.chkIfLowCancel.Visible = false; + // // actDiscount80 // this.actDiscount80.AutoSize = true; @@ -198,16 +212,16 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.actDiscount80.IsDefaultInventory = false; this.actDiscount80.Location = new System.Drawing.Point(15, 82); this.actDiscount80.Name = "actDiscount80"; - this.actDiscount80.Size = new System.Drawing.Size(318, 21); + this.actDiscount80.Size = new System.Drawing.Size(303, 26); this.actDiscount80.TabIndex = 715; // // object_6dcc57fe_428d_475c_90c2_d99d71a7014f // this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.AutoSize = true; - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Location = new System.Drawing.Point(198, 2); + this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Location = new System.Drawing.Point(180, 2); this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Margin = new System.Windows.Forms.Padding(0); this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Name = "object_6dcc57fe_428d_475c_90c2_d99d71a7014f"; - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Size = new System.Drawing.Size(120, 16); + this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Size = new System.Drawing.Size(123, 21); this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.TabIndex = 706; this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Text = "平台推荐最低库存"; this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.UseVisualStyleBackColor = true; @@ -217,7 +231,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.ucCheckBox2.AutoSize = true; this.ucCheckBox2.Location = new System.Drawing.Point(198, 2); this.ucCheckBox2.Name = "ucCheckBox2"; - this.ucCheckBox2.Size = new System.Drawing.Size(48, 16); + this.ucCheckBox2.Size = new System.Drawing.Size(51, 21); this.ucCheckBox2.TabIndex = 706; this.ucCheckBox2.Text = "默认"; this.ucCheckBox2.UseVisualStyleBackColor = true; @@ -227,7 +241,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.ucCheckBox3.AutoSize = true; this.ucCheckBox3.Location = new System.Drawing.Point(198, 2); this.ucCheckBox3.Name = "ucCheckBox3"; - this.ucCheckBox3.Size = new System.Drawing.Size(48, 16); + this.ucCheckBox3.Size = new System.Drawing.Size(51, 21); this.ucCheckBox3.TabIndex = 706; this.ucCheckBox3.Text = "默认"; this.ucCheckBox3.UseVisualStyleBackColor = true; @@ -241,17 +255,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.actDiscount85.Discount = 85; this.actDiscount85.Inventory = 10; this.actDiscount85.IsDefaultInventory = false; - this.actDiscount85.Location = new System.Drawing.Point(351, 82); + this.actDiscount85.Location = new System.Drawing.Point(329, 82); this.actDiscount85.Name = "actDiscount85"; - this.actDiscount85.Size = new System.Drawing.Size(321, 21); + this.actDiscount85.Size = new System.Drawing.Size(306, 26); this.actDiscount85.TabIndex = 711; // // object_5db00808_c6be_4ffa_a702_9b91e2208933 // this.object_5db00808_c6be_4ffa_a702_9b91e2208933.AutoSize = true; - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Location = new System.Drawing.Point(198, 2); + this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Location = new System.Drawing.Point(180, 2); this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Name = "object_5db00808_c6be_4ffa_a702_9b91e2208933"; - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Size = new System.Drawing.Size(120, 16); + this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Size = new System.Drawing.Size(123, 21); this.object_5db00808_c6be_4ffa_a702_9b91e2208933.TabIndex = 706; this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Text = "平台推荐最低库存"; this.object_5db00808_c6be_4ffa_a702_9b91e2208933.UseVisualStyleBackColor = true; @@ -261,7 +275,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.ucCheckBox1.AutoSize = true; this.ucCheckBox1.Location = new System.Drawing.Point(198, 2); this.ucCheckBox1.Name = "ucCheckBox1"; - this.ucCheckBox1.Size = new System.Drawing.Size(48, 16); + this.ucCheckBox1.Size = new System.Drawing.Size(51, 21); this.ucCheckBox1.TabIndex = 706; this.ucCheckBox1.Text = "默认"; this.ucCheckBox1.UseVisualStyleBackColor = true; @@ -274,17 +288,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.actDiscount70.Discount = 70; this.actDiscount70.Inventory = 10; this.actDiscount70.IsDefaultInventory = false; - this.actDiscount70.Location = new System.Drawing.Point(351, 54); + this.actDiscount70.Location = new System.Drawing.Point(329, 54); this.actDiscount70.Name = "actDiscount70"; - this.actDiscount70.Size = new System.Drawing.Size(321, 21); + this.actDiscount70.Size = new System.Drawing.Size(306, 26); this.actDiscount70.TabIndex = 710; // // chkDiscount6 // this.chkDiscount6.AutoSize = true; - this.chkDiscount6.Location = new System.Drawing.Point(198, 2); + this.chkDiscount6.Location = new System.Drawing.Point(180, 2); this.chkDiscount6.Name = "chkDiscount6"; - this.chkDiscount6.Size = new System.Drawing.Size(120, 16); + this.chkDiscount6.Size = new System.Drawing.Size(123, 21); this.chkDiscount6.TabIndex = 706; this.chkDiscount6.Text = "平台推荐最低库存"; this.chkDiscount6.UseVisualStyleBackColor = true; @@ -298,7 +312,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.actDiscount60.IsDefaultInventory = false; this.actDiscount60.Location = new System.Drawing.Point(15, 54); this.actDiscount60.Name = "actDiscount60"; - this.actDiscount60.Size = new System.Drawing.Size(318, 21); + this.actDiscount60.Size = new System.Drawing.Size(303, 23); this.actDiscount60.TabIndex = 709; // // panelEx2 @@ -308,7 +322,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms 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(1055, 32); + this.panelEx2.Location = new System.Drawing.Point(1050, 32); this.panelEx2.Name = "panelEx2"; this.panelEx2.Size = new System.Drawing.Size(70, 23); this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -333,7 +347,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.chkFullShop.CheckState = System.Windows.Forms.CheckState.Checked; this.chkFullShop.Location = new System.Drawing.Point(18, 27); this.chkFullShop.Name = "chkFullShop"; - this.chkFullShop.Size = new System.Drawing.Size(96, 16); + this.chkFullShop.Size = new System.Drawing.Size(99, 21); this.chkFullShop.TabIndex = 684; this.chkFullShop.Text = "报名全店活动"; this.chkFullShop.UseVisualStyleBackColor = true; @@ -344,7 +358,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.chkNoSaleProd.AutoSize = true; this.chkNoSaleProd.Location = new System.Drawing.Point(120, 27); this.chkNoSaleProd.Name = "chkNoSaleProd"; - this.chkNoSaleProd.Size = new System.Drawing.Size(96, 16); + this.chkNoSaleProd.Size = new System.Drawing.Size(99, 21); this.chkNoSaleProd.TabIndex = 685; this.chkNoSaleProd.Text = "算法报名活动"; this.chkNoSaleProd.UseVisualStyleBackColor = true; @@ -352,6 +366,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms // // panel1 // + this.panel1.Controls.Add(this.numOnSaleDays2); this.panel1.Controls.Add(this.numSaleCount); this.panel1.Controls.Add(this.cmbDays); this.panel1.Controls.Add(this.label4); @@ -359,17 +374,35 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.numOnSaleDays); this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.label5); this.panel1.Location = new System.Drawing.Point(223, 23); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(397, 26); + this.panel1.Size = new System.Drawing.Size(545, 26); this.panel1.TabIndex = 722; this.panel1.Visible = false; // + // numOnSaleDays2 + // + this.numOnSaleDays2.Location = new System.Drawing.Point(143, 2); + this.numOnSaleDays2.Maximum = new decimal(new int[] { + 9999, + 0, + 0, + 0}); + this.numOnSaleDays2.Name = "numOnSaleDays2"; + this.numOnSaleDays2.Size = new System.Drawing.Size(46, 23); + this.numOnSaleDays2.TabIndex = 730; + this.numOnSaleDays2.Value = new decimal(new int[] { + 9999, + 0, + 0, + 0}); + // // numSaleCount // - this.numSaleCount.Location = new System.Drawing.Point(286, 2); + this.numSaleCount.Location = new System.Drawing.Point(329, 2); this.numSaleCount.Name = "numSaleCount"; - this.numSaleCount.Size = new System.Drawing.Size(40, 21); + this.numSaleCount.Size = new System.Drawing.Size(40, 23); this.numSaleCount.TabIndex = 726; // // cmbDays @@ -379,7 +412,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.cmbDays.Items.AddRange(new object[] { "7", "30"}); - this.cmbDays.Location = new System.Drawing.Point(203, 1); + this.cmbDays.Location = new System.Drawing.Point(246, 1); this.cmbDays.Name = "cmbDays"; this.cmbDays.Size = new System.Drawing.Size(38, 24); this.cmbDays.TabIndex = 729; @@ -388,35 +421,40 @@ namespace TemuKJD.KJDForms.SalesCenterForms // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(243, 6); + this.label4.Location = new System.Drawing.Point(286, 5); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(41, 12); + this.label4.Size = new System.Drawing.Size(44, 17); this.label4.TabIndex = 728; this.label4.Text = "天销量"; // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(328, 6); + this.label3.Location = new System.Drawing.Point(371, 5); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(65, 12); + this.label3.Size = new System.Drawing.Size(68, 17); this.label3.TabIndex = 727; this.label3.Text = "以内的商品"; // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(148, 6); + this.label2.Location = new System.Drawing.Point(191, 5); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(53, 12); + this.label2.Size = new System.Drawing.Size(56, 17); this.label2.TabIndex = 725; this.label2.Text = "天,且近"; // // numOnSaleDays // - this.numOnSaleDays.Location = new System.Drawing.Point(106, 2); + this.numOnSaleDays.Location = new System.Drawing.Point(80, 2); + this.numOnSaleDays.Maximum = new decimal(new int[] { + 9999, + 0, + 0, + 0}); this.numOnSaleDays.Name = "numOnSaleDays"; - this.numOnSaleDays.Size = new System.Drawing.Size(40, 21); + this.numOnSaleDays.Size = new System.Drawing.Size(46, 23); this.numOnSaleDays.TabIndex = 724; this.numOnSaleDays.Value = new decimal(new int[] { 30, @@ -427,11 +465,20 @@ namespace TemuKJD.KJDForms.SalesCenterForms // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 6); + this.label1.Location = new System.Drawing.Point(3, 5); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(101, 12); + this.label1.Size = new System.Drawing.Size(80, 17); this.label1.TabIndex = 723; - this.label1.Text = "设置加站时间超过"; + this.label1.Text = "设置加站时间"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(125, 5); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(20, 17); + this.label5.TabIndex = 731; + this.label5.Text = "至"; // // ucGroupBoxEx1 // @@ -494,7 +541,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.chkGetDiscount.CheckState = System.Windows.Forms.CheckState.Checked; this.chkGetDiscount.Location = new System.Drawing.Point(20, 68); this.chkGetDiscount.Name = "chkGetDiscount"; - this.chkGetDiscount.Size = new System.Drawing.Size(96, 28); + this.chkGetDiscount.Size = new System.Drawing.Size(99, 38); this.chkGetDiscount.TabIndex = 0; this.chkGetDiscount.Text = "同时查询折扣\r\n (较耗时)"; this.chkGetDiscount.UseVisualStyleBackColor = true; @@ -566,18 +613,18 @@ namespace TemuKJD.KJDForms.SalesCenterForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -588,14 +635,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.colLoginStatus, this.colCanUse, this.colMessage}); - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.DefaultCellStyle = dataGridViewCellStyle12; this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvShop.Location = new System.Drawing.Point(4, 0); this.dgvShop.Name = "dgvShop"; @@ -693,19 +732,19 @@ namespace TemuKJD.KJDForms.SalesCenterForms // this.dgvActivity.AllowUserToAddRows = false; this.dgvActivity.AllowUserToDeleteRows = false; - dataGridViewCellStyle13.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvActivity.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvActivity.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; this.dgvActivity.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvActivity.BackgroundColor = System.Drawing.Color.White; this.dgvActivity.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvActivity.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvActivity.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; this.dgvActivity.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvActivity.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheckActivity, @@ -717,14 +756,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.colSignUpTime, this.colDiscount, this.colActivityMsg}); - dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvActivity.DefaultCellStyle = dataGridViewCellStyle15; this.dgvActivity.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvActivity.Location = new System.Drawing.Point(0, 0); this.dgvActivity.Name = "dgvActivity"; @@ -801,18 +832,18 @@ namespace TemuKJD.KJDForms.SalesCenterForms // this.dgvProduct.AllowUserToAddRows = false; this.dgvProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle16.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16; + dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11; this.dgvProduct.BackgroundColor = System.Drawing.Color.White; this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12; this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheckProduct, @@ -827,17 +858,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.colExtCode, this.colRecommendPrice, this.colRecommendInventory, + this.colTargetActivityStock, this.colPrcie, this.colInventory, this.colMsg}); - dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvProduct.DefaultCellStyle = dataGridViewCellStyle18; this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvProduct.Location = new System.Drawing.Point(0, 0); this.dgvProduct.Name = "dgvProduct"; @@ -939,6 +963,13 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.colRecommendInventory.ReadOnly = true; this.colRecommendInventory.Width = 65; // + // colTargetActivityStock + // + this.colTargetActivityStock.HeaderText = "最低库存"; + this.colTargetActivityStock.Name = "colTargetActivityStock"; + this.colTargetActivityStock.ReadOnly = true; + this.colTargetActivityStock.Width = 65; + // // colPrcie // this.colPrcie.HeaderText = "申报价格"; @@ -1045,6 +1076,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(1424, 529); this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "MarketingActivityForm"; this.Text = "店铺优化"; this.Load += new System.EventHandler(this.MarketingActivityForm_Load); @@ -1063,6 +1095,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.actDiscount70.PerformLayout(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numSaleCount)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays)).EndInit(); this.ucGroupBoxEx1.ResumeLayout(false); @@ -1127,21 +1160,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms private System.Windows.Forms.Label label2; private System.Windows.Forms.NumericUpDown numOnSaleDays; private System.Windows.Forms.Label label1; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCheckProduct; - private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; - private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; - private System.Windows.Forms.DataGridViewTextBoxColumn colSubmitActivityId; - private System.Windows.Forms.DataGridViewTextBoxColumn colSubmitActivityName; - private System.Windows.Forms.DataGridViewImageColumn colPic; - private System.Windows.Forms.DataGridViewTextBoxColumn colProdName; - private System.Windows.Forms.DataGridViewLinkColumn colSpuId; - private System.Windows.Forms.DataGridViewLinkColumn coSkcId; - private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode; - private System.Windows.Forms.DataGridViewTextBoxColumn colRecommendPrice; - private System.Windows.Forms.DataGridViewTextBoxColumn colRecommendInventory; - private System.Windows.Forms.DataGridViewTextBoxColumn colPrcie; - private System.Windows.Forms.DataGridViewTextBoxColumn colInventory; - private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; private System.Windows.Forms.NumericUpDown numSaleCount; private System.Windows.Forms.Label label3; private System.Windows.Forms.ComboBox cmbDays; @@ -1163,5 +1181,24 @@ namespace TemuKJD.KJDForms.SalesCenterForms private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus; private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheckProduct; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubmitActivityId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubmitActivityName; + private System.Windows.Forms.DataGridViewImageColumn colPic; + private System.Windows.Forms.DataGridViewTextBoxColumn colProdName; + private System.Windows.Forms.DataGridViewLinkColumn colSpuId; + private System.Windows.Forms.DataGridViewLinkColumn coSkcId; + private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode; + private System.Windows.Forms.DataGridViewTextBoxColumn colRecommendPrice; + private System.Windows.Forms.DataGridViewTextBoxColumn colRecommendInventory; + private System.Windows.Forms.DataGridViewTextBoxColumn colTargetActivityStock; + private System.Windows.Forms.DataGridViewTextBoxColumn colPrcie; + private System.Windows.Forms.DataGridViewTextBoxColumn colInventory; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + private UserComponent.UcCheckBox chkIfLowCancel; + private System.Windows.Forms.NumericUpDown numOnSaleDays2; + private System.Windows.Forms.Label label5; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs index f91aaab..c2c51a8 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs @@ -393,9 +393,11 @@ namespace TemuKJD.KJDForms.SalesCenterForms pActThematic.activityTypeName = pActivity.activityName; lstActivityThematic.Add(pActThematic); string name = pActThematic.activityThematicName; - pActThematic.discount = BaseRegex.GetMatchRegexString(ref name, "(\\d{1,3}折)").ParseToString(); - pActThematic.discount = pActThematic.discount.Replace("折", ""); + pActThematic.discount = BaseRegex.GetMatchRegexString(ref name, "(\\d{1,3}(\\.?\\d?)折)").ParseToString(); + pActThematic.discount = pActThematic.discount.Replace("折", "").Replace(".",""); pActThematic.discount = string.IsNullOrWhiteSpace(pActThematic.discount) ? "" : pActThematic.discount; + if (pActThematic.discount.Length == 1) + pActThematic.discount += "0"; // 补0 } } } @@ -636,6 +638,8 @@ namespace TemuKJD.KJDForms.SalesCenterForms var dailyPrice = skuObj["dailyPrice"].ParseToInt(); var discount = suggestActivityPrice * 100.0 / dailyPrice; actInfo.discount = Math.Round(discount) + ""; + if (actInfo.discount.Length == 1) + actInfo.discount += "0"; // 补0 Invoke(new Action(() => { actRow.Cells["colDiscount"].Value = string.IsNullOrEmpty(actInfo.discount) ? "-" : actInfo.discount.TrimEnd('0') + "折"; @@ -665,7 +669,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms return lstDiscount.First(); if (discount >= lstDiscount.Last()) return lstDiscount.Last(); - for (int i = 0; i < lstDiscount.Count - 2; i++) + for (int i = 0; i < lstDiscount.Count - 1; i++) { if (discount >= lstDiscount[i] && discount < lstDiscount[i + 1]) return lstDiscount[i]; @@ -732,6 +736,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms public List GetNoSaleProd(string shopId) { int onSaleDays = 0; + int onSaleDays2 = 9999; int saleCount = 0; string days = "7"; //int i = 0; @@ -741,6 +746,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms { days = cmbDays.Text; onSaleDays = numOnSaleDays.Value.ParseToInt(); + onSaleDays2 = numOnSaleDays2.Value.ParseToInt(); saleCount = numSaleCount.Value.ParseToInt(); this.statusBar.lblTaskStatus.Text = "正在查询无销量商品..."; @@ -775,7 +781,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms { page++; - string jsonRst = GetNoSaleProd(shop, days, onSaleDays, saleCount, page); + string jsonRst = GetNoSaleProd(shop, days, onSaleDays, onSaleDays2, saleCount, page); if (!jsonRst.Contains("\"success\":true")) { @@ -871,7 +877,12 @@ namespace TemuKJD.KJDForms.SalesCenterForms int tryCount = 0; tryAgain: Thread.Sleep(100 + Randomx.GetId(200)); + if (chkNoSaleProd.Checked && noSaleProdIdLst.Count == 0) + { + noSaleProdIdLst.Add("123"); + } var jsonRst = GetActivityMatch(shop, activity.activityType, activity.activityThematicId, string.Join(",", noSaleProdIdLst)); + if (jsonRst.Contains("指定的值含有无效的控制字符") || jsonRst.Contains("login") || jsonRst.Contains("Login")) { Invoke(new Action(() => @@ -948,8 +959,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms discountCtrl = this.actDiscount85; // 如果是默认库存或者库存小于推荐值,使用推荐库存 int inventory = discountCtrl.Inventory; - if (inventory < prod.suggestActivityStock || discountCtrl.IsDefaultInventory) - inventory = prod.suggestActivityStock.ParseToInt(); + //if (inventory < prod.suggestActivityStock || discountCtrl.IsDefaultInventory) + // inventory = prod.suggestActivityStock.ParseToInt(); + if (inventory < prod.targetActivityStock || discountCtrl.IsDefaultInventory) + inventory = prod.targetActivityStock.ParseToInt(); Invoke(new Action(() => { int rowId = dgvProduct.Rows.Add( @@ -965,13 +978,23 @@ namespace TemuKJD.KJDForms.SalesCenterForms prod.skcList.FirstOrDefault()?.extCode, activity.discount.Trim('0') + "折", prod.suggestActivityStock, + prod.targetActivityStock, activity.discount.Trim('0') + "折", inventory ); dgvProduct.Rows[rowId].Height = 30; - prodSubmitRows.Add(dgvProduct.Rows[rowId]); + // 过低的报名数量则不参与活动 + if (!discountCtrl.IsDefaultInventory && chkIfLowCancel.Checked && discountCtrl.Inventory < prod.targetActivityStock) + { + } + else + prodSubmitRows.Add(dgvProduct.Rows[rowId]); })); + if (!discountCtrl.IsDefaultInventory && chkIfLowCancel.Checked && discountCtrl.Inventory < prod.targetActivityStock) + { + continue; + } ActProductListItem activityProditem = new ActProductListItem(); activityProditem.productId = prod.productId; activityProditem.activityStock = inventory; @@ -1137,16 +1160,16 @@ namespace TemuKJD.KJDForms.SalesCenterForms /// 加入站点天数 /// /// - private string GetNoSaleProd(ShopLoginInfo shop, string days, int onSalesDays, int saleCount = 0, int page=1) + private string GetNoSaleProd(ShopLoginInfo shop, string days, int onSalesDays, int onSalesDays2, int saleCount = 0, int page=1) { string url = "https://agentseller.temu.com/mms/venom/api/supplier/sales/management/listWarehouse"; string body; if (days == "7") body = @"{""pageNo"":" + page + @",""pageSize"":40,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7, -""sevenDaysSaleVolumMin"":0, ""sevenDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + "}"; +""sevenDaysSaleVolumMin"":0, ""sevenDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + @",""onSalesDurationOfflineLte"":" + onSalesDays2 + "}"; else body = @"{""pageNo"":" + page + @",""pageSize"":40,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7, -""thirtyDaysSaleVolumMin"":0, ""thirtyDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + "}"; +""thirtyDaysSaleVolumMin"":0, ""thirtyDaysSaleVolumMax"":" + saleCount + @",""onSalesDurationOfflineGte"":" + onSalesDays + @",""onSalesDurationOfflineLte"":"+ onSalesDays2 + "}"; string refere = "https://agentseller.temu.com/stock/fully-mgt/sale-manage/main"; return KJDHttpResponse.PostResponse2(shop, url, body, refere); } diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.resx b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.resx index 9975015..250fc0f 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.resx +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.resx @@ -198,6 +198,9 @@ True + + True + True diff --git a/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.Designer.cs b/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.Designer.cs index 6176ad8..3aac4b0 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.Designer.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.Designer.cs @@ -31,7 +31,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms { this.components = new System.ComponentModel.Container(); this.numInventory = new System.Windows.Forms.NumericUpDown(); - this.chkDefaultInventory = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkMinInventory = new TemuKJD.UserComponent.UcCheckBox(this.components); this.label1 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.numInventory)).BeginInit(); this.SuspendLayout(); @@ -46,7 +46,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms 0, 0}); this.numInventory.Name = "numInventory"; - this.numInventory.Size = new System.Drawing.Size(65, 21); + this.numInventory.Size = new System.Drawing.Size(49, 21); this.numInventory.TabIndex = 707; this.numInventory.Value = new decimal(new int[] { 10, @@ -55,16 +55,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms 0}); this.numInventory.ValueChanged += new System.EventHandler(this.numInventory_ValueChanged); // - // chkDefaultInventory + // chkMinInventory // - this.chkDefaultInventory.AutoSize = true; - this.chkDefaultInventory.Location = new System.Drawing.Point(198, 2); - this.chkDefaultInventory.Margin = new System.Windows.Forms.Padding(0); - this.chkDefaultInventory.Name = "chkDefaultInventory"; - this.chkDefaultInventory.Size = new System.Drawing.Size(120, 16); - this.chkDefaultInventory.TabIndex = 706; - this.chkDefaultInventory.Text = "平台推荐最低库存"; - this.chkDefaultInventory.UseVisualStyleBackColor = true; + this.chkMinInventory.AutoSize = true; + this.chkMinInventory.Location = new System.Drawing.Point(180, 2); + this.chkMinInventory.Margin = new System.Windows.Forms.Padding(0); + this.chkMinInventory.Name = "chkMinInventory"; + this.chkMinInventory.Size = new System.Drawing.Size(120, 16); + this.chkMinInventory.TabIndex = 706; + this.chkMinInventory.Text = "平台允许最低库存"; + this.chkMinInventory.UseVisualStyleBackColor = true; + this.chkMinInventory.CheckedChanged += new System.EventHandler(this.chkDefaultInventory_CheckedChanged); // // label1 // @@ -82,10 +83,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.AutoSize = true; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.Controls.Add(this.numInventory); - this.Controls.Add(this.chkDefaultInventory); + this.Controls.Add(this.chkMinInventory); this.Controls.Add(this.label1); this.Name = "UcActivityDiscountCtrl"; - this.Size = new System.Drawing.Size(318, 21); + this.Size = new System.Drawing.Size(300, 21); ((System.ComponentModel.ISupportInitialize)(this.numInventory)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -95,7 +96,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms #endregion private System.Windows.Forms.NumericUpDown numInventory; - private UserComponent.UcCheckBox chkDefaultInventory; + private UserComponent.UcCheckBox chkMinInventory; private System.Windows.Forms.Label label1; } } diff --git a/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.cs b/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.cs index 5f80398..92f6889 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.cs @@ -73,13 +73,13 @@ namespace TemuKJD.KJDForms.SalesCenterForms { get { - return this.chkDefaultInventory.Checked; + return this.chkMinInventory.Checked; } set { - if (this.chkDefaultInventory.Checked != value) + if (this.chkMinInventory.Checked != value) { - this.chkDefaultInventory.Checked = value; + this.chkMinInventory.Checked = value; this.Invalidate(); } } @@ -89,5 +89,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms { this.inventory = numInventory.Value.ParseToInt(); } + + private void chkDefaultInventory_CheckedChanged(object sender, EventArgs e) + { + numInventory.Enabled = !chkMinInventory.Checked; + } } } diff --git a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs index 54c9784..b0cc590 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs @@ -21,6 +21,7 @@ using Work; using NaiBa.Util; using System.Globalization; using TemuKJD.KJDForms.AdminForms; +using TemuKJD.BLL; namespace TemuKJD.KJDForms.ShopForms { @@ -171,7 +172,7 @@ namespace TemuKJD.KJDForms.ShopForms if (jArr.Count() == 0) break; - list.AddRange(AdminForms.AdminShopListForm.DeserializationShop(html)); + list.AddRange(ShopBLL.DeserializationShop(html)); } return list; } @@ -619,7 +620,7 @@ namespace TemuKJD.KJDForms.ShopForms var shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.LoginName == shopNames[i]); // 先从服务端取最新cookie - var serverCampanys = AdminShopListForm.AdminGetServerShopLstByIds(campanys.Select(c => c.ShopId).ToList()); + var serverCampanys = ShopBLL.AdminGetServerShopLstByIds(campanys.Select(c => c.ShopId).ToList()); var sss = string.Join(",", serverCampanys.Select(s => s.UserName + s.ShopAccount)); var serverShop = serverCampanys.FirstOrDefault(); if (shop != null && serverShop != null) @@ -760,7 +761,7 @@ namespace TemuKJD.KJDForms.ShopForms shop.ShopSubAccountList.Clear(); if (!string.IsNullOrWhiteSpace(shop.SubUserName)) { - DouShopSubAccountInfo subAccount = new DouShopSubAccountInfo(); + ShopSubAccountInfo subAccount = new ShopSubAccountInfo(); subAccount.sub_user_name = shop.SubUserName; subAccount.user_name = shop.SubUserName; subAccount.shop_login_name = shop.LoginName; diff --git a/TEMUKJD/KJDForms/ShopForms/ShopUpdateCookieForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopUpdateCookieForm.cs index 4fdb611..0ef780b 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopUpdateCookieForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopUpdateCookieForm.cs @@ -15,6 +15,7 @@ using NaiBa.Util.Extension; using Newtonsoft.Json.Linq; using Work; using TemuKJD.KJDForms.AdminForms; +using TemuKJD.BLL; namespace TemuKJD.KJDForms.ShopForms { @@ -156,7 +157,7 @@ namespace TemuKJD.KJDForms.ShopForms } List serverShopLst = new List(); - var rst = AdminShopListForm.AdminGetServerShopLstForSetCookie(shopLoginInfo, serverShopLst); + var rst = ShopBLL.AdminGetServerShopLstForSetCookie(shopLoginInfo, serverShopLst); if (rst != "success") { @@ -233,7 +234,7 @@ namespace TemuKJD.KJDForms.ShopForms } List serverShopLst = new List(); - var rst = AdminShopListForm.AdminGetServerShopLstForSetCookie(shopLoginInfo, serverShopLst); + var rst = ShopBLL.AdminGetServerShopLstForSetCookie(shopLoginInfo, serverShopLst); if (rst != "success") { @@ -310,7 +311,7 @@ namespace TemuKJD.KJDForms.ShopForms if (oldServerShop == null) { if (updateFrom != SetCookieFromEnum.normal_user) - AdminShopListForm.AdminAddServerShop(newShop); // 店铺写入到服务端 + ShopBLL.AdminAddServerShop(newShop); // 店铺写入到服务端 else ShopListForm.AddServerDouShop(newShop); // 店铺写入到服务端 } diff --git a/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.cs b/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.cs index 732e5a4..17817af 100644 --- a/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.cs @@ -16,7 +16,7 @@ namespace TemuKJD.KJDForms.ShopForms { public partial class SubAccountListForm : BaseForm { - public static List AllUsers { get; set; } = new List(); + public static List AllUsers { get; set; } = new List(); public MainForm Mf { get; set; } = null; public string Uid { get; set; } = ""; public SubAccountListForm() @@ -120,7 +120,7 @@ namespace TemuKJD.KJDForms.ShopForms foreach (Newtonsoft.Json.Linq.JObject obj in userObj["data"]) { string oStr = JsonHelper.SerializeObject(obj); - DouShopSubAccountInfo user = new DouShopSubAccountInfo(); + ShopSubAccountInfo user = new ShopSubAccountInfo(); user.id = BaseRegex.GetIntJson(ref oStr, "id"); user.user_name = BaseRegex.GetStringJson(ref oStr, "user_name"); user.nick_name = BaseRegex.GetStringJson(ref oStr, "nick_name"); diff --git a/TEMUKJD/KJDForms/ShopForms/SubAccountShopEditForm.cs b/TEMUKJD/KJDForms/ShopForms/SubAccountShopEditForm.cs index 1cb3d31..e6f19d3 100644 --- a/TEMUKJD/KJDForms/ShopForms/SubAccountShopEditForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/SubAccountShopEditForm.cs @@ -17,9 +17,9 @@ namespace TemuKJD.KJDForms.ShopForms public partial class SubAccountShopEditForm : LRBaseForm { ShopLoginInfo shop = null; - public List AllSubAccountList { get; set; } = new List(); - public List ShopSubAccountList { get; set; } = new List(); - public List NotShopSubAccountList { get; set; } = new List(); + public List AllSubAccountList { get; set; } = new List(); + public List ShopSubAccountList { get; set; } = new List(); + public List NotShopSubAccountList { get; set; } = new List(); public SubAccountShopEditForm(ShopLoginInfo _shop) { InitializeComponent(); @@ -51,7 +51,7 @@ namespace TemuKJD.KJDForms.ShopForms foreach (Newtonsoft.Json.Linq.JObject obj in userObj["data"]) { string oStr = JsonHelper.SerializeObject(obj); - DouShopSubAccountInfo user = new DouShopSubAccountInfo(); + ShopSubAccountInfo user = new ShopSubAccountInfo(); user.id = BaseRegex.GetIntJson(ref oStr, "id"); user.nick_name = BaseRegex.GetStringJson(ref oStr, "nick_name"); user.user_name = BaseRegex.GetStringJson(ref oStr, "user_name"); @@ -134,8 +134,8 @@ namespace TemuKJD.KJDForms.ShopForms private void btnOk_Click(object sender, EventArgs e) { - List AddUsers = new List(); - List DeleteUsers = new List(); + List AddUsers = new List(); + List DeleteUsers = new List(); foreach (Control c in this.flpNotSubAccount.Controls) { var co = c as UcSubAccount; diff --git a/TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs b/TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs index aff9a61..084127d 100644 --- a/TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs +++ b/TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs @@ -13,14 +13,14 @@ namespace TemuKJD.KJDForms.ShopForms { public partial class UcSubAccount : UserControl { - public DouShopSubAccountInfo subAccount = null; + public ShopSubAccountInfo subAccount = null; public delegate void SubAcountDelegate(object obj); public event SubAcountDelegate AddSubAcountEvent; public event SubAcountDelegate RemoveSubAcountEvent; - public UcSubAccount(DouShopSubAccountInfo _subAccount, bool isNotShopSubAccount = true) + public UcSubAccount(ShopSubAccountInfo _subAccount, bool isNotShopSubAccount = true) { InitializeComponent(); subAccount = _subAccount; diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs index 55291e1..979867a 100644 --- a/TEMUKJD/MainForm.cs +++ b/TEMUKJD/MainForm.cs @@ -39,6 +39,7 @@ using AllBase.Model.Param.ProductManage; using TemuKJD.KJDForms.SalesCenterForms; using NaiBa.CefHelper.Handler; using TemuKJD.KJDForms.AdminForms; +using TemuKJD.PDDForms.ShopForms; namespace TemuKJD { @@ -141,6 +142,9 @@ namespace TemuKJD InitializeComponent(); LoginType = loginType; + if (loginType == "Pdd") + BaseClass.MainPath = "binxixi"; + instance = this; this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); } @@ -190,6 +194,13 @@ namespace TemuKJD // //return; + if (BaseClass.MainPath == "binxixi") + { + //this.pbLogo.Image = Properties.Resources.main_form_logo_pdd; + BaseClass.LogoImage = Properties.Resources.main_form_logo_pdd; + BaseClass.Ico = Icon.FromHandle(Properties.Resources.system_pdd.GetHicon()); + } + Rectangle rect = Screen.GetWorkingArea(this); int width = rect.Width; int height = rect.Height; @@ -624,14 +635,25 @@ namespace TemuKJD } //internal GoodsCollectForm gcf; - private ShopForm shopForm; + private object shopForm; private void pnlShop_Click(object sender, EventArgs e) { - if (shopForm == null) + if (BaseClass.MainPath == "kuajingda") { - shopForm = new ShopForm(); + if (shopForm == null) + { + shopForm = new ShopForm(); + } + ShowMainPanel(shopForm as ShopForm, sender as Panel); + } + else + { + if (shopForm == null) + { + shopForm = new MPddShopForm(); + } + ShowMainPanel(shopForm as MPddShopForm, sender as Panel); } - ShowMainPanel(shopForm, sender as Panel); } private AdminForm adminForm; diff --git a/TEMUKJD/Properties/Resources.Designer.cs b/TEMUKJD/Properties/Resources.Designer.cs index 3558311..c94b84f 100644 --- a/TEMUKJD/Properties/Resources.Designer.cs +++ b/TEMUKJD/Properties/Resources.Designer.cs @@ -293,6 +293,16 @@ namespace TemuKJD.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap login_bg_pdd { + get { + object obj = ResourceManager.GetObject("login_bg_pdd", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// @@ -323,6 +333,16 @@ namespace TemuKJD.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap main_form_logo_pdd { + get { + object obj = ResourceManager.GetObject("main_form_logo_pdd", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// diff --git a/TEMUKJD/Properties/Resources.resx b/TEMUKJD/Properties/Resources.resx index 521e5d9..8b3e995 100644 --- a/TEMUKJD/Properties/Resources.resx +++ b/TEMUKJD/Properties/Resources.resx @@ -178,6 +178,9 @@ ..\Resources\login_bg_agent.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resources\login_bg_pdd.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 @@ -187,6 +190,9 @@ ..\Resources\main_form_logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resources\main_form_logo_pdd.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 diff --git a/TEMUKJD/Resources/login_bg.psd b/TEMUKJD/Resources/login_bg.psd index e80dec5abec4a4a12de9c484e3b8e7722ac5f4b2..9a510de45ed98923f2c3d5070616bc46a7b4827f 100644 GIT binary patch delta 29027 zcmd6P2UrwI^LNj(yRd-dXaW>OMU=1e->ZK*;B zXG<&Ran=ql_Es+T_G!lyoWHr#q~L1m=V0UD>}+RcX&d0+Z|Up+XHM2m_Lhzgw!r~G zc6I?ae%3j@bR+HVKT$GmpQ3|?J+%6_hT~O6rgfdIp0-pkj9qX*$2sS{K_>?dg%(8p zDIqLw7KAIq$#eK$F z)4>gu7i1ru(*vj{shJ?mZmv?fFMoGQ`D`BIE#b1k@JlZCzLPG9qJxpkvBeIFjz zVNP_{xwvae$@GjXuj=0?KY4h4snJ%96gNmp%k!?KL>(CDyTLeL$$L@>VK73P7rs0_ zsFifRc1zZwDe*z%k?rM`dwPU8wN^Zgthn8IxuiRL^=h5wvf|Zwtpl#r`^i#eY?=Rw zfbxkOpG|SdyL>i_ZDe%VzbuIJFv@$N@3B2owR@dByPBDvTEBcS`RrKCP>KE#@2*c~ zKFb%)S8!BUQ9tqFp`xPy+ezp5zD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