mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-10 18:00:28 +08:00
refactor: 代码结构调整
This commit is contained in:
23
server/internal/db/router/db_sql_exec.go
Normal file
23
server/internal/db/router/db_sql_exec.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/db/api"
|
||||
"mayfly-go/internal/db/application"
|
||||
"mayfly-go/pkg/ctx"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func InitDbSqlExecRouter(router *gin.RouterGroup) {
|
||||
db := router.Group("/dbs/:dbId/sql-execs")
|
||||
{
|
||||
d := &api.DbSqlExec{
|
||||
DbSqlExecApp: application.GetDbSqlExecApp(),
|
||||
}
|
||||
// 获取所有数据库sql执行记录列表
|
||||
db.GET("", func(c *gin.Context) {
|
||||
rc := ctx.NewReqCtxWithGin(c)
|
||||
rc.Handle(d.DbSqlExecs)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user