微信筛选店铺 店铺分组 运费加价
This commit is contained in:
1 parent
b4fa5cacb1
commit
afaabea1fa
33 files changed
+1338
-536
No files matched your search
@@ -284,7 +284,7 @@ namespace KJD_Web.BLL.BXX
|
||||
if (!string.IsNullOrEmpty(product_get_type))
|
||||
where += " and p.product_get_type ='" + product_get_type + "'";
|
||||
if (!string.IsNullOrEmpty(wx_safe_status))
|
||||
where += " and p.wx_safe_status ='" + wx_safe_status + "'";
|
||||
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 + "'";
|
||||
|
||||
@@ -684,6 +684,9 @@ namespace KJD_Web.BLL.BXX
|
||||
var in_skc_ids = RegexUtils.GetStringQuery(ref inputData, "in_skc_ids")?.Replace("'", "\\'");
|
||||
var in_groups = RegexUtils.GetStringQuery(ref inputData, "in_groups")?.Replace("'", "\\'");
|
||||
var in_cates = RegexUtils.GetStringQuery(ref inputData, "in_cates")?.Replace("'", "\\'");
|
||||
var wx_cat_1 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_1")?.Replace("'", "\\'");
|
||||
var wx_cat_2 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_2")?.Replace("'", "\\'");
|
||||
var wx_cat_3 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_3")?.Replace("'", "\\'");
|
||||
var product_get_type = RegexUtils.GetStringQuery(ref inputData, "product_get_type")?.Replace("'", "\\'");
|
||||
var wx_safe_status = RegexUtils.GetStringQuery(ref inputData, "wx_safe_status")?.Replace("'", "\\'");
|
||||
var special_prod_type = RegexUtils.GetStringQuery(ref inputData, "special_prod_type")?.Replace("'", "\\'");
|
||||
@@ -723,11 +726,23 @@ namespace KJD_Web.BLL.BXX
|
||||
in_cates = "'" + string.Join("','", in_cates.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
|
||||
where += " and (p.cat_name in (" + in_cates + ") or p.main_cat_name in (" + in_cates + "))";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(wx_cat_1))
|
||||
{
|
||||
where += " and p.wx_cat_1=" + wx_cat_1 + "";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(wx_cat_2))
|
||||
{
|
||||
where += " and p.wx_cat_2=" + wx_cat_2 + "";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(wx_cat_3))
|
||||
{
|
||||
where += " and p.wx_cat_3=" + wx_cat_3 + "";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(product_get_type))
|
||||
where += " and p.product_get_type ='" + product_get_type + "'";
|
||||
if (!string.IsNullOrEmpty(wx_safe_status))
|
||||
where += " and p.wx_safe_status ='" + wx_safe_status + "'";
|
||||
if (!string.IsNullOrEmpty(special_prod_type))
|
||||
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 + "'";
|
||||
// 供应商货源是否已完成初始设置
|
||||
if (!string.IsNullOrEmpty(is_supplier_prod_ok))
|
||||
|
||||
@@ -893,7 +893,8 @@ namespace KJD_Web.BLL
|
||||
|
||||
string where = "";
|
||||
if (!isAdmin)
|
||||
where += " and (s.user_name='" + user_name + "' or s.sub_user_name like '%" + user_name + "%')";
|
||||
//where += " and (s.user_name='" + user_name + "' or s.sub_user_name like '%" + user_name + "%')";
|
||||
where += " and s.user_name='" + user_name + "'";
|
||||
if (!string.IsNullOrEmpty(operate_sub_sa_name))
|
||||
{
|
||||
where += " and s.operate_sub_sa_name = '" + operate_sub_sa_name + "'";
|
||||
@@ -907,7 +908,7 @@ namespace KJD_Web.BLL
|
||||
if (!string.IsNullOrWhiteSpace(status))
|
||||
where += " and s.status = '" + status + "'";
|
||||
if (!string.IsNullOrWhiteSpace(search_shop_id))
|
||||
where += " and s.shop_id like '%" + 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))
|
||||
@@ -927,25 +928,25 @@ namespace KJD_Web.BLL
|
||||
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 + "%'";
|
||||
where += " and p.spu_id like '" + search_spu + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_skc))
|
||||
where += " and p.skc_id like '%" + search_skc + "%'";
|
||||
where += " and p.skc_id like '" + search_skc + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_cat))
|
||||
where += " and p.cat_name like '%" + 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 + "%'";
|
||||
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 + "%')";
|
||||
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<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "@search_shop_account", Value = "%" + search_shop_account + "%", });
|
||||
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());
|
||||
|
||||
@@ -252,7 +252,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
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.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;
|
||||
@@ -267,7 +268,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
string group_data = "";
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
group_data += row["cat_name"].ToString() + ",";
|
||||
group_data += row["main_cat_name"].ToString() + ",";
|
||||
}
|
||||
var data = group_data.Trim(',');
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}";
|
||||
@@ -530,6 +531,137 @@ namespace KJD_Web.BLL.WXXD
|
||||
break;
|
||||
}
|
||||
var data = group_data.Trim(',');
|
||||
if (data.IsNullOrEmpty())
|
||||
data = "\"\"";
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
|
||||
public string WXAddMdyShippingTemplate(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return "{\"code\":50000,\"msg\":\"校验失败\"}";
|
||||
|
||||
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
|
||||
//int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
//int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
||||
string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
|
||||
string shipping_template_json = RegexUtils.GetStringQuery(ref inputData, "shipping_template_json")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty("coid"))
|
||||
return "{\"code\":50001,\"msg\":\"没有运费编号\"}";
|
||||
if (string.IsNullOrEmpty("shipping_template_json"))
|
||||
return "{\"code\":50001,\"msg\":\"没有运费信息\"}";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "SELECT * FROM `wxxd`.`shipping_template` where coid='" + coid + "'";
|
||||
|
||||
string where = "";
|
||||
sql += where;
|
||||
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
mySql = new MysqlUtils(conn);
|
||||
if (dt.Rows.Count == 0)
|
||||
{
|
||||
sql = "INSERT INTO `wxxd`.`shipping_template` (coid,shipping_template_json) VALUES (@coid,@shipping_template_json);";
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = "UPDATE `wxxd`.`shipping_template` SET shipping_template_json=@shipping_template_json WHERE coid=@coid;";
|
||||
}
|
||||
|
||||
List<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "coid", Value = coid, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shipping_template_json", Value = shipping_template_json, });
|
||||
mySql.ExecuteNonQuery(sql, paramLst.ToArray());
|
||||
mySql.Close();
|
||||
if (string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":\"\"}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string WXGetShippingTemplate(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return "{\"code\":50000,\"msg\":\"校验失败\"}";
|
||||
|
||||
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
|
||||
//int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
//int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
||||
string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "SELECT * FROM `wxxd`.`shipping_template` where coid='" + coid + "'";
|
||||
|
||||
string where = "";
|
||||
sql += where;
|
||||
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
string group_data = "";
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
group_data += row["shipping_template_json"].ToString();
|
||||
break;
|
||||
}
|
||||
var data = group_data.Trim(',');
|
||||
if (data.IsNullOrEmpty())
|
||||
data = "\"\"";
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
else
|
||||
{
|
||||
sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.openid,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.user_name,s.company_name,s.notes,s.group_name,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 wxxd.shop s WHERE 1=1";
|
||||
sql += " FROM wxxd.shop s LEFT JOIN wxxd.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1";
|
||||
@@ -133,6 +133,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
add_product_month = row["add_product_month"].ParseToInt(),
|
||||
operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(),
|
||||
openid = row["openid"].ParseToString(),
|
||||
group_name = row["group_name"].ParseToString(),
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
@@ -274,7 +275,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
else
|
||||
{
|
||||
sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.shop_id,s.openid,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.company_name,s.notes,s.group_name,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 wxxd.shop s LEFT JOIN wxxd.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1";
|
||||
|
||||
@@ -311,6 +312,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
add_product_month = row["add_product_month"].ParseToInt(),
|
||||
operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(),
|
||||
openid = row["openid"].ToString(),
|
||||
group_name = row["group_name"].ToString(),
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace KJD_Web.Model.ShopModel
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string notes { get; set; }
|
||||
public string group_name { get; set; }
|
||||
public string login_status { get; set; }
|
||||
public string login_status2 { get; set; }
|
||||
public int add_product_remaining { get; set; }
|
||||
|
||||
@@ -145,5 +145,29 @@ namespace KJD_Web
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
//WXAddMdyAfterSale
|
||||
[WebMethod]
|
||||
public void wx_add_mdy_shipping_template()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXProductManage().WXAddMdyShippingTemplate(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void wx_get_shipping_template()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXProductManage().WXGetShippingTemplate(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user