2019-05-17 18:20:48 +08:00
|
|
|
|
using Bootstrap.DataAccess;
|
|
|
|
|
using Longbow.Web.Mvc;
|
2019-05-24 12:27:14 +08:00
|
|
|
|
using System;
|
2019-05-17 18:20:48 +08:00
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin.Query
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 登录日志查询条件
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class QueryLoginOption : PaginationOption
|
|
|
|
|
{
|
2019-05-24 12:27:14 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime? StartTime { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime? EndTime { get; set; }
|
|
|
|
|
|
2019-05-17 18:20:48 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 登录IP地址
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string LoginIP { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public QueryData<LoginUser> RetrieveData()
|
|
|
|
|
{
|
2019-06-19 16:44:36 +08:00
|
|
|
|
if (string.IsNullOrEmpty(Order)) Order = "desc";
|
2019-05-24 12:27:14 +08:00
|
|
|
|
var data = LoginHelper.RetrievePages(this, StartTime, EndTime, LoginIP);
|
2019-05-17 18:20:48 +08:00
|
|
|
|
return new QueryData<LoginUser>
|
|
|
|
|
{
|
|
|
|
|
total = data.TotalItems,
|
|
|
|
|
rows = data.Items
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|