Browse Source

gormv2升级 第一阶段

QM303176530 4 years ago
parent
commit
9cb2a470fb
2 changed files with 2 additions and 2 deletions
  1. 1 1
      server/middleware/operation.go
  2. 1 1
      server/model/sys_operation_record.go

+ 1 - 1
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,

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