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"` }