【更新】更新

This commit is contained in:
PandaGoAdmin
2022-08-02 17:19:14 +08:00
parent 791a23306c
commit 0555922a90
50 changed files with 678 additions and 450 deletions

View File

@@ -4,7 +4,7 @@ import (
"github.com/gin-gonic/gin"
"pandax/apps/develop/api"
"pandax/apps/develop/services"
"pandax/base/ctx"
"pandax/base/ginx"
)
func InitGenRouter(router *gin.RouterGroup) {
@@ -14,18 +14,15 @@ func InitGenRouter(router *gin.RouterGroup) {
}
gen := router.Group("gen")
genViewLog := ctx.NewLogInfo("获取生成代码视图")
gen.GET("preview/:tableId", func(c *gin.Context) {
ctx.NewReqCtxWithGin(c).WithLog(genViewLog).Handle(genApi.Preview)
ginx.NewReqCtx(c).WithLog("获取生成代码视图").Handle(genApi.Preview)
})
genCodeLog := ctx.NewLogInfo("生成代码")
gen.GET("code/:tableId", func(c *gin.Context) {
ctx.NewReqCtxWithGin(c).WithLog(genCodeLog).Handle(genApi.GenCode)
ginx.NewReqCtx(c).WithLog("生成代码").Handle(genApi.GenCode)
})
genConfigureLog := ctx.NewLogInfo("生成配置")
gen.GET("configure/:tableId", func(c *gin.Context) {
ctx.NewReqCtxWithGin(c).WithLog(genConfigureLog).Handle(genApi.GenConfigure)
ginx.NewReqCtx(c).WithLog("生成配置").Handle(genApi.GenConfigure)
})
}