优化数据库逻辑,用户分组独立

This commit is contained in:
wule committed 2026-06-20 23:16:19 +08:00
1 parent f2534535f7
commit 29b7a73f22
14 files changed
+1079 -81

No files matched your search

@@ -69,6 +69,11 @@ namespace KJD_Web.BLL.BXX
return "{\"code\":666,\"msg\":\"当前版本已失效,请更新软件\"}";
}
if (add_user_name != null && add_user_name != "admin")
{
Thread.Sleep(1000);
}
if (string.IsNullOrEmpty(product_get_type))
{
product_get_type = "母店采集";
@@ -594,7 +599,7 @@ namespace KJD_Web.BLL.BXX
var ban_pdd = RegexUtils.GetStringQuery(ref inputData, "ban_pdd")?.Replace("'", "\\'");
var add_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'");
var min_view_uv = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "min_view_uv"))?.ParseToNullableInt();
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count").ParseToBool(); // 不计数
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count") == "true"; // 不计数
var no_fission_words = RegexUtils.GetStringQuery(ref inputData, "no_fission_words").ParseToBool(); // 未裂变标题
var fission_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_words"))?.Replace("'", "\\'");
@@ -606,10 +611,12 @@ namespace KJD_Web.BLL.BXX
List<MySqlParameter> paramLst = new List<MySqlParameter>();
string sql = " select count(*) from bxx.product p " +
" FORCE INDEX (index_wx_safe_status) " +
//" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
" WHERE p.is_del=0";
string sql = " select count(*) from bxx.product p ";
//if (!string.IsNullOrEmpty(wx_safe_status))
// sql += " FORCE INDEX (index_wx_safe_status) ";
//sql += " LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
sql += " WHERE p.is_del=0";
string where = "";
//where += " AND (b.ban_wx IS NULL OR b.ban_wx=0)";
@@ -641,7 +648,7 @@ namespace KJD_Web.BLL.BXX
// }
// where += ") ";
//}
if (!string.IsNullOrEmpty(special_prod_type))
if (!string.IsNullOrEmpty(special_prod_type)/* && special_prod_type != "普通商品,书籍,爆款数据"*/)
where += " and p.special_prod_type in ('" + special_prod_type.Replace(",", "','") + "')";
if (!string.IsNullOrWhiteSpace(search_spu))
@@ -700,10 +707,15 @@ namespace KJD_Web.BLL.BXX
if (!string.IsNullOrEmpty(has_wx_cat))
{
//if (has_wx_cat.ToLower() == "true")
// where += " and wx_cat_leaf is NOT NULL and wx_cat_3 IS NOT NULL";
//else
// where += " and (wx_cat_leaf is NULL OR wx_cat_3 IS NULL)";
if (has_wx_cat.ToLower() == "true")
where += " and wx_cat_leaf is NOT NULL and wx_cat_3 IS NOT NULL";
where += " and wx_cat_3 IS NOT NULL";
else
where += " and (wx_cat_leaf is NULL OR wx_cat_3 IS NULL)";
where += " and wx_cat_3 IS NULL";
}
if (!string.IsNullOrEmpty(send_to_out_server))
where += " and send_to_out_server=" + send_to_out_server;
@@ -795,32 +807,39 @@ namespace KJD_Web.BLL.BXX
else
{
if (isDetail)
sql = " SELECT p.*,s.img_base64,s.img_url,e.ext_code_price from bxx.product p" +
" LEFT JOIN bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" +
" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
sql = " SELECT p.*" +
//" ,s.img_base64" +
//" ,s.img_url" +
//" ,e.ext_code_price" +
" from bxx.product p" +
//" LEFT JOIN bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" +
//" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
//" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
" where p.is_del=0";
else if (string.IsNullOrEmpty(get_select_count))
sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name," +
" p.main_img,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group," +
" p.product_get_type,p.wx_safe_status,p.sale_count,p.sale_count_text,p.special_prod_type,p.from_shop_name,p.wx_cat_1,p.wx_cat_2,p.wx_cat_3," +
" p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv,p.add_user_name," +
" s.img_url,e.ext_code_price" +
" p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv,p.add_user_name" +
//" ,s.img_url," +
//" e.ext_code_price" +
" FROM bxx.product p " +
" LEFT JOIN bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" +
" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
//" LEFT JOIN bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" +
//" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
//" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
" where p.is_del=0";
else
sql = "SELECT p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name," +
" p.main_img,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group," +
" p.product_get_type,p.wx_safe_status,p.sale_count,p.sale_count_text,p.special_prod_type,p.from_shop_name,p.wx_cat_1,p.wx_cat_2,p.wx_cat_3," +
" p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv,p.add_user_name," +
" s.img_url,COUNT(se.id) AS select_count,e.ext_code_price" +
" p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv,p.add_user_name" +
//" ,s.img_url" +
//" ,e.ext_code_price," +
//" COUNT(se.id) AS select_count" +
" FROM bxx.product p" +
" LEFT JOIN bxx.sku_img_replace s ON p.sku_img_replace_id=s.id LEFT JOIN bxx.product_select se ON p.id=se.out_product_id AND se.shop_id='" + select_shop_id + "' " +
" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
//" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
//" LEFT JOIN bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" +
//" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
//" LEFT JOIN bxx.product_select se ON p.id=se.out_product_id AND se.shop_id='" + select_shop_id + "' " +
" WHERE p.is_del=0";
//where子句
@@ -870,7 +889,7 @@ namespace KJD_Web.BLL.BXX
product_name = row["product_name"].ToString(),
main_img = row["main_img"].ToString(),
ext_code = row["ext_code"].ToString(),
ext_code_price = row["ext_code_price"].IsNullOrEmpty() ? new int?() : row["ext_code_price"].ParseToInt(),
//ext_code_price = row["ext_code_price"].IsNullOrEmpty() ? new int?() : row["ext_code_price"].ParseToInt(),
price_text = row["price_text"].ToString(),
//product_json = row["product_json"].ToString(),
//size_json = row["size_json"].ToString(),
@@ -883,7 +902,7 @@ namespace KJD_Web.BLL.BXX
fission_words = row["fission_words"].ParseToString(),
head_words = row["head_words"].ParseToString(),
sku_img_replace_id = row["sku_img_replace_id"].ParseToInt(),
sku_img_replace_url = row["img_url"].ToString(),
//sku_img_replace_url = row["img_url"].ToString(),
product_get_type_text = row["product_get_type"].ToString(),
view_uv = row["view_uv"].ParseToNullableInt(),
sale_count = row["sale_count"].ParseToInt(),
@@ -907,7 +926,7 @@ namespace KJD_Web.BLL.BXX
prod.sku_secret_json = row["sku_secret_json"].ToString();
prod.fission_imgs = row["fission_imgs"].ToString();
prod.has_wx_format = row["has_wx_format"].ParseToNullableString(); // 微信回采
prod.sku_img_replace_base64 = row["img_base64"].ToString();
//prod.sku_img_replace_base64 = row["img_base64"].ToString();
//prod.sku_img_replace_url = row["img_url"].ToString();
prod.wx_img_map_json = row["wx_img_map_json"].ToString();
problem_prod_data = row["problem_prod_data"].IsNullOrEmpty() ? null : row["problem_prod_data"].ParseToString();
@@ -1288,23 +1307,21 @@ namespace KJD_Web.BLL.BXX
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(200);
var product_get_type = RegexUtils.GetStringQuery(ref inputData, "product_get_type")?.Replace("'", "\\'");
var add_user_name = RegexUtils.GetStringQuery(ref inputData, "add_user_name")?.Replace("'", "\\'");
var is_get_detail = RegexUtils.GetStringQuery(ref inputData, "is_get_detail") == "true";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "SELECT DISTINCT p.group FROM `bxx`.`product` p where p.is_del=0";
string where = " AND p.group NOT LIKE '用户%'";
if (!string.IsNullOrEmpty(product_get_type))
where += " and p.product_get_type in ('" + product_get_type.Replace(",", "','") + "')";
string sql = "SELECT p.* FROM `bxx`.`product_group` p where 1=1 ";
string where = "";
if (!string.IsNullOrEmpty(add_user_name))
{
add_user_name = "'" + string.Join("','", add_user_name.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
where += " and p.add_user_name in (" + add_user_name + ")";
}
sql += where;
sql += " ORDER BY id DESC";
var dt = mySql.ExecuteDataTable(sql);
mySql.Close();
@@ -1313,13 +1330,23 @@ namespace KJD_Web.BLL.BXX
{
try
{
JArray groupArr = new JArray();
string group_data = "";
foreach (DataRow row in dt.Rows)
{
group_data += row["group"].ToString() + ",";
group_data += row["group_name"].ToString() + ",";
if (is_get_detail)
{
JObject groupObj = new JObject();
groupObj["id"] = row["id"].ParseToLong();
groupObj["group_name"] = row["group_name"].ParseToString();
groupObj["add_user_name"] = row["add_user_name"].ParseToString();
groupArr.Add(groupObj);
}
}
var data = group_data.Trim(',');
return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}";
return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\",\"groups\":" + JsonUtils.SerializeObject(groupArr) + "}";
}
catch (Exception ex)
{
@@ -1334,6 +1361,117 @@ namespace KJD_Web.BLL.BXX
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string AddProductGroup(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 add_user_name = RegexUtils.GetStringQuery(ref inputData, "add_user_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(add_user_name))
{
add_user_name = "admin";
}
var group_name = RegexUtils.GetStringQuery(ref inputData, "group_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(group_name))
{
return "{\"code\":500,\"msg\":\"未指定要新增的组\"}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "INSERT IGNORE INTO `bxx`.`product_group` (group_name,add_user_name) VALUES ('" + group_name + "','" + add_user_name + "')";
var del_rows = mySql.ExecuteAffectedRows(sql);
mySql.Close();
if (string.IsNullOrEmpty(mySql.Message))
{
return "{\"code\":200,\"msg\":\"success\", \"del_rows\":" + del_rows + "}";
}
else
{
return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string DelProductGroup(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 add_user_name = RegexUtils.GetStringQuery(ref inputData, "add_user_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(add_user_name))
{
add_user_name = "admin";
}
var id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'");
var group_name = RegexUtils.GetStringQuery(ref inputData, "group_name")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(group_name))
{
return "{\"code\":500,\"msg\":\"未指定要删除的组\"}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "DELETE FROM `bxx`.`product_group` p where 1=1";
string where = "";
if (!string.IsNullOrEmpty(id))
{
id = "" + string.Join(",", id.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "";
where += " and p.id in (" + id + ")";
}
if (!string.IsNullOrEmpty(group_name))
{
group_name = "'" + string.Join("','", group_name.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
where += " and p.group_name in (" + group_name + ")";
}
if (!string.IsNullOrEmpty(add_user_name))
{
add_user_name = "'" + string.Join("','", add_user_name.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
where += " and p.add_user_name in (" + add_user_name + ")";
}
sql += where;
var del_rows = mySql.ExecuteAffectedRows(sql);
mySql.Close();
if (string.IsNullOrEmpty(mySql.Message))
{
return "{\"code\":200,\"msg\":\"success\", \"del_rows\":" + del_rows + "}";
}
else
{
return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string GetProductCates(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
@@ -1406,39 +1544,44 @@ namespace KJD_Web.BLL.BXX
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 conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
//MysqlUtils mySql = new MysqlUtils(conn);
//string sql = "SELECT DISTINCT p.cat_name FROM `bxx`.`product` p where p.is_del=0";
string sql = "SELECT DISTINCT p.main_cat_name FROM `bxx`.`product` p where p.is_del=0";
////string sql = "SELECT DISTINCT p.cat_name FROM `bxx`.`product` p where p.is_del=0";
//string sql = "SELECT DISTINCT p.main_cat_name FROM `bxx`.`product` p where p.is_del=0";
string where = "";
sql += where;
//string where = "";
//sql += where;
var dt = mySql.ExecuteDataTable(sql);
mySql.Close();
//var dt = mySql.ExecuteDataTable(sql);
//mySql.Close();
if (dt != null)
{
try
{
string group_data = "";
foreach (DataRow row in dt.Rows)
{
group_data += row["main_cat_name"].ToString() + ",";
}
var data = group_data.Trim(',');
return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}";
}
catch (Exception ex)
{
return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}";
}
}
else
{
return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
}
//if (dt != null)
//{
// try
// {
// string group_data = "";
// foreach (DataRow row in dt.Rows)
// {
// group_data += row["main_cat_name"].ToString() + ",";
// }
// var data = group_data.Trim(',');
// return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}";
// }
// catch (Exception ex)
// {
// return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}";
// }
//}
//else
//{
// return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
//}
// 直接全部返回了
var pddCats1Str = "男装,办公设备/耗材/相关服务,文具电教/文化用品/商务用品,3C数码配件,古董文玩/邮币/字画/收藏,影音电器,手机,二手数码,笔记本电脑,数码相机/单反相机/摄像机,智能设备,厨房电器,大家电,生活电器,个人护理保健,网络设备,零食/坚果/特产,咖啡/麦片/冲饮,茶,粮油米面/南北干货/调味品,酒类,保健食品/膳食营养补充食品,传统滋补品,电子元器件市场,摩托车/装备/配件,汽车/用品/配件/改装,水产肉类/新鲜蔬果/熟食,女装/女士精品,新车/二手车,流行男鞋,女鞋,箱包皮具/女包/男包,内衣裤袜,腕表眼镜,服饰配件,本地化生活服务,电影/演出/体育赛事,个性定制/设计服务,购物卡/礼品卡/代金券,婚庆/摄影/摄像服务,教育培训,景点门票/周边游,旅游路线/商品/服务,生活缴费,数字生活娱乐,特价酒店/客栈/公寓旅馆,网络服务/软件,网上营业厅,休闲娱乐,游戏服务/直播,床上用品,电子/电工,基础建材,家居饰品,灯饰光源照明,家装主材,居家布艺,全屋定制,商业/办公家具,特色手工艺,五金工具,住宅家具,电动车/配件/交通工具,户外/登山/旅行野营用品,运动/瑜伽/健身/球类,运动包/户外包/配件,运动服/休闲服,运动鞋,自行车/骑行装备/零配件,OTC药品,精制中药材,隐形眼镜/护理液,奶粉/辅食/营养品/零食,婴童用品,童鞋/婴儿鞋/亲子鞋,童装/婴儿装/亲子装,玩具/童车/益智/积木/模型,孕产妇用品/孕妇装/营养,书籍/杂志/报纸,农机/农具/农膜,畜牧/养殖物资,农用物资,成人用品,宠物/宠物食品及用品,餐饮具,厨房/烹饪用具,收纳整理,家庭/个人清洁工具,居家日用,节庆用品/礼品,烟品/打火机/瑞士军刀,洗护清洁剂/卫生巾/纸/香薰,饰品/流行首饰/摆件/保养鉴定,珠宝/钻石/翡翠/黄金,鲜花园艺/绿植仿真/园林设备,乐器/吉他/钢琴/配件,装修设计/施工/监理,医疗健康服务,处方药,彩妆/香水/美妆工具,美容美体仪器,美发护发/假发,美容护肤/美体/精油,医疗器械,婴童尿裤,汽车服务,交通出行,房地产,模玩/动漫/周边/cos/桌游,音乐/影视/明星/音像,搬运/仓储/物流设备,标准件/零部件/工业耗材,机械设备,清洗/食品/商业设备,橡塑材料及制品,平板电脑/MID,品牌台机/品牌一体机/服务器,DIY电脑,闪存卡/U盘/存储/移动硬盘,电脑硬件/显示器/电脑周边,电玩/配件/游戏/攻略,包装用品,保健用品,特色农产品(非食用),239,2603,2629,2933,5217,5752,5834,5839,5851,5906,5921,5955,6076,6128,6209,6290,6398,6536,6586,6630,6758,6785,6883,7323,7629,7639,8172,8439,8502,8508,8509,8538,8583,8634,8669,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8736,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,11683,11684,11685,11686,11687,11688,11689,13176,13177,13178,14697,14740,14933,14966,15083,15356,15543,16155,16192,16209,16237,16288,16548,16676,16794,16901,16989,17134,17249,17285,17412,17455,17671,17803,18088,18270,18349,18482,18574,18601,18637,18814,19298,20078,20118,20340,20645,21417,22856,22881,22931,22964,22986,24383,24386,24402,24407,24426,24520,24636,24699,27063";
var data = pddCats1Str;
return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
@@ -1567,7 +1710,7 @@ namespace KJD_Web.BLL.BXX
if (special_prod_type.IsNullOrEmpty())
special_prod_type = "普通商品,书籍";
var is_supplier_prod_ok = RegexUtils.GetStringQuery(ref inputData, "is_supplier_prod_ok")?.Replace("'", "\\'");
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count").ParseToBool(); // 不计数
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count") == "true"; // 不计数
var prod_count = RegexUtils.GetStringQuery(ref inputData, "prod_count").ParseToInt();
var add_days_less = RegexUtils.GetStringQuery(ref inputData, "add_days_less").ParseToNullableInt();
var has_wx_format = RegexUtils.GetStringQuery(ref inputData, "has_wx_format")?.Replace("'", "\\'");
@@ -1585,10 +1728,11 @@ namespace KJD_Web.BLL.BXX
MysqlUtils mySql = new MysqlUtils(conn);
string sql = " SELECT count(*)" +
" FROM bxx.product p" +
" FORCE INDEX (index_wx_safe_status)" +
//" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
" WHERE p.is_del=0";
" FROM bxx.product p";
//if (!string.IsNullOrEmpty(wx_safe_status))
// sql += " FORCE INDEX (index_wx_safe_status)";
//sql += " LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)"
sql += " WHERE p.is_del=0";
string where = "";
//where += " AND (b.ban_wx IS NULL OR b.ban_wx=0)";
@@ -1639,7 +1783,8 @@ namespace KJD_Web.BLL.BXX
where += " and p.wx_safe_status in ('" + wx_safe_status.Replace(",", "','") + "')";
//if (!string.IsNullOrEmpty(special_prod_type)) // 普通商品 爆款数据
// where += " and p.special_prod_type ='" + special_prod_type + "'";
where += " and p.special_prod_type in ('" + special_prod_type.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(special_prod_type)/* && special_prod_type != "普通商品,书籍,爆款数据"*/)
where += " and p.special_prod_type in ('" + special_prod_type.Replace(",", "','") + "')";
// 供应商货源是否已完成初始设置
if (!string.IsNullOrEmpty(is_supplier_prod_ok))
{
@@ -521,7 +521,7 @@ namespace KJD_Web.BLL.WXXD
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var is_not_count = (RegexUtils.GetStringQuery(ref inputData, "is_not_count")?.Replace("'", "\\'")).ParseToBool();
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count") == "true";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -266,6 +266,30 @@ namespace KJD_Web
Context.Response.End();
}
[WebMethod]
public void add_product_groups()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new BXXProductManage().AddProductGroup(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void del_product_groups()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new BXXProductManage().DelProductGroup(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void get_pdd_product_cates()
{
@@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
<ProjectExtensions>