From adee7a71ba7ab1b63cab63381dfe1846437853d6 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期四, 02 三月 2023 17:37:05 +0800 Subject: [PATCH] 增加分销商配置 --- web/web/GwClient.ashx | 116 +++++++++++++++++++++++----------------------------------- 1 files changed, 46 insertions(+), 70 deletions(-) diff --git a/web/web/GwClient.ashx b/web/web/GwClient.ashx index d7bd4e7..3de025b 100644 --- a/web/web/GwClient.ashx +++ b/web/web/GwClient.ashx @@ -117,11 +117,13 @@ string serverIp = ConfigurationManager.AppSettings["serverIp"]; string clientPort = ConfigurationManager.AppSettings["clientPort"]; + int isSub = context.GetInt("isSub",0); + string str = ""; using (GwClientDao dao = new GwClientDao()) { string permissionsSQL = dao.GetClientPermissions(_userId, _userType, "gwc"); - var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, SupportStaff, ProductId, IsEnable, permissionsSQL); + var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, SupportStaff, ProductId, IsEnable,isSub, permissionsSQL); if (list != null && list.Count > 0) { @@ -132,10 +134,7 @@ { Certification_StatusResult = "宸茶璇�"; } - //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>" + item.ProductIds + "</td>" + "<td>"+ (item.Is_Enable == 1 ? "<span class='label label-primary'>鍚敤</span>" : "<span class='label label-default'>鍋滅敤</span>") + "</td>"; @@ -158,9 +157,9 @@ str += @"鐧藉悕鍗�"; str += @"</a> "; - str += string.Format(@"<a class=""action-modal-black btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); - str += @"榛戝悕鍗�"; - str += @"</a> "; + //str += string.Format(@"<a class=""action-modal-black btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); + //str += @"榛戝悕鍗�"; + //str += @"</a> "; //str += string.Format(@"<a class=""action-modal-resetPwd btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); //str += @"閲嶇疆瀵嗙爜"; @@ -417,31 +416,25 @@ string customerManager = context.GetString("customerManager"); string supportStaff = context.GetString("supportStaff"); string financialStaff = context.GetString("financialStaff"); + + string chargeType = context.GetString("chargeType"); + string smsBillType = context.GetString("smsBillType"); + string smsStatusReport = context.GetString("smsStatusReport"); - string mmsStatusReport = context.GetString("mmsStatusReport"); + string isEnableSub = context.GetString("isEnableSub"); + string isEnableWhite = context.GetString("isEnableWhite"); string isEnableBlack = context.GetString("isEnableBlack"); - string isRemoteLoginNotice = context.GetString("isRemoteLoginNotice"); - string isMobileCaptcha = context.GetString("isMobileCaptcha"); - string isHideMobile = context.GetString("isHideMobile"); - string isDisplayStatus = context.GetString("isDisplayStatus"); - string isLoginIpRestrict = context.GetString("isLoginIpRestrict"); - string isLoginIpAllowGather = context.GetString("isLoginIpAllowGather"); - string isLoginCityRestrict = context.GetString("isLoginCityRestrict"); - string isLoginCityAllowGather = context.GetString("isLoginCityAllowGather"); - - string data = context.GetString("permissionData"); - if(data.Contains("1")) - { - data += ",sp.aspx,GwTaskSmssend,SpPrePattern.aspx"; - } - if(data.Contains("2")) - { - data += ",molog.aspx,mtlog.aspx#stat,mtlog.aspx,statis.aspx"; - } - string permissionData = Newtonsoft.Json.JsonConvert.SerializeObject(data.Split(',')); + //string isRemoteLoginNotice = context.GetString("isRemoteLoginNotice"); + //string isMobileCaptcha = context.GetString("isMobileCaptcha"); + //string isHideMobile = context.GetString("isHideMobile"); + //string isDisplayStatus = context.GetString("isDisplayStatus"); + //string isLoginIpRestrict = context.GetString("isLoginIpRestrict"); + //string isLoginIpAllowGather = context.GetString("isLoginIpAllowGather"); + //string isLoginCityRestrict = context.GetString("isLoginCityRestrict"); + //string isLoginCityAllowGather = context.GetString("isLoginCityAllowGather"); if (string.IsNullOrEmpty(clientID)) { @@ -459,11 +452,6 @@ throw new ArgumentException("鑱旂郴浜�/鑱旂郴鐢佃瘽锛屼笉鑳戒负绌猴紒"); } - if (string.IsNullOrEmpty(customerManager)) - { - throw new ArgumentException("褰掑睘瀹㈡埛缁忕悊涓嶈兘涓虹┖锛岃閫夋嫨锛�"); - } - if (string.IsNullOrEmpty(salesman)) { throw new ArgumentException("褰掑睘涓氬姟鍛樹笉鑳戒负绌猴紝璇烽�夋嫨锛�"); @@ -472,11 +460,6 @@ if (string.IsNullOrEmpty(supportStaff)) { throw new ArgumentException("褰掑睘瀹㈡湇浜哄憳涓嶈兘涓虹┖锛岃閫夋嫨锛�"); - } - - if (string.IsNullOrEmpty(financialStaff)) - { - throw new ArgumentException("褰掑睘璐㈠姟浜哄憳涓嶈兘涓虹┖锛岃閫夋嫨锛�"); } if (string.IsNullOrEmpty(chargeType)) @@ -488,27 +471,6 @@ { throw new ArgumentException("鐭俊鏄惁鏀寔鏄剧ず鐘舵�佹姤鍛婁笉鑳戒负绌猴紝璇烽�夋嫨锛�"); } - - /** - if (string.IsNullOrEmpty(mmsStatusReport)) - { - throw new ArgumentException("褰╀俊鏄惁鏀寔鏄剧ず鐘舵�佹姤鍛婁笉鑳戒负绌猴紝璇烽�夋嫨锛�"); - }**/ - - /** - //缂栬緫鏃朵笉鏀寔涓�у瘑鐮� - string savePassword = ""; - if (!string.IsNullOrEmpty(clientID)) - { - GwClient gwClient = this._Dao.Get(clientID); - savePassword = (gwClient.Password == password ? gwClient.Password : DataHelper.MD5Hex(password) ); - } - else - { - savePassword = DataHelper.MD5Hex(password); - } - - **/ var client = new Model.GwClient(); @@ -529,21 +491,23 @@ client.SupportStaff = supportStaff; client.FinancialStaff = financialStaff; client.ChargeType = string.IsNullOrEmpty(chargeType) ? 0 : int.Parse(chargeType); + client.IsEnableSub = string.IsNullOrEmpty(isEnableSub) ? 0 : int.Parse(isEnableSub); + client.SmsBillType = string.IsNullOrEmpty(smsBillType) ? 0 : int.Parse(smsBillType); client.SmsStatusReport = string.IsNullOrEmpty(smsStatusReport) ? 0 : int.Parse(smsStatusReport); - client.MmsStatusReport = string.IsNullOrEmpty(mmsStatusReport) ? 0 : int.Parse(mmsStatusReport); + client.IsEnableWhite = string.IsNullOrEmpty(isEnableWhite) ? 0 : int.Parse(isEnableWhite); client.IsEnableBlack = string.IsNullOrEmpty(isEnableBlack) ? 0 : int.Parse(isEnableBlack); - client.IsRemoteLoginNotice = string.IsNullOrEmpty(isRemoteLoginNotice) ? 0 : int.Parse(isRemoteLoginNotice); - client.IsMobileCaptcha = string.IsNullOrEmpty(isMobileCaptcha) ? 0 : int.Parse(isMobileCaptcha); - client.IsHideMobile = string.IsNullOrEmpty(isHideMobile) ? 0 : int.Parse(isHideMobile); - client.IsDisplayStatus = string.IsNullOrEmpty(isDisplayStatus) ? 0 : int.Parse(isDisplayStatus); - client.IsLoginIpRestrict = string.IsNullOrEmpty(isLoginIpRestrict) ? 0 : int.Parse(isLoginIpRestrict); - client.IsLoginIpAllowGather = isLoginIpAllowGather; - client.IsLoginCityRestrict = string.IsNullOrEmpty(isLoginCityRestrict) ? 0 : int.Parse(isLoginCityRestrict); - client.IsLoginCityAllowGather = isLoginCityAllowGather; - client.PermissionData = permissionData; + //涓嬮潰鏆傛椂鐢ㄤ笉鍒� + //client.IsRemoteLoginNotice = string.IsNullOrEmpty(isRemoteLoginNotice) ? 0 : int.Parse(isRemoteLoginNotice); + //client.IsMobileCaptcha = string.IsNullOrEmpty(isMobileCaptcha) ? 0 : int.Parse(isMobileCaptcha); + //client.IsHideMobile = string.IsNullOrEmpty(isHideMobile) ? 0 : int.Parse(isHideMobile); + //client.IsDisplayStatus = string.IsNullOrEmpty(isDisplayStatus) ? 0 : int.Parse(isDisplayStatus); + //client.IsLoginIpRestrict = string.IsNullOrEmpty(isLoginIpRestrict) ? 0 : int.Parse(isLoginIpRestrict); + //client.IsLoginIpAllowGather = isLoginIpAllowGather; + //client.IsLoginCityRestrict = string.IsNullOrEmpty(isLoginCityRestrict) ? 0 : int.Parse(isLoginCityRestrict); + //client.IsLoginCityAllowGather = isLoginCityAllowGather; _Dao.Update(client); @@ -553,6 +517,8 @@ ///鍒涘缓鏂板鎴� private JsonPageResult Save(PageContext<Model.SysUser> context) { + + //娴嬭瘯 string clientID = context.GetString("clientID"); string password = context.GetString("password"); string clientName = context.GetString("clientName"); @@ -594,6 +560,16 @@ if (string.IsNullOrEmpty(clientID)) { throw new ArgumentException("瀹㈡埛璐﹀彿涓嶈兘涓虹┖锛屼笖蹇呴』涓哄叕鍙稿悕绉帮紒"); + } + + if (address.Length >= 150) + { + throw new ArgumentException("鍦板潃闀垮害瓒呭嚭闄愬埗锛�"); + } + + if (string.IsNullOrEmpty(company)) + { + throw new AggregateException("鍏徃鍚嶇О涓嶈兘涓虹┖锛屼笖蹇呴』鏄叏绉�"); } if (string.IsNullOrEmpty(password) || !System.Text.RegularExpressions.Regex.IsMatch(password, @"[a-zA-Z0-9]{4,10}")) @@ -710,7 +686,7 @@ client.Telephone = telephone; client.Agent = agent; client.PermissionData = permissionData; - client.ParentId = context.OperatorID; + client.Client_Parentid = context.OperatorID; client.Certification_Status = 1; client.Company = company; client.CustomerManager = customerManager; -- Gitblit v1.9.1