mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 20:35:16 +00:00
update:
- pgsql 获取表名, 获取表字段(todo), 获取数据库名 refactor: - 自动化代码与自动化代码历史 代码规范化 - mysql 获取表名, 获取表字段, 获取数据库名 - enter 代码优化
This commit is contained in:
@@ -2,16 +2,16 @@ package system
|
||||
|
||||
type RouterGroup struct {
|
||||
ApiRouter
|
||||
AuthorityRouter
|
||||
AutoCodeRouter
|
||||
BaseRouter
|
||||
CasbinRouter
|
||||
DictionaryRouter
|
||||
DictionaryDetailRouter
|
||||
InitRouter
|
||||
JwtRouter
|
||||
MenuRouter
|
||||
OperationRecordRouter
|
||||
SysRouter
|
||||
BaseRouter
|
||||
InitRouter
|
||||
MenuRouter
|
||||
UserRouter
|
||||
CasbinRouter
|
||||
AutoCodeRouter
|
||||
AuthorityRouter
|
||||
DictionaryRouter
|
||||
OperationRecordRouter
|
||||
DictionaryDetailRouter
|
||||
}
|
||||
|
||||
@@ -5,21 +5,16 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type AutoCodeRouter struct {
|
||||
}
|
||||
type AutoCodeRouter struct{}
|
||||
|
||||
func (s *AutoCodeRouter) InitAutoCodeRouter(Router *gin.RouterGroup) {
|
||||
autoCodeRouter := Router.Group("autoCode")
|
||||
var authorityApi = v1.ApiGroupApp.SystemApiGroup.AutoCodeApi
|
||||
autoCodeApi := v1.ApiGroupApp.SystemApiGroup.AutoCodeApi
|
||||
{
|
||||
autoCodeRouter.POST("delSysHistory", authorityApi.DelSysHistory) // 删除回滚记录
|
||||
autoCodeRouter.POST("getMeta", authorityApi.GetMeta) // 根据id获取meta信息
|
||||
autoCodeRouter.POST("getSysHistory", authorityApi.GetSysHistory) // 获取回滚记录分页
|
||||
autoCodeRouter.POST("rollback", authorityApi.RollBack) // 回滚
|
||||
autoCodeRouter.POST("preview", authorityApi.PreviewTemp) // 获取自动创建代码预览
|
||||
autoCodeRouter.POST("createTemp", authorityApi.CreateTemp) // 创建自动化代码
|
||||
autoCodeRouter.GET("getTables", authorityApi.GetTables) // 获取对应数据库的表
|
||||
autoCodeRouter.GET("getDB", authorityApi.GetDB) // 获取数据库
|
||||
autoCodeRouter.GET("getColumn", authorityApi.GetColumn) // 获取指定表所有字段信息
|
||||
autoCodeRouter.GET("getDB", autoCodeApi.GetDB) // 获取数据库
|
||||
autoCodeRouter.GET("getTables", autoCodeApi.GetTables) // 获取对应数据库的表
|
||||
autoCodeRouter.GET("getColumn", autoCodeApi.GetColumn) // 获取指定表所有字段信息
|
||||
autoCodeRouter.POST("preview", autoCodeApi.PreviewTemp) // 获取自动创建代码预览
|
||||
autoCodeRouter.POST("createTemp", autoCodeApi.CreateTemp) // 创建自动化代码
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type AutoCodeHistoryRouter struct{}
|
||||
|
||||
func (s *AutoCodeRouter) InitAutoCodeHistoryRouter(Router *gin.RouterGroup) {
|
||||
autoCodeHistoryRouter := Router.Group("autoCode")
|
||||
autoCodeHistoryApi := v1.ApiGroupApp.SystemApiGroup.AutoCodeHistoryApi
|
||||
{
|
||||
autoCodeHistoryRouter.POST("getMeta", autoCodeHistoryApi.First) // 根据id获取meta信息
|
||||
autoCodeHistoryRouter.POST("rollback", autoCodeHistoryApi.RollBack) // 回滚
|
||||
autoCodeHistoryRouter.POST("delSysHistory", autoCodeHistoryApi.Delete) // 删除回滚记录
|
||||
autoCodeHistoryRouter.POST("getSysHistory", autoCodeHistoryApi.GetList) // 获取回滚记录分页
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user