refactor: 后端路由定义方式&请求参数绑定重构

This commit is contained in:
meilin.huang
2023-07-08 20:05:55 +08:00
parent 183a6e4905
commit 3269dfa5d6
59 changed files with 559 additions and 1020 deletions

View File

@@ -10,14 +10,12 @@ import (
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 := req.NewCtxWithGin(c)
rc.Handle(d.DbSqlExecs)
})
d := &api.DbSqlExec{
DbSqlExecApp: application.GetDbSqlExecApp(),
}
// 获取所有数据库sql执行记录列表
req.NewGet("", d.DbSqlExecs).Group(db)
}