增加功能:系统日志数据默认只提取一周内的数据
This commit is contained in:
parent
1d8b3ea9a7
commit
354ae823e6
|
@ -20,7 +20,7 @@ namespace Bootstrap.DataAccess
|
||||||
{
|
{
|
||||||
var ret = CacheManager.GetOrAdd(RetrieveLogsDataKey, key =>
|
var ret = CacheManager.GetOrAdd(RetrieveLogsDataKey, key =>
|
||||||
{
|
{
|
||||||
string sql = "select top 1000 * from Logs";
|
string sql = "select * from Logs where DATEDIFF(Week, LogTime, GETDATE()) = 0";
|
||||||
List<Log> logs = new List<Log>();
|
List<Log> logs = new List<Log>();
|
||||||
DbCommand cmd = DBAccessManager.SqlDBAccess.CreateCommand(CommandType.Text, sql);
|
DbCommand cmd = DBAccessManager.SqlDBAccess.CreateCommand(CommandType.Text, sql);
|
||||||
using (DbDataReader reader = DBAccessManager.SqlDBAccess.ExecuteReader(cmd))
|
using (DbDataReader reader = DBAccessManager.SqlDBAccess.ExecuteReader(cmd))
|
||||||
|
|
Loading…
Reference in New Issue