diff --git a/ZR.Admin.WebApi/Controllers/System/monitor/SysOperlogController.cs b/ZR.Admin.WebApi/Controllers/System/monitor/SysOperlogController.cs index abefe0f..7848ffa 100644 --- a/ZR.Admin.WebApi/Controllers/System/monitor/SysOperlogController.cs +++ b/ZR.Admin.WebApi/Controllers/System/monitor/SysOperlogController.cs @@ -42,7 +42,7 @@ namespace ZR.Admin.WebApi.Controllers.monitor var list = sysOperLogService.SelectOperLogList(sysOperLog, pagerInfo); - return ToResponse(ToJson(list.TotalNum, list), TIME_FORMAT_FULL_2); + return ToResponse(ToJson(list.TotalNum, list), "MM/dd HH:mm"); } /// diff --git a/ZR.Model/System/SysOperLog.cs b/ZR.Model/System/SysOperLog.cs index 7e5a690..bdaa098 100644 --- a/ZR.Model/System/SysOperLog.cs +++ b/ZR.Model/System/SysOperLog.cs @@ -69,16 +69,16 @@ namespace ZR.Model.System //@Excel(name = "状态", readConverterExp = "0=正常,1=异常") public int status { get; set; } - /** 错误消息 */ - //@Excel(name = "错误消息") + /// + /// 错误消息 + /// + [EpplusTableColumn(Header = "错误消息")] public string errorMsg { get; set; } - /** 操作时间 */ - //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - //@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - //[DataType] - [JsonConverter(typeof(JsonDateConverter))] - [EpplusTableColumn(NumberFormat = "yyyy-MM-dd HH:mm:ss")] + /// + /// 操作时间 + /// + [EpplusTableColumn(Header = "操作时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] public DateTime? operTime { get; set; } /// /// 操作用时 diff --git a/ZR.Service/System/SysOperLogService.cs b/ZR.Service/System/SysOperLogService.cs index 7af4626..63c76ba 100644 --- a/ZR.Service/System/SysOperLogService.cs +++ b/ZR.Service/System/SysOperLogService.cs @@ -43,6 +43,11 @@ namespace ZR.Service.System operLog.BeginTime = DateTimeHelper.GetBeginTime(operLog.BeginTime, -1); operLog.EndTime = DateTimeHelper.GetBeginTime(operLog.EndTime, 1); + bool isDemoMode = AppSettings.GetAppConfig("DemoMode", false); + if (isDemoMode) + { + return new PagedInfo(); + } var list = sysOperLogRepository.GetSysOperLog(operLog, pager); return list;