【更新】更新

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

@@ -3,7 +3,6 @@ package api
import (
"pandax/apps/develop/gen"
"pandax/apps/develop/services"
"pandax/base/ctx"
"pandax/base/ginx"
)
@@ -18,7 +17,7 @@ type GenApi struct {
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /develop/code/gen/preview/{tableId} [get]
// @Security X-TOKEN
func (e *GenApi) Preview(rc *ctx.ReqCtx) {
func (e *GenApi) Preview(rc *ginx.ReqCtx) {
tableId := ginx.PathParamInt(rc.GinCtx, "tableId")
rc.ResData = gen.Preview(int64(tableId))
}
@@ -30,7 +29,7 @@ func (e *GenApi) Preview(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /develop/code/gen/code/{tableId} [get]
// @Security X-TOKEN
func (e *GenApi) GenCode(rc *ctx.ReqCtx) {
func (e *GenApi) GenCode(rc *ginx.ReqCtx) {
tableId := ginx.PathParamInt(rc.GinCtx, "tableId")
gen.GenCode(int64(tableId))
}
@@ -42,7 +41,7 @@ func (e *GenApi) GenCode(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /develop/code/gen/configure/{tableId} [get]
// @Security X-TOKEN
func (e *GenApi) GenConfigure(rc *ctx.ReqCtx) {
func (e *GenApi) GenConfigure(rc *ginx.ReqCtx) {
tableId := ginx.PathParamInt(rc.GinCtx, "tableId")
menuId := ginx.QueryInt(rc.GinCtx, "menuId", 0)
gen.GenConfigure(tableId, menuId)