From 3b18a48485f7207438d9d0eb3038d979e069431d Mon Sep 17 00:00:00 2001 From: yzh <snbbt@21cn.com> Date: 星期四, 26 五月 2022 17:58:18 +0800 Subject: [PATCH] 优化产品及产品分类,订单,对称加密,IP转地区名称 --- web/web/GwClient.ashx | 35 +++++++++++++++++++++++++++++------ 1 files changed, 29 insertions(+), 6 deletions(-) diff --git a/web/web/GwClient.ashx b/web/web/GwClient.ashx index 667d11a..70a909e 100644 --- a/web/web/GwClient.ashx +++ b/web/web/GwClient.ashx @@ -24,6 +24,7 @@ private int _userId = -1; private int _userType = -1; private string _account = ""; + private string initPwd = ConfigurationManager.AppSettings["initPwd"]; public override JsonPageResult ProcessRequestInternal(PageContext<Model.SysUser> context) { @@ -66,6 +67,9 @@ //鎵归噺鍒嗛厤瀹㈡埛鐨勪釜鎬т骇鍝� case "batchUpdateClientProduct": return BatchUpdateClientProduct(context); + //閲嶇疆瀵嗙爜 + case "resetPwd": + return ResetPwd(context); default: throw new Exception("Invalid Action=" + action); @@ -87,6 +91,7 @@ string ClientName = context.GetString("ClientName"); string Telephone = context.GetString("Telephone"); string Salesman = context.GetString("Salesman"); + string SupportStaff = context.GetString("SupportStaff"); string ProductId = context.GetString("ProductId"); int pageIndex = context.GetInt("pageIndex", 1); @@ -100,7 +105,7 @@ using (GwClientDao dao = new GwClientDao()) { string permissionsSQL = dao.GetClientPermissions(_userId, _userType, null); - var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, ProductId, permissionsSQL); + var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, SupportStaff, ProductId, permissionsSQL); if (list != null && list.Count > 0) { @@ -114,8 +119,8 @@ //edit:yangzh by 20220511 //str += @"<tr ><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Top_up_Amount_Total + "鍏�</td><td>" + item.Agent + "</td><td>" + Certification_StatusResult + "</td>"; //str += @"<tr ><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "鍏�</td><td>" + item.Top_up_Amount_Total/1000 + "鍏�</td><td>" + item.Agent + "</td><td>" + Certification_StatusResult + "</td>"; - str += @"<tr ><td rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "鍏�</td><td>" + item.Top_up_Amount_Total/1000 + "鍏�</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td><td>" + Certification_StatusResult + "</td>"; - + //str += @"<tr ><td rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "鍏�</td><td>" + item.Top_up_Amount_Total/1000 + "鍏�</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td><td>" + Certification_StatusResult + "</td>"; + str += @"<tr ><td rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "</td><td>" + item.Top_up_Amount_Total/1000 + "</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td></td>"; str += @"<td>"; string loginStr = "http://" + serverIp + ":" + clientPort + "/Attachedlogin.aspx?action=Attachedlogin&account=" + item.Account + "&password=" + item.Password; @@ -134,6 +139,10 @@ str += @"榛戝悕鍗�"; str += @"</a> "; + str += string.Format(@"<a class=""action-modal-resetPwd btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); + str += @"閲嶇疆瀵嗙爜"; + str += @"</a> "; + str += string.Format(@"<a class=""action-delete btn btn-xs btn-default"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); str += @"鍒犻櫎"; str += @"</a>"; @@ -143,7 +152,7 @@ } else { - str += @"<tr><td colspan=""10"">鏆傛棤淇℃伅</td></tr>"; + str += @"<tr><td colspan=""9"">鏆傛棤淇℃伅</td></tr>"; } } @@ -216,6 +225,20 @@ string clientID = context.GetString("clientID"); return new JsonPageResult(true, _Dao.GetBlackList(clientID)); + } + + //閲嶇疆瀵嗙爜 + private JsonPageResult ResetPwd(PageContext<Model.SysUser> context) + { + string clientID = context.GetString("clientID"); + string password = string.IsNullOrEmpty(initPwd ) ? "123456" : initPwd; + + //瀵嗙爜MD5鍔犲瘑锛� + password = DataHelper.MD5Hex(password); + + _Dao.UpdatePassword(clientID, password); + + return new JsonPageResult(true, "閲嶇疆瀵嗙爜鎴愬姛锛�"); } /// <summary> @@ -620,14 +643,14 @@ } } - //绠$悊绔处鎴峰悕绉� + //绠$悊绔敤鎴稩D杞悕绉� private string SysUserName(int userId) { if (this.SysUserList == null) return string.Empty; SysUser sysUser = this._SysUserList.Find((Predicate<SysUser>)(bean => bean.UserID == userId)); if (sysUser != null) - return string.Format("{0}-{1}", (object)sysUser.UserID, (object)sysUser.UserName); + return string.Format("{0}", (object)sysUser.UserName); return string.Empty; } } -- Gitblit v1.9.1