diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 4e46021..1c091bf 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,8 +27,8 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 527; - //public static int VersionCount = 527; + public static int VersionCount = 530; + //public static int VersionCount = 530; /// /// 版本号 @@ -113,7 +113,7 @@ namespace AllBase public static bool CloudProduct = false; public static string NoKeyword = ""; public static bool ImageSheild = true; - public static string Conn = "Max Pool Size = 512;Database='content';Data Source='sh-cdbrg-b674qssm.sql.tencentcdb.com';Port=62300;User Id='pinbaobao_user';Password='pinbaobao_pass_word123ZFd-';Charset=gbk;"; + public static string Conn = "";//"Max Pool Size = 512;Database='content';Data Source='sh-cdbrg-b674qssm.sql.tencentcdb.com';Port=62300;User Id='pinbaobao_user';Password='pinbaobao_pass_word123ZFd-';Charset=gbk;"; public static decimal MaxPrice = 0; public static decimal MinPrice = 0; public static decimal MinBackMoney = 0; diff --git a/KJDService/KJD_WebService/BLL/ProductManage.cs b/KJDService/KJD_WebService/BLL/ProductManage.cs index d389384..c4d33e4 100644 --- a/KJDService/KJD_WebService/BLL/ProductManage.cs +++ b/KJDService/KJD_WebService/BLL/ProductManage.cs @@ -277,6 +277,7 @@ namespace KJD_Web.BLL 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("'", "\\'"); @@ -291,6 +292,8 @@ namespace KJD_Web.BLL 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) @@ -362,7 +365,9 @@ namespace KJD_Web.BLL 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_count 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(); diff --git a/KJDService/KJD_WebService/BLL/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/ProductThirdManage.cs index ff4c691..2eb34c6 100644 --- a/KJDService/KJD_WebService/BLL/ProductThirdManage.cs +++ b/KJDService/KJD_WebService/BLL/ProductThirdManage.cs @@ -316,7 +316,9 @@ namespace KJD_Web.BLL 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_count 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(); diff --git a/KJDService/KJD_WebService/BLL/ShopManage.cs b/KJDService/KJD_WebService/BLL/ShopManage.cs index 20afdf6..3a7ed82 100644 --- a/KJDService/KJD_WebService/BLL/ShopManage.cs +++ b/KJDService/KJD_WebService/BLL/ShopManage.cs @@ -43,28 +43,28 @@ namespace KJD_Web.BLL string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; MysqlUtils mySql = new MysqlUtils(conn); - string sql = "select count(id) from kjd.shop where 1=1"; + string sql = "SELECT COUNT(s.id) FROM kjd.shop s WHERE 1=1"; //where子句 string where = ""; if (isAdmin) - where += " and (cookie='' or shop_id!='')"; + where += " and (s.cookie='' or s.shop_id!='')"; if (!isAdmin) - where += " and (user_name='" + user_name + "' or sub_user_name like '%" + user_name + "%')"; + where += " and (s.user_name='" + user_name + "' or s.sub_user_name like '%" + user_name + "%')"; if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) - where += " and operate_sub_sa_name='" + operate_sub_sa_name + "'"; + where += " and s.operate_sub_sa_name='" + operate_sub_sa_name + "'"; if (!string.IsNullOrWhiteSpace(search_user_name)) - where += " and user_name like '%" + search_user_name + "%'"; + where += " and s.user_name like '%" + search_user_name + "%'"; if (!string.IsNullOrWhiteSpace(search_login_name)) - where += " and login_name like '%" + search_login_name + "%'"; + where += " and s.login_name like '%" + search_login_name + "%'"; if (!string.IsNullOrWhiteSpace(search_notes)) - where += " and notes like '%" + search_notes + "%'"; + where += " and s.notes like '%" + search_notes + "%'"; if (!string.IsNullOrWhiteSpace(search_id)) - where += " and shop_id like '%" + search_id + "%'"; + where += " and s.shop_id like '%" + search_id + "%'"; if (!string.IsNullOrWhiteSpace(search_name)) - where += " and shop_account like '%" + search_name + "%'"; + where += " and s.shop_account like '%" + search_name + "%'"; if (!string.IsNullOrWhiteSpace(shop_ids)) - where += " and shop_id in (" + shop_ids + ")"; + where += " and s.shop_id in (" + shop_ids + ")"; sql += where; var count = mySql.ExecuteRowCount(sql); @@ -76,14 +76,17 @@ namespace KJD_Web.BLL } else { - sql = "select id,login_name,login_pass,cookie,cookie2,shop_id,shop_account,sub_user_name,user_name,company_name,notes,login_status," + - " login_status2,add_product_remaining,add_product_month,add_time,mdy_time,add_sub_sa_time,operate_sub_sa_name" + - " from kjd.shop where 1=1"; + // LEFT JOIN kjd.product_select s ON p.id=s.out_product_id + 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,s.add_product_remaining,s.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 id desc"; - sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; + sql += " ORDER BY s.id DESC"; + sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size; dt = mySql.ExecuteDataTable(sql); } @@ -123,8 +126,20 @@ namespace KJD_Web.BLL var shopMonthIdList = shopMonthList.Select(s => s.id); mySql = new MysqlUtils(conn); string ids = string.Join(",", shopMonthIdList); - sql = "update kjd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + - " where 1=1 and id in (" + ids + ")"; + 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 shopList) + //{ + //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(); diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.Designer.cs index c20ad8c..208ee20 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.Designer.cs @@ -153,7 +153,6 @@ this.txtProductName.Location = new System.Drawing.Point(90, 205); this.txtProductName.Multiline = true; this.txtProductName.Name = "txtProductName"; - this.txtProductName.ReadOnly = true; this.txtProductName.Size = new System.Drawing.Size(337, 46); this.txtProductName.TabIndex = 397; // diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.cs index e532966..af0c71d 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.cs @@ -48,6 +48,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms var url = BaseClass.BuildObjString("product/mdy_db_product"); var data = UserLogin.GetSignaturex() + "&db_id=" + dbProd.id + "¬es=" + this.txtNotes.Text.Trim(); + data += "&product_name=" + this.txtProductName.Text.Trim(); data += "&ext_code=" + this.txtExtCode.Text.Trim(); data += "&fission_words=" + this.txtFissionWords.Text.Trim(); data += "&head_words=" + this.txtHeadWords.Text.Trim(); @@ -68,6 +69,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms dbProd.head_words = this.txtHeadWords.Text.Trim(); dbProd.end_words = this.txtEndWords.Text.Trim(); dbProd.fission_words = this.txtFissionWords.Text.Trim(); + dbProd.product_name = this.txtProductName.Text.Trim(); this.Close(); } } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs index de3b16a..f6ca7f6 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs @@ -313,6 +313,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words; dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words; dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words; + dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name; break; case "主图": ShowImgForm imgFrom = new ShowImgForm(dgvDbProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString()); diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs index bf121d6..a226356 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs @@ -967,7 +967,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms vid = propInfo.vid, }); } - if (prodParam.productPropertyReqs.Any(p => p.propValue == "织物") && !prodParam.productPropertyReqs.Any(p => p.propName == "织物材质成分")) + if (prodParam.productPropertyReqs.Any(p => p.propValue == "织物" && p.propName == "鞋面材料") && + !prodParam.productPropertyReqs.Any(p => p.propName == "织物材质成分")) { prodParam.productPropertyReqs.Add(new ProductPropertyReqsItem { @@ -1271,7 +1272,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms } #region 草稿箱编辑后立即上传商品 - if (cell != null) { Invoke(new Action(() => @@ -1292,7 +1292,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms var error = BaseRegex.GetStringJson(ref html, "errorMsg"); if (string.IsNullOrWhiteSpace(error)) error = BaseRegex.GetStringJson(ref html, "error_msg"); - return "{\"success\":false,\"status\":\"草稿箱\"," + + // 这里上传草稿一定成功了,所以返回true,但是有错误信息 + return "{\"success\":true,\"status\":\"草稿箱\"," + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + "\"errMsg\":\"上传失败 " + error + " " + sizeError + "\"}"; } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/Price/DbProductPriceMarkUpForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/Price/DbProductPriceMarkUpForm.cs index 5a2c45a..7150343 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/Price/DbProductPriceMarkUpForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/Price/DbProductPriceMarkUpForm.cs @@ -394,8 +394,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms Task.Run(() => { + int i = 0; foreach (var dbId in dbIds) { + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在删除..."; + this.statusBar.pgbTaskProgress.Maximum = dbIds.Count(); + this.statusBar.UpdateProgressBar(i + 1); + })); Thread.Sleep(50); var rst = DeleteServerPrice(dbId, false); if (rst == false) @@ -407,6 +414,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms break; } }; + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "已完成删除"; + this.statusBar.UpdateProgressBar(dbIds.Count()); + })); SearchPrice(this.ucSplitPage1.CurrentPage); }); } diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs index 779a3a2..03bb038 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs @@ -264,7 +264,7 @@ "全部", "重上", "已买"}); - this.cmbUserNotes.Location = new System.Drawing.Point(1044, 5); + this.cmbUserNotes.Location = new System.Drawing.Point(1044, 8); this.cmbUserNotes.Margin = new System.Windows.Forms.Padding(0); this.cmbUserNotes.Name = "cmbUserNotes"; this.cmbUserNotes.Size = new System.Drawing.Size(65, 25); @@ -281,7 +281,7 @@ "核价成功", "核价成功(重复)", "重复"}); - this.cmbNotes.Location = new System.Drawing.Point(917, 5); + this.cmbNotes.Location = new System.Drawing.Point(917, 8); this.cmbNotes.Margin = new System.Windows.Forms.Padding(0); this.cmbNotes.Name = "cmbNotes"; this.cmbNotes.Size = new System.Drawing.Size(65, 25); @@ -308,7 +308,7 @@ "已上传", "草稿箱", "全部"}); - this.cmbStatus.Location = new System.Drawing.Point(814, 5); + this.cmbStatus.Location = new System.Drawing.Point(814, 8); this.cmbStatus.Margin = new System.Windows.Forms.Padding(0); this.cmbStatus.Name = "cmbStatus"; this.cmbStatus.Size = new System.Drawing.Size(65, 25); diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs index 6f9d20f..cd4d0d7 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs @@ -1263,7 +1263,6 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms } #region 草稿箱编辑后立即上传商品 - if (cell != null) { Invoke(new Action(() => @@ -1284,7 +1283,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms var error = BaseRegex.GetStringJson(ref html, "errorMsg"); if (string.IsNullOrWhiteSpace(error)) error = BaseRegex.GetStringJson(ref html, "error_msg"); - return "{\"success\":false,\"status\":\"草稿箱\"," + + // 这里上传草稿一定成功了,所以返回true,但是有错误信息 + return "{\"success\":true,\"status\":\"草稿箱\"," + "\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," + "\"errMsg\":\"上传失败 " + error + " " + sizeError + "\"}"; }