You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
2.0 KiB
54 lines
2.0 KiB
4 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
|
||
|
namespace QMAPP.ServicesAgent.LoginService
|
||
|
{
|
||
|
public partial class LoginServiceClient
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 登录验证,主登录服务+备用模式
|
||
|
/// 主登录服务无法正常工作时采用备用登录服务
|
||
|
/// </summary>
|
||
|
/// <param name="login"></param>
|
||
|
/// <param name="credential"></param>
|
||
|
/// <returns></returns>
|
||
|
public static LoginInfo _IsLogin(LoginInfo login, QMFrameWork.ServiceInterface.CredentialInfo credential)
|
||
|
{
|
||
|
|
||
|
try
|
||
|
{
|
||
|
var mainclient = new LoginServiceClient("BasicHttpBinding_ILoginService_Platform"); //先调用平台登录服务
|
||
|
return mainclient.IsLogin(login, credential);
|
||
|
}
|
||
|
catch (Exception ex) //平台登录服务无法登录
|
||
|
{
|
||
|
var backupclient = new LoginServiceClient("BasicHttpBinding_ILoginService");//调用子系统登录服务
|
||
|
return backupclient.IsLogin(login, credential);
|
||
|
}
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 登录验证,主登录服务+备用模式
|
||
|
/// 主登录服务无法正常工作时采用备用登录服务
|
||
|
/// </summary>
|
||
|
/// <param name="login"></param>
|
||
|
/// <param name="credential"></param>
|
||
|
/// <returns></returns>
|
||
|
public static LoginInfo _GetLoginInfo(QMFrameWork.ServiceInterface.CredentialInfo credential)
|
||
|
{
|
||
|
|
||
|
try
|
||
|
{
|
||
|
var mainclient = new LoginServiceClient("BasicHttpBinding_ILoginService_Platform"); //先调用平台登录服务
|
||
|
return mainclient.GetLoginInfo(credential);
|
||
|
}
|
||
|
catch (Exception ex) //平台登录服务无法登录
|
||
|
{
|
||
|
var backupclient = new LoginServiceClient("BasicHttpBinding_ILoginService");//调用子系统登录服务
|
||
|
return backupclient.GetLoginInfo(credential);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|