diff --git a/Src/Dlhis.Common/ApiLog/Services/ApiLogService.cs b/Src/Dlhis.Common/ApiLog/Services/ApiLogService.cs index e9d9cc66..7fab2de1 100644 --- a/Src/Dlhis.Common/ApiLog/Services/ApiLogService.cs +++ b/Src/Dlhis.Common/ApiLog/Services/ApiLogService.cs @@ -20,7 +20,7 @@ namespace Dlhis.Common.ApiLog.Services } public async Task> GetLogsAsync(ApiLogRequest request) - { + { var logs = await _dbContext.ChangeDb("log").Queryable() .WhereIF(request.Search.IsPresent(), x => x.Message.Contains(request.Search)) .WhereIF(request.Level.HasValue, x => x.Level == request.Level) diff --git a/Src/Dlhis.Entity/Common/ApiLogEntity.cs b/Src/Dlhis.Entity/Common/ApiLogEntity.cs index e2005b72..2f8fd03a 100644 --- a/Src/Dlhis.Entity/Common/ApiLogEntity.cs +++ b/Src/Dlhis.Entity/Common/ApiLogEntity.cs @@ -9,7 +9,7 @@ namespace Dlhis.Entity.Common; /// api日志表 /// [SugarTable(TableName = "Logs", TableDescription = "api日志表")] -public class ApiLogEntity +public class ApiLogEntity : SugarBaseEntity { /// /// 时间