mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			475 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			475 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package router
 | 
						|
 | 
						|
import (
 | 
						|
	"mayfly-go/internal/devops/api"
 | 
						|
	"mayfly-go/internal/devops/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.DbSqlExecApp,
 | 
						|
		}
 | 
						|
		// 获取所有数据库sql执行记录列表
 | 
						|
		db.GET("", func(c *gin.Context) {
 | 
						|
			rc := ctx.NewReqCtxWithGin(c)
 | 
						|
			rc.Handle(d.DbSqlExecs)
 | 
						|
		})
 | 
						|
	}
 | 
						|
}
 |