diff --git a/logger/wrapper/gorm_v2.go b/logger/wrapper/gorm_v2.go index 9faae75..5b9214a 100644 --- a/logger/wrapper/gorm_v2.go +++ b/logger/wrapper/gorm_v2.go @@ -168,7 +168,7 @@ func (g *Gorm) write(dataList []zap.Field, level string) { // 补齐 flag、node sql := g.dbClient.Dialector.Explain(g.dbClient.Statement.SQL.String(), g.dbClient.Statement.Vars...) affectRows := g.dbClient.RowsAffected - dataList = append(dataList, zap.String("db_node", g.node), zap.String("db_flag", g.flag), zap.String("execute_sql", sql), zap.Int64("affext_rows", affectRows)) + dataList = append(dataList, zap.String("db_node", g.node), zap.String("db_flag", g.flag), zap.String("execute_sql", sql), zap.Int64("affect_rows", affectRows)) message := "SQL执行记录" switch strings.ToLower(level) { case "info":