微信商品回采功能

This commit is contained in:
wule committed 2026-03-06 09:54:48 +08:00
1 parent 3db584fe1e
commit d9900452f2
35 files changed
+4850 -696

No files matched your search

@@ -265,6 +265,7 @@ namespace KJD_Web.BLL.BXX
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
var search_secret_spu_ids = RegexUtils.GetStringQuery(ref inputData, "search_secret_spu_ids")?.Replace("'", "\\'");
var search_spu_ids = RegexUtils.GetStringQuery(ref inputData, "search_spu_ids")?.Replace("'", "\\'");
var wx_safe_status = RegexUtils.GetStringQuery(ref inputData, "wx_safe_status")?.Replace("'", "\\'");
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(500);
@@ -281,6 +282,10 @@ namespace KJD_Web.BLL.BXX
{
sql += " and p.spu_id in ('" + string.Join("','", search_spu_ids.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) + "')";
}
if (wx_safe_status != null)
{
sql += " and p.wx_safe_status in ('" + string.Join("','", wx_safe_status.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) + "')";
}
var dt = mySql.ExecuteDataTable(sql);
mySql.Close();
@@ -549,11 +554,12 @@ namespace KJD_Web.BLL.BXX
prod.size_json = row["size_json"].ToString();
prod.sku_edit_json = row["sku_edit_json"].ToString();
prod.sku_secret_json = row["sku_secret_json"].ToString();
prod.has_wx_format = row["has_wx_format"].ParseToNullableString();
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();
if(!prod.sku_secret_json.IsNullOrEmpty() && prod.secret_spu_id.IsNullOrEmpty())
if (!prod.sku_secret_json.IsNullOrEmpty() && prod.secret_spu_id.IsNullOrEmpty())
{
var secret_json = prod.sku_secret_json;
var goodsId = RegexUtils.GetStringJson(ref secret_json, "goodsId");
@@ -595,6 +601,153 @@ namespace KJD_Web.BLL.BXX
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
/// <summary>
/// 回采微信小店属性等商品数据入库
/// </summary>
/// <param name="inputData"></param>
/// <returns></returns>
public string AddProdWXComplate(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
var timeCalc = DateTime.Now;
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("'", "\\'");
if (user_name.IsNullOrEmpty())
{
return "{\"code\":500,\"msg\":\"用户信息不能为空\"}";
}
var spu_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "spu_id")).ParseToString().Replace("'", "\\'");
var coid = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "coid")).ParseToString().Replace("'", "\\'");
var secret_spu_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "secret_spu_id")).ParseToString().Replace("'", "\\'");
var wx_edit_prod_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_edit_prod_json")).ParseToString().Replace("'", "\\'");
if (secret_spu_id.IsNullOrEmpty() || wx_edit_prod_json.IsNullOrEmpty())
{
return "{\"code\":500,\"msg\":\"商品回采数据不能为空\"}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "";
sql = "INSERT INTO bxx.product_wx_complate (spu_id,coid,secret_spu_id,wx_edit_prod_json) VALUES " +
" ('" + spu_id + "','" + coid + "','" + secret_spu_id + "','" + wx_edit_prod_json + "')" +
" ON DUPLICATE KEY UPDATE spu_id=VALUES(spu_id),coid=VALUES(coid),wx_edit_prod_json=VALUES(wx_edit_prod_json);";
var rst = mySql.ExecuteNonQuery(sql);
if (!rst || !string.IsNullOrEmpty(mySql.Message))
{
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
sql = "UPDATE bxx.product set has_wx_format='1' where secret_spu_id='" + secret_spu_id + "'";
rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
if (!rst || !string.IsNullOrEmpty(mySql.Message))
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
}
else
{
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
return "{\"code\":200,\"msg\":\"success\",\"seconds\":" + seconds + "}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
/// <summary>
/// 查询回采微信小店属性等商品数据
/// </summary>
/// <param name="inputData"></param>
/// <returns></returns>
public string GetProdWXComplateList(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
var timeCalc = DateTime.Now;
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("'", "\\'");
if (user_name.IsNullOrEmpty())
{
return "{\"code\":500,\"msg\":\"用户信息不能为空\"}";
}
var spu_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "spu_id")).ParseToString().Replace("'", "\\'");
var coid = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "coid")).ParseToString().Replace("'", "\\'");
var search_secret_spu_ids = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "search_secret_spu_ids")).ParseToString().Replace("'", "\\'");
if (search_secret_spu_ids.IsNullOrEmpty())
{
return "{\"code\":500,\"msg\":\"商品回采数据编号不能为空\"}";
}
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(1000);
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select id,spu_id,coid,secret_spu_id,wx_edit_prod_json,add_time" +
" from bxx.product_wx_complate p where 1=1";
if (search_secret_spu_ids != null)
{
sql += " and p.secret_spu_id in ('" + string.Join("','", search_secret_spu_ids.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) + "')";
}
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
var dt = mySql.ExecuteDataTable(sql);
mySql.Close();
if (dt != null)
{
try
{
JArray wxProdComplateArr = new JArray();
foreach (DataRow row in dt.Rows)
{
JObject wxProdComplateObj = new JObject();
wxProdComplateObj["id"] = Convert.ToInt32(row["id"]);
wxProdComplateObj["spu_id"] = row["spu_id"].ToString();
wxProdComplateObj["coid"] = row["coid"].ToString();
wxProdComplateObj["secret_spu_id"] = row["secret_spu_id"].ToString();
wxProdComplateObj["wx_edit_prod_json"] = row["wx_edit_prod_json"].ToString();
wxProdComplateObj["add_time"] = Convert.ToDateTime(row["add_time"]);
wxProdComplateArr.Add(wxProdComplateObj);
}
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
var data = JsonUtils.SerializerObjectToString(wxProdComplateArr, jsonSetting);
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + wxProdComplateArr.Count + ",\"seconds\":" + seconds + "}";
}
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\":\"输入为空\"}";
}
/// <summary>
/// 新增下架sku
/// </summary>
/// <param name="inputData"></param>
/// <returns></returns>
public string AddProdDownSku(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
@@ -669,6 +822,11 @@ namespace KJD_Web.BLL.BXX
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
/// <summary>
/// 查询下架sku
/// </summary>
/// <param name="inputData"></param>
/// <returns></returns>
public string GetProdDownSkuLstBySkuCodes(string inputData)
{
var timeCalc = DateTime.Now;
@@ -989,6 +1147,7 @@ namespace KJD_Web.BLL.BXX
var is_not_count = (RegexUtils.GetStringQuery(ref inputData, "is_not_count")?.Replace("'", "\\'")).ParseToBool();
var prod_count = (RegexUtils.GetStringQuery(ref inputData, "prod_count")?.Replace("'", "\\'")).ParseToInt();
var add_days_less = RegexUtils.GetStringQuery(ref inputData, "add_days_less")?.Replace("'", "\\'").ParseToNullableInt();
var has_wx_format = RegexUtils.GetStringQuery(ref inputData, "has_wx_format")?.Replace("'", "\\'").ParseToString();
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
@@ -1058,9 +1217,15 @@ namespace KJD_Web.BLL.BXX
{
where += " and add_time > '" + DateTime.Now.AddDays(-add_days_less.ParseToInt()).ToString("yyyy-MM-dd") + "'";
}
if (!has_wx_format.IsNullOrEmpty())
{
where += " and has_wx_format = '" + has_wx_format + "'";
}
sql += where;
int count = prod_count;
int count = prod_count;
if (product_get_type == "厂商直采" && count > 1500)
count /= 3;
if (!is_not_count)
{
count = mySql.ExecuteRowCount(sql);
@@ -47,6 +47,7 @@ namespace KJD_Web.BLL
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,
authorized_amount = row.Table.Columns.Contains("authorized_amount") ? row["authorized_amount"].ParseToInt() : 0,
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.company_name))
@@ -75,6 +76,7 @@ namespace KJD_Web.BLL
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("'", "\\'");
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -89,9 +91,9 @@ namespace KJD_Web.BLL
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) " +
sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,add_time,mdy_time) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -139,6 +141,7 @@ namespace KJD_Web.BLL
parent_user_name = row["parent_user_name"].ToString(),
company_name = row["company_name"].ToString(),
notes = row["notes"].ToString(),
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -166,6 +169,7 @@ namespace KJD_Web.BLL
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 authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -189,6 +193,8 @@ namespace KJD_Web.BLL
sql += " card_id='" + card_id + "',";
if (!string.IsNullOrEmpty(notes))
sql += " notes='" + notes + "',";
if (!string.IsNullOrEmpty(authority))
sql += " authority='" + authority + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -281,6 +287,7 @@ namespace KJD_Web.BLL
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,
authorized_amount = row.Table.Columns.Contains("authorized_amount") ? row["authorized_amount"].ParseToInt() : 0,
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -308,7 +315,8 @@ namespace KJD_Web.BLL
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("'", "\\'");
var authorized_amount = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
var authorized_amount = RegexUtils.GetStringQuery(ref inputData, "authorized_amount")?.Replace("'", "\\'");
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -324,9 +332,9 @@ namespace KJD_Web.BLL
}
sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level," +
"authorized_amount,add_time,mdy_time) " +
"authorized_amount,authority,add_time,mdy_time) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + "," + authorized_amount + ",'" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + "," + authorized_amount + ",'" + authority + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -354,6 +362,7 @@ namespace KJD_Web.BLL
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
var authorized_amount = RegexUtils.GetStringQuery(ref inputData, "authorized_amount")?.Replace("'", "\\'");
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -383,6 +392,8 @@ namespace KJD_Web.BLL
sql += " sa_level=" + sa_level + ",";
if (!string.IsNullOrEmpty(authorized_amount))
sql += " authorized_amount=" + authorized_amount + ",";
if (authority != null)
sql += " authority='" + authority + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -20,6 +20,7 @@ namespace KJD_Web.BLL.WXXD
{
if (!string.IsNullOrEmpty(inputData))
{
var timeCalc = DateTime.Now;
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");
@@ -188,10 +189,10 @@ namespace KJD_Web.BLL.WXXD
// }
//}
var data = JsonUtils.SerializerObjectToString(shopList);
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
}
}
return "{\"code\":19999,\"msg\":\"未知错误\"}";
@@ -51,6 +51,7 @@ namespace KJD_Web.BLL.WXXD
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,
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.company_name))
@@ -79,6 +80,7 @@ namespace KJD_Web.BLL.WXXD
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("'", "\\'");
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -93,9 +95,9 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
}
sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,add_time,mdy_time) " +
sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,add_time,mdy_time) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -143,6 +145,7 @@ namespace KJD_Web.BLL.WXXD
parent_user_name = row["parent_user_name"].ToString(),
company_name = row["company_name"].ToString(),
notes = row["notes"].ToString(),
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -170,6 +173,7 @@ namespace KJD_Web.BLL.WXXD
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 authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -193,6 +197,8 @@ namespace KJD_Web.BLL.WXXD
sql += " card_id='" + card_id + "',";
if (!string.IsNullOrEmpty(notes))
sql += " notes='" + notes + "',";
if (authority != null)
sql += " authority='" + authority + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -281,6 +287,7 @@ namespace KJD_Web.BLL.WXXD
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,
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -308,6 +315,7 @@ namespace KJD_Web.BLL.WXXD
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("'", "\\'");
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -322,9 +330,9 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
}
sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,add_time,mdy_time) " +
sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority,add_time,mdy_time) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -351,6 +359,7 @@ namespace KJD_Web.BLL.WXXD
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("'", "\\'");
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -378,6 +387,8 @@ namespace KJD_Web.BLL.WXXD
sql += " notes='" + notes + "',";
if (!string.IsNullOrEmpty(sa_level))
sql += " sa_level=" + sa_level + ",";
if (authority != null)
sql += " authority='" + authority + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -122,6 +122,30 @@ namespace KJD_Web
Context.Response.End();
}
[WebMethod]
public void add_prod_wx_complate()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new BXXProductManage().AddProdWXComplate(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void get_prod_wx_complate_list()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new BXXProductManage().GetProdWXComplateList(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void get_sku_replace_img_list_random()
{
@@ -100,5 +100,6 @@ namespace KJD_Web.Model
public int send_to_out_server { get; set; }
public string real_coid { get; set; }
public string real_spu_id { get; set; }
public string has_wx_format { get; set; }
}
}
@@ -57,5 +57,10 @@ namespace KJD_Web.Model
/// 备注
/// </summary>
public string notes { get; set; }
/// <summary>
/// 用户的功能操作权限
/// </summary>
public string authority { get; set; }
}
}
@@ -494,6 +494,25 @@ namespace NaiBa.Util.Extension
}
}
public static string ParseToNullableString(this object obj)
{
try
{
if (obj == null)
{
return null;
}
else
{
return obj.ToString();
}
}
catch
{
return null;
}
}
public static string ParseToStrings<T>(this object obj, string split = ",")
{
try
@@ -83,9 +83,21 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
}
[WebMethod]
public void get_pdd_prod_wx_complate_list()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new BXXProductManage().GetProdWXComplateList(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void get_pdd_product_groups()
{