From 9cb2a470fb24b8f7e60a3bb45577b872207da9b8 Mon Sep 17 00:00:00 2001 From: QM303176530 <303176530@qq.com> Date: Sun, 23 Aug 2020 15:27:00 +0800 Subject: [PATCH] =?UTF-8?q?gormv2=E5=8D=87=E7=BA=A7=20=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E9=98=B6=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/middleware/operation.go | 2 +- server/model/sys_operation_record.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/middleware/operation.go b/server/middleware/operation.go index 9af28825..520d579d 100644 --- a/server/middleware/operation.go +++ b/server/middleware/operation.go @@ -34,7 +34,7 @@ func OperationRecord() gin.HandlerFunc { Path: c.Request.URL.Path, Agent: c.Request.UserAgent(), Body: string(body), - UserId: userId, + UserID: userId, } writer := responseBodyWriter{ ResponseWriter: c.Writer, diff --git a/server/model/sys_operation_record.go b/server/model/sys_operation_record.go index 314d4ccf..ab695630 100644 --- a/server/model/sys_operation_record.go +++ b/server/model/sys_operation_record.go @@ -18,6 +18,6 @@ type SysOperationRecord struct { ErrorMessage string `json:"error_message" form:"error_message" gorm:"column:error_message;comment:''"` Body string `json:"body" form:"body" gorm:"column:body;comment:'请求Body'"` Resp string `json:"resp" form:"resp" gorm:"column:resp;comment:'响应Body'"` - UserId int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:''"` + UserID int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:''"` User SysUser `json:"user"` }