修改BUG:系统日志排序没有起作用,防止数据过大,选取Top 1000数据

This commit is contained in:
Argo-Lenovo 2016-12-09 13:01:06 +08:00
parent f966aa2b9d
commit 4c454e6ffa
2 changed files with 1 additions and 2 deletions

View File

@ -63,7 +63,6 @@ namespace Bootstrap.Admin.Models
default:
break;
}
data = Order == "asc" ? data.OrderBy(t => t.CRUD) : data.OrderByDescending(t => t.CRUD);
ret.rows = data.Skip(Offset).Take(Limit);
return ret;
}

View File

@ -23,7 +23,7 @@ namespace Bootstrap.DataAccess
{
var ret = CacheManager.GetOrAdd(RetrieveLogsDataKey, CacheSection.RetrieveIntervalByKey(RetrieveLogsDataKey), key =>
{
string sql = "select * from Logs";
string sql = "select top 1000 * from Logs";
List<Log> Logs = new List<Log>();
DbCommand cmd = DBAccessManager.SqlDBAccess.CreateCommand(CommandType.Text, sql);
try