From 8c474aa450a5e2c4d7274422ba42286543c032c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Wed, 2 Mar 2022 21:18:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=E4=B8=9A=E5=8A=A1=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../System/monitor/SysOperlogController.cs | 2 +- ZR.Model/System/SysOperLog.cs | 16 ++++++++-------- ZR.Service/System/SysOperLogService.cs | 5 +++++ 3 files changed, 14 insertions(+), 9 deletions(-) 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;