2019-03-16 20:24:33 +08:00
|
|
|
|
using Bootstrap.DataAccess;
|
|
|
|
|
using Longbow.Web.Mvc;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin.Query
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Query trace options.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class QueryTraceOptions : PaginationOption
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime? OperateTimeStart { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime? OperateTimeEnd { get; set; }
|
|
|
|
|
|
2019-05-04 17:13:29 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 请求IP地址
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string AccessIP { get; set; }
|
|
|
|
|
|
2019-03-16 20:24:33 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public QueryData<Trace> RetrieveData()
|
|
|
|
|
{
|
2019-05-04 17:13:29 +08:00
|
|
|
|
var data = TraceHelper.Retrieves(this, OperateTimeStart, OperateTimeEnd, AccessIP);
|
2019-03-16 20:24:33 +08:00
|
|
|
|
|
|
|
|
|
var ret = new QueryData<Trace>();
|
|
|
|
|
ret.total = data.TotalItems;
|
|
|
|
|
ret.rows = data.Items;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|