mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 16:00:25 +08:00
feat: 新增数据库sql执行记录&执行前原值等信息
This commit is contained in:
23
server/internal/devops/api/db_sql_exec.go
Normal file
23
server/internal/devops/api/db_sql_exec.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/devops/application"
|
||||
"mayfly-go/internal/devops/domain/entity"
|
||||
"mayfly-go/pkg/ctx"
|
||||
"mayfly-go/pkg/ginx"
|
||||
)
|
||||
|
||||
type DbSqlExec struct {
|
||||
DbSqlExecApp application.DbSqlExec
|
||||
}
|
||||
|
||||
func (d *DbSqlExec) DbSqlExecs(rc *ctx.ReqCtx) {
|
||||
g := rc.GinCtx
|
||||
m := &entity.DbSqlExec{DbId: uint64(ginx.QueryInt(g, "dbId", 0)),
|
||||
Db: g.Query("db"),
|
||||
Table: g.Query("table"),
|
||||
Type: int8(ginx.QueryInt(g, "type", 0)),
|
||||
}
|
||||
m.CreatorId = rc.LoginAccount.Id
|
||||
rc.ResData = d.DbSqlExecApp.GetPageList(m, ginx.GetPageParam(rc.GinCtx), new([]entity.DbSqlExec))
|
||||
}
|
||||
Reference in New Issue
Block a user