子帐户界面访问权管理,主账户可以禁止子账户操作某些界面。

This commit is contained in:
wule committed 2026-06-13 19:12:26 +08:00
1 parent b1afcd2cd8
commit e7ece386e9
20 files changed
+364 -154

No files matched your search

@@ -1,4 +1,5 @@
using KJD_Web.Model;
using KJD_Web.BLL.WXXD;
using KJD_Web.Model;
using KJD_Web.Model.PddModel;
using KJD_Web.Model.ShopModel;
using KJD_Web.Utils;
@@ -21,10 +22,12 @@ namespace KJD_Web.BLL.BXX
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData, true))
return "{\"code\":999,\"msg\":\"校验失败\"}";
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);
var r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt();
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -56,6 +59,7 @@ namespace KJD_Web.BLL.BXX
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["authority"].ToString(),
forbidden_page = row["forbidden_page"].ToString(),
parent_user_name = row["parent_user_name"].ToString(),
};
@@ -89,6 +93,9 @@ namespace KJD_Web.BLL.BXX
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
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("'", "\\'");
@@ -99,8 +106,7 @@ namespace KJD_Web.BLL.BXX
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);
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -113,9 +119,9 @@ namespace KJD_Web.BLL.BXX
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
}
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,add_time,mdy_time) " +
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,forbidden_page,add_time,mdy_time) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" + forbidden_page + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -132,11 +138,13 @@ namespace KJD_Web.BLL.BXX
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
var r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt();
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);
@@ -164,6 +172,7 @@ namespace KJD_Web.BLL.BXX
company_name = row["company_name"].ToString(),
notes = row["notes"].ToString(),
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -182,6 +191,9 @@ namespace KJD_Web.BLL.BXX
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
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("'", "\\'");
@@ -192,8 +204,7 @@ namespace KJD_Web.BLL.BXX
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);
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -217,6 +228,8 @@ namespace KJD_Web.BLL.BXX
sql += " notes='" + notes + "',";
if (authority != null)
sql += " authority='" + authority + "',";
if (forbidden_page != null)
sql += " forbidden_page='" + forbidden_page + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -234,10 +247,13 @@ namespace KJD_Web.BLL.BXX
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
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);
if (string.IsNullOrWhiteSpace(id))
return "{\"code\":500,\"msg\":\"id不能为空\"}";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -260,13 +276,15 @@ namespace KJD_Web.BLL.BXX
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
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);
var r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt();
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -305,6 +323,7 @@ namespace KJD_Web.BLL.BXX
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() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -323,6 +342,9 @@ namespace KJD_Web.BLL.BXX
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
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("'", "\\'");
@@ -333,8 +355,7 @@ namespace KJD_Web.BLL.BXX
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);
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -347,9 +368,9 @@ namespace KJD_Web.BLL.BXX
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
}
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority,add_time,mdy_time) " +
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority,add_time,mdy_time,forbidden_page) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" + forbidden_page + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -366,6 +387,9 @@ namespace KJD_Web.BLL.BXX
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
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("'", "\\'");
@@ -377,8 +401,7 @@ namespace KJD_Web.BLL.BXX
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);
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -406,6 +429,8 @@ namespace KJD_Web.BLL.BXX
sql += " sa_level=" + sa_level + ",";
if (authority != null)
sql += " authority='" + authority + "',";
if (forbidden_page != null)
sql += " forbidden_page='" + forbidden_page + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -48,6 +48,8 @@ namespace KJD_Web.BLL
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() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.company_name))
@@ -77,8 +79,7 @@ namespace KJD_Web.BLL
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);
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -91,9 +92,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,authority,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,forbidden_page,add_time,mdy_time) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" + forbidden_page + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -142,6 +143,7 @@ namespace KJD_Web.BLL
company_name = row["company_name"].ToString(),
notes = row["notes"].ToString(),
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -170,6 +172,7 @@ namespace KJD_Web.BLL
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("'", "\\'");
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -195,6 +198,8 @@ namespace KJD_Web.BLL
sql += " notes='" + notes + "',";
if (!string.IsNullOrEmpty(authority))
sql += " authority='" + authority + "',";
if (!string.IsNullOrEmpty(forbidden_page))
sql += " forbidden_page='" + forbidden_page + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -288,6 +293,7 @@ namespace KJD_Web.BLL
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() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -317,6 +323,7 @@ namespace KJD_Web.BLL
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("'", "\\'");
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -332,9 +339,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,authority,add_time,mdy_time) " +
"authorized_amount,authority,forbidden_page,add_time,mdy_time) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + "," + authorized_amount + ",'" + authority + "','" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + "," + authorized_amount + ",'" + authority + "','" + forbidden_page + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -363,6 +370,7 @@ namespace KJD_Web.BLL
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("'", "\\'");
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -394,6 +402,8 @@ namespace KJD_Web.BLL
sql += " authorized_amount=" + authorized_amount + ",";
if (authority != null)
sql += " authority='" + authority + "',";
if (forbidden_page != null)
sql += " forbidden_page='" + forbidden_page + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -22,9 +22,8 @@ namespace KJD_Web.BLL.WXXD
{
if (string.IsNullOrEmpty(signData)) { return false; }
var time = 0;
int.TryParse(RegexUtils.GetStringQuery(ref signData, "time"), out time);
string time1 = RegexUtils.GetStringQuery(ref signData, "code");
var time = RegexUtils.GetStringQuery(ref signData, "time").ParseToInt();
var time1 = RegexUtils.GetStringQuery(ref signData, "code");
if (time1 != EncrypUtil.Encryption(time))
return false;
@@ -98,6 +97,7 @@ namespace KJD_Web.BLL.WXXD
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() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
parent_user_name = row["parent_user_name"].ToString(),
points = row.Table.Columns.Contains("points") ? row["points"].ParseToInt() : 0,
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
@@ -160,6 +160,7 @@ namespace KJD_Web.BLL.WXXD
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("'", "\\'");
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -174,9 +175,10 @@ 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,authority,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,forbidden_page,add_time,mdy_time) " +
"VALUES ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" + forbidden_page + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -228,6 +230,7 @@ namespace KJD_Web.BLL.WXXD
company_name = row["company_name"].ToString(),
notes = row["notes"].ToString(),
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
};
if (string.IsNullOrEmpty(user.mobile))
{
@@ -259,6 +262,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 authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -284,6 +288,8 @@ namespace KJD_Web.BLL.WXXD
sql += " notes='" + notes + "',";
if (authority != null)
sql += " authority='" + authority + "',";
if (forbidden_page != null)
sql += " forbidden_page='" + forbidden_page + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + "";
@@ -416,6 +422,7 @@ namespace KJD_Web.BLL.WXXD
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() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
points = row.Table.Columns.Contains("points") ? row["points"].ParseToInt() : 0,
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
};
@@ -464,6 +471,7 @@ namespace KJD_Web.BLL.WXXD
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("'", "\\'");
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
var shop_points_per_month = RegexUtils.GetStringQuery(ref inputData, "shop_points_per_month")?.Replace("'", "\\'");
if (shop_points_per_month.ParseToInt() <= 30) // 充值用户月积分消耗点数,最小30
@@ -481,9 +489,10 @@ namespace KJD_Web.BLL.WXXD
}
sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority," +
"shop_points_per_month,add_time,mdy_time) " +
"forbidden_page,shop_points_per_month,add_time,mdy_time) " +
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "'," + shop_points_per_month + ",'" +
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" + forbidden_page + "'," +
shop_points_per_month + ",'" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -514,6 +523,7 @@ namespace KJD_Web.BLL.WXXD
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("'", "\\'");
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
var shop_points_per_month = RegexUtils.GetStringQuery(ref inputData, "shop_points_per_month")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
@@ -542,6 +552,8 @@ namespace KJD_Web.BLL.WXXD
sql += " sa_level=" + sa_level + ",";
if (authority != null)
sql += " authority='" + authority + "',";
if (forbidden_page != null)
sql += " forbidden_page='" + forbidden_page + "',";
if (shop_points_per_month != null)
sql += " shop_points_per_month=" + shop_points_per_month + ",";
sql = sql.TrimEnd(',');
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
@@ -74,5 +74,9 @@ namespace KJD_Web.Model
/// 单店铺续费1个月消耗的点数
/// </summary>
public int shop_points_per_month { get; set; }
/// <summary>
/// 子账号被禁止展示的功能页面
/// </summary>
public string forbidden_page { get; set; }
}
}