2022-06-16 15:55:18 +08:00
|
|
|
package api
|
|
|
|
|
|
|
|
|
|
import (
|
2022-09-09 18:26:08 +08:00
|
|
|
"mayfly-go/internal/db/application"
|
|
|
|
|
"mayfly-go/internal/db/domain/entity"
|
2022-06-16 15:55:18 +08:00
|
|
|
"mayfly-go/pkg/ginx"
|
2023-01-14 16:29:52 +08:00
|
|
|
"mayfly-go/pkg/req"
|
2022-06-16 15:55:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type DbSqlExec struct {
|
|
|
|
|
DbSqlExecApp application.DbSqlExec
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-14 16:29:52 +08:00
|
|
|
func (d *DbSqlExec) DbSqlExecs(rc *req.Ctx) {
|
2022-06-16 15:55:18 +08:00
|
|
|
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))
|
|
|
|
|
}
|