mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-16 22:30:26 +08:00
feat: 新增简易版ioc
This commit is contained in:
@@ -2,7 +2,8 @@ package router
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/db/api"
|
||||
"mayfly-go/internal/db/application"
|
||||
"mayfly-go/pkg/biz"
|
||||
"mayfly-go/pkg/ioc"
|
||||
"mayfly-go/pkg/req"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -11,9 +12,8 @@ import (
|
||||
func InitDbSqlExecRouter(router *gin.RouterGroup) {
|
||||
db := router.Group("/dbs/:dbId/sql-execs")
|
||||
|
||||
d := &api.DbSqlExec{
|
||||
DbSqlExecApp: application.GetDbSqlExecApp(),
|
||||
}
|
||||
d := new(api.DbSqlExec)
|
||||
biz.ErrIsNil(ioc.Inject(d))
|
||||
|
||||
// 获取所有数据库sql执行记录列表
|
||||
req.NewGet("", d.DbSqlExecs).Group(db)
|
||||
|
||||
Reference in New Issue
Block a user