This commit is contained in:
“wanyongkang”
2021-08-05 14:25:17 +08:00
parent 475d0c9c2f
commit d8743ad632
4 changed files with 106 additions and 111 deletions

View File

@@ -137,7 +137,7 @@ namespace Hncore.Pass.Vpn.Service
var agent = GetAgent(product);
agent.Init(product.BaseUrl, product.Token);
var account = item.Account;
if (product.GroupNO == "g7") account = item.Raw;
// if (product.GroupNO == "g7") account = item.Raw;
var ret = await agent.GetAccountInfo(account);
if (ret.Code == ResultCode.C_SUCCESS)
retList.Add(ret.Data as OriginAccountModel);
@@ -150,12 +150,12 @@ namespace Hncore.Pass.Vpn.Service
var product = await m_ProductService.GetById(productId);
var agent = GetAgent(product);
agent.Init(product.BaseUrl, product.Token);
if (product.GroupNO == "g7")
{
var accountInfo = await GetProductAccount(productId, account);
if (accountInfo != null && accountInfo.Raw.Has())
account = accountInfo.Raw;
}
// if (product.GroupNO == "g7")
// {
// var accountInfo = await GetProductAccount(productId, account);
// if (accountInfo != null && accountInfo.Raw.Has())
// account = accountInfo.Raw;
// }
var ret = await agent.GetAccountInfo(account);
if (ret.Code != ResultCode.C_SUCCESS && product.Id!=17&& product.Id!=13) return new ApiResult<OriginAccountModel>(ResultCode.C_NOT_EXISTS_ERROR, "账号不存在");
if (pwd.Has()&&ret.Data.Pwd != pwd && product.Id!=17&& product.Id!=13)
@@ -172,12 +172,12 @@ namespace Hncore.Pass.Vpn.Service
foreach (var item in accounts)
{
var account = item;
if (product.GroupNO == "g7")
{
var accountInfo = await GetProductAccount(productId, item);
if (accountInfo != null && accountInfo.Raw.Has())
account = accountInfo.Raw;
}
// if (product.GroupNO == "g7")
// {
// var accountInfo = await GetProductAccount(productId, item);
// if (accountInfo != null && accountInfo.Raw.Has())
// account = accountInfo.Raw;
// }
var ret = await agent.GetAccountInfo(account);
if (ret.Code == ResultCode.C_SUCCESS)
{
@@ -256,12 +256,12 @@ namespace Hncore.Pass.Vpn.Service
{
var package = await m_ProductPackageService.GetById(packageId);
var product = await m_ProductService.GetById(package.ProductId);
if (product.GroupNO == "g7")
{
var accountInfo = await GetProductAccount(package.ProductId, account);
if (accountInfo != null && accountInfo.Raw.Has())
account = accountInfo.Raw;
}
// if (product.GroupNO == "g7")
// {
// var accountInfo = await GetProductAccount(package.ProductId, account);
// if (accountInfo != null && accountInfo.Raw.Has())
// account = accountInfo.Raw;
// }
var agent = GetAgent(product);
agent.Init(product.BaseUrl, product.Token);
ApiResult flagResult = new ApiResult(ResultCode.C_SUCCESS);
@@ -312,12 +312,12 @@ namespace Hncore.Pass.Vpn.Service
var product = await m_ProductService.GetById(productId);
var agent = GetAgent(product);
agent.Init(product.BaseUrl, product.Token);
if (product.GroupNO == "g7")
{
var accountInfo = await GetProductAccount(productId, account);
if (accountInfo != null && accountInfo.Raw.Has())
agent.Raw = accountInfo.Raw;
}
// if (product.GroupNO == "g7")
// {
// var accountInfo = await GetProductAccount(productId, account);
// if (accountInfo != null && accountInfo.Raw.Has())
// agent.Raw = accountInfo.Raw;
// }
return await agent.UpdateAccountPwd(account, pwd);
}
/// <summary>
@@ -332,11 +332,11 @@ namespace Hncore.Pass.Vpn.Service
var agent = GetAgent(product);
agent.Init(product.BaseUrl, product.Token);
var account = accountInfo.Account;
if (product.GroupNO == "g7")
{
if (accountInfo != null && accountInfo.Raw.Has())
account = accountInfo.Raw;
}
// if (product.GroupNO == "g7")
// {
// if (accountInfo != null && accountInfo.Raw.Has())
// account = accountInfo.Raw;
// }
var flag = await agent.Refund(account, package.OriginKey, accountInfo.RestDay);
return flag;
}