增加功能:系统日志数据默认只提取一周内的数据

This commit is contained in:
Argo-MacBookPro 2018-09-09 14:16:38 +08:00
parent 1d8b3ea9a7
commit 354ae823e6
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ namespace Bootstrap.DataAccess
{
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>();
DbCommand cmd = DBAccessManager.SqlDBAccess.CreateCommand(CommandType.Text, sql);
using (DbDataReader reader = DBAccessManager.SqlDBAccess.ExecuteReader(cmd))