【log】日志优化查询只查询特定字段

pull/3/head
fengshuonan 2021-01-14 19:44:07 +08:00
parent 26c72f61fd
commit 0c0063589a
1 changed files with 14 additions and 0 deletions

View File

@ -151,6 +151,20 @@ public class DbLogManagerServiceImpl implements LogManagerApi {
});
}
// 查询特定字段
sysLogLambdaQueryWrapper.select(
SysLog::getLogId,
SysLog::getLogName,
SysLog::getLogContent,
SysLog::getAppName,
SysLog::getRequestUrl,
SysLog::getServerIp,
SysLog::getClientIp,
SysLog::getUserId,
SysLog::getHttpMethod,
SysLog::getClientBrowser,
SysLog::getClientOs);
// 根据时间倒序排序
sysLogLambdaQueryWrapper.orderByDesc(SysLog::getCreateTime);
}