账户信息中新增上次登录方式
This commit is contained in:
@@ -82,7 +82,7 @@ namespace CommonLibrary
|
|||||||
/// <param name="code">需要验证的密码</param>
|
/// <param name="code">需要验证的密码</param>
|
||||||
/// <param name="ipAddress">登录的ip地址</param>
|
/// <param name="ipAddress">登录的ip地址</param>
|
||||||
/// <returns>验证的结果对象</returns>
|
/// <returns>验证的结果对象</returns>
|
||||||
public T CheckAccount(string name, string code, string ipAddress)
|
public T CheckAccount(string name, string code, string ipAddress, string way)
|
||||||
{
|
{
|
||||||
T result = new T()
|
T result = new T()
|
||||||
{
|
{
|
||||||
@@ -111,6 +111,7 @@ namespace CommonLibrary
|
|||||||
//下面两个数据应该是旧的数据
|
//下面两个数据应该是旧的数据
|
||||||
item.LastLoginIpAddress = ipAddress;
|
item.LastLoginIpAddress = ipAddress;
|
||||||
item.LastLoginTime = DateTime.Now;
|
item.LastLoginTime = DateTime.Now;
|
||||||
|
item.LastLoginWay = way;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,9 +178,9 @@ namespace CommonLibrary
|
|||||||
/// <param name="code">登录的密码</param>
|
/// <param name="code">登录的密码</param>
|
||||||
/// <param name="ipAddress">检查的客户端的登录的ip地址</param>
|
/// <param name="ipAddress">检查的客户端的登录的ip地址</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string CheckAccountJson(string name, string code, string ipAddress)
|
public string CheckAccountJson(string name, string code, string ipAddress, string way)
|
||||||
{
|
{
|
||||||
T result = CheckAccount(name, code, ipAddress);
|
T result = CheckAccount(name, code, ipAddress, way);
|
||||||
return JObject.FromObject(result).ToString();
|
return JObject.FromObject(result).ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,7 +210,7 @@ namespace CommonLibrary
|
|||||||
{
|
{
|
||||||
all_list_accounts = JArray.Parse(json).ToObject<List<T>>();
|
all_list_accounts = JArray.Parse(json).ToObject<List<T>>();
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper?.SaveError(Resource.StringResouce.AccountLoadFailed, ex);
|
LogHelper?.SaveError(Resource.StringResouce.AccountLoadFailed, ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,10 @@ namespace CommonLibrary
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int LoginFailedCount { get; set; } = 0;
|
public int LoginFailedCount { get; set; } = 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 上次登录系统的方式,有winform版,wpf版,web版
|
||||||
|
/// </summary>
|
||||||
|
public string LastLoginWay { get; set; } = string.Empty;
|
||||||
|
/// <summary>
|
||||||
/// 用于存储和传送的名称
|
/// 用于存储和传送的名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string UserNameText { get { return "UserName"; } }
|
public static string UserNameText { get { return "UserName"; } }
|
||||||
|
|||||||
Reference in New Issue
Block a user