mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 18:20:50 +00:00
feat✨ 更新service
This commit is contained in:
@@ -21,7 +21,7 @@ type Gen struct {
|
||||
apis.Api
|
||||
}
|
||||
|
||||
func (e *Gen) Preview(c *gin.Context) {
|
||||
func (e Gen) Preview(c *gin.Context) {
|
||||
e.Context = c
|
||||
log := e.GetLogger()
|
||||
table := tools.SysTables{}
|
||||
@@ -109,7 +109,7 @@ func (e *Gen) Preview(c *gin.Context) {
|
||||
e.OK(mp, "")
|
||||
}
|
||||
|
||||
func (e *Gen) GenCode(c *gin.Context) {
|
||||
func (e Gen) GenCode(c *gin.Context) {
|
||||
e.Context = c
|
||||
log := e.GetLogger()
|
||||
table := tools.SysTables{}
|
||||
@@ -139,7 +139,7 @@ func (e *Gen) GenCode(c *gin.Context) {
|
||||
e.OK("", "Code generated successfully!")
|
||||
}
|
||||
|
||||
func (e *Gen) GenApiToFile(c *gin.Context) {
|
||||
func (e Gen) GenApiToFile(c *gin.Context) {
|
||||
e.Context = c
|
||||
log := e.GetLogger()
|
||||
table := tools.SysTables{}
|
||||
@@ -164,7 +164,7 @@ func (e *Gen) GenApiToFile(c *gin.Context) {
|
||||
e.OK("", "Code generated successfully!")
|
||||
}
|
||||
|
||||
func (e *Gen) NOActionsGen(c *gin.Context, tab tools.SysTables) {
|
||||
func (e Gen) NOActionsGen(c *gin.Context, tab tools.SysTables) {
|
||||
e.Context = c
|
||||
log := e.GetLogger()
|
||||
|
||||
@@ -249,7 +249,7 @@ func (e *Gen) NOActionsGen(c *gin.Context, tab tools.SysTables) {
|
||||
|
||||
}
|
||||
|
||||
func (e *Gen) genApiToFile(c *gin.Context, tab tools.SysTables) {
|
||||
func (e Gen) genApiToFile(c *gin.Context, tab tools.SysTables) {
|
||||
e.Context = c
|
||||
log := e.GetLogger()
|
||||
|
||||
@@ -272,7 +272,7 @@ func (e *Gen) genApiToFile(c *gin.Context, tab tools.SysTables) {
|
||||
|
||||
}
|
||||
|
||||
func (e *Gen) ActionsGen(c *gin.Context, tab tools.SysTables) {
|
||||
func (e Gen) ActionsGen(c *gin.Context, tab tools.SysTables) {
|
||||
log := api.GetRequestLogger(c)
|
||||
basePath := "template/v4/"
|
||||
routerFile := basePath + "actions/router_check_role.go.template"
|
||||
@@ -336,7 +336,7 @@ func (e *Gen) ActionsGen(c *gin.Context, tab tools.SysTables) {
|
||||
pkg.FileCreate(b6, "./app/"+tab.PackageName+"/service/dto/"+tab.BusinessName+".go")
|
||||
}
|
||||
|
||||
func (e *Gen) GenMenuAndApi(c *gin.Context) {
|
||||
func (e Gen) GenMenuAndApi(c *gin.Context) {
|
||||
log := api.GetRequestLogger(c)
|
||||
|
||||
table := tools.SysTables{}
|
||||
@@ -578,4 +578,4 @@ func (e *Gen) GenMenuAndApi(c *gin.Context) {
|
||||
ADelete.MenuId, err = ADelete.Create(db)
|
||||
|
||||
e.OK("", "数据生成成功!")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user