mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
【更新】更新restful
This commit is contained in:
@@ -1,28 +1,25 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/XM-GO/PandaKit/restfulx"
|
||||
"github.com/gin-gonic/gin"
|
||||
"pandax/apps/develop/api"
|
||||
"pandax/apps/develop/services"
|
||||
"github.com/emicklei/go-restful/v3"
|
||||
)
|
||||
|
||||
func InitGenRouter(router *gin.RouterGroup) {
|
||||
func InitGenRouter(container *restful.Container) {
|
||||
// 登录日志
|
||||
genApi := &api.GenApi{
|
||||
GenTableApp: services.DevGenTableModelDao,
|
||||
}
|
||||
gen := router.Group("gen")
|
||||
/* genApi := &api.GenApi{
|
||||
GenTableApp: services.DevGenTableModelDao,
|
||||
}
|
||||
gen := router.Group("gen")
|
||||
|
||||
gen.GET("preview/:tableId", func(c *gin.Context) {
|
||||
restfulx.NewReqCtx(c).WithLog("获取生成代码视图").Handle(genApi.Preview)
|
||||
})
|
||||
gen.GET("preview/:tableId", func(c *gin.Context) {
|
||||
restfulx.NewReqCtx(c).WithLog("获取生成代码视图").Handle(genApi.Preview)
|
||||
})
|
||||
|
||||
gen.GET("code/:tableId", func(c *gin.Context) {
|
||||
restfulx.NewReqCtx(c).WithLog("生成代码").Handle(genApi.GenCode)
|
||||
})
|
||||
gen.GET("code/:tableId", func(c *gin.Context) {
|
||||
restfulx.NewReqCtx(c).WithLog("生成代码").Handle(genApi.GenCode)
|
||||
})
|
||||
|
||||
gen.GET("configure/:tableId", func(c *gin.Context) {
|
||||
restfulx.NewReqCtx(c).WithLog("生成配置").Handle(genApi.GenConfigure)
|
||||
})
|
||||
gen.GET("configure/:tableId", func(c *gin.Context) {
|
||||
restfulx.NewReqCtx(c).WithLog("生成配置").Handle(genApi.GenConfigure)
|
||||
})*/
|
||||
}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/XM-GO/PandaKit/restfulx"
|
||||
"github.com/gin-gonic/gin"
|
||||
"pandax/apps/develop/api"
|
||||
"pandax/apps/develop/services"
|
||||
"github.com/emicklei/go-restful/v3"
|
||||
)
|
||||
|
||||
func InitGenTableRouter(router *gin.RouterGroup) {
|
||||
func InitGenTableRouter(container *restful.Container) {
|
||||
// 登录日志
|
||||
genApi := &api.GenTableApi{
|
||||
/*genApi := &api.GenTableApi{
|
||||
GenTableApp: services.DevGenTableModelDao,
|
||||
}
|
||||
gen := router.Group("table")
|
||||
@@ -44,5 +41,5 @@ func InitGenTableRouter(router *gin.RouterGroup) {
|
||||
|
||||
gen.DELETE(":tableId", func(c *gin.Context) {
|
||||
restfulx.NewReqCtx(c).WithLog("删除表").Handle(genApi.Delete)
|
||||
})
|
||||
})*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user