diff --git a/Services/Hncore.Pass.Vpn/Domain/UserEntity.cs b/Services/Hncore.Pass.Vpn/Domain/UserEntity.cs index 7153738..709bbb0 100644 --- a/Services/Hncore.Pass.Vpn/Domain/UserEntity.cs +++ b/Services/Hncore.Pass.Vpn/Domain/UserEntity.cs @@ -83,6 +83,7 @@ namespace Hncore.Pass.Vpn.Domain public int is_verify { get; set; } public int agent_id {get; set;} public string apikey {get; set;} + public string id_code {get; set;} } } \ No newline at end of file diff --git a/Services/Hncore.Pass.Vpn/Service/AgentClient11Service.cs b/Services/Hncore.Pass.Vpn/Service/AgentClient11Service.cs index a5cd2e1..fe6c320 100644 --- a/Services/Hncore.Pass.Vpn/Service/AgentClient11Service.cs +++ b/Services/Hncore.Pass.Vpn/Service/AgentClient11Service.cs @@ -76,6 +76,13 @@ namespace Hncore.Pass.Vpn.Service public override async Task NewAccount(string packageKey, string account, string pwd, int connCount = 1, int accountType = 1, int payCount = 1) { + var remark = ""; + if(account.Contains("-")){ + string[] arrStr = account.Split('-'); + account = arrStr[0]; + remark = arrStr[1]; + } + Random rd = new Random(Guid.NewGuid().GetHashCode()); int i = rd.Next(); @@ -89,7 +96,7 @@ namespace Hncore.Pass.Vpn.Service var userid = "zhanghao"; - var url = "/api/raduserCreate?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&userid="+userid+"&username="+account+"&password="+pwd+"&prdid=8&maxonline="+connCount+"&day="+packageKey; + var url = "/api/raduserCreate?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&userid="+userid+"&username="+account+"&password="+pwd+"&prdid=8&maxonline="+connCount+"&day="+packageKey+"&remark="+remark; var client = CreateHttpClient(); diff --git a/Services/Hncore.Pass.Vpn/Service/AgentClient13Service.cs b/Services/Hncore.Pass.Vpn/Service/AgentClient13Service.cs index a2226d6..33c31e5 100644 --- a/Services/Hncore.Pass.Vpn/Service/AgentClient13Service.cs +++ b/Services/Hncore.Pass.Vpn/Service/AgentClient13Service.cs @@ -76,6 +76,14 @@ namespace Hncore.Pass.Vpn.Service public override async Task NewAccount(string packageKey, string account, string pwd, int connCount = 1, int accountType = 1, int payCount = 1) { + var remark = ""; + if(account.Contains("-")){ + string[] arrStr = account.Split('-'); + account = arrStr[0]; + remark = arrStr[1]; + } + + Random rd = new Random(Guid.NewGuid().GetHashCode()); int i = rd.Next(); @@ -89,7 +97,7 @@ namespace Hncore.Pass.Vpn.Service var userid = "kh"; - var url = "/api/raduserCreate?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&userid="+userid+"&username="+account+"&password="+pwd+"&prdid=8&maxonline="+connCount+"&day="+packageKey; + var url = "/api/raduserCreate?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&userid="+userid+"&username="+account+"&password="+pwd+"&prdid=8&maxonline="+connCount+"&day="+packageKey+"&remark="+remark; var client = CreateHttpClient(); diff --git a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs index c63d156..e16cbdb 100644 --- a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs +++ b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs @@ -603,6 +603,14 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel, var accounts = order.Accounts.Split(',').ToList(); accounts = accounts.Distinct().ToList(); + var userEntity = await m_UserService.GetById(order.UserId); + var user_remark = ""; + + if(order.ProductId == 8) { + //用户信息 + user_remark = "姓名:"+userEntity.Name.Substring(0,1) + "**,手机号:" + userEntity.Phone.Substring(0,3) + "***,身份证号:" + userEntity.id_code.Substring(0,3) + "***,注:因用户信息属于敏感隐私信息,所以部分隐藏展示,如有需要可联系我司调取!"; + + } if (order.OrderType == OrderType.New || order.OrderType == OrderType.News) { @@ -656,6 +664,9 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel, var ret = new ApiResult(); if(accountEntity.PackageId.Value == 86 || accountEntity.PackageId.Value == 88){ ret = await m_AgentService.NewAccount(order.Id, accountEntity.PackageId.Value, accountEntity.Account, accountEntity.Pwd, accountEntity.ConnectCount,1,2); + } else if(accountEntity.ProductId.Value == 8 || accountEntity.ProductId.Value == 7){ + var account_remark = accountEntity.Account + "-" + user_remark; + ret = await m_AgentService.NewAccount(order.Id, accountEntity.PackageId.Value, accountEntity.Account, accountEntity.Pwd, accountEntity.ConnectCount,1,2); } else { ret = await m_AgentService.NewAccount(order.Id, accountEntity.PackageId.Value, accountEntity.Account, accountEntity.Pwd, accountEntity.ConnectCount); } @@ -780,8 +791,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel, } } - var userEntity = await m_UserService.GetById(order.UserId); - + if(order.agent_id != 0 && order.PaymentAmount != 0.1M){ var agentEntity = await m_AgentUserService.Query(m => m.id == order.agent_id).FirstOrDefaultAsync();