🎨 移除多余模块

This commit is contained in:
2026-04-08 12:19:24 +08:00
parent 22bb5fdc94
commit 7599146f24
192 changed files with 623 additions and 13983 deletions

View File

@@ -1,26 +1,3 @@
{{if .IsPlugin}}
// {{.FuncName}} {{.FuncDesc}}
// @Tags {{.StructName}}
// @Summary {{.FuncDesc}}
// @Accept application/json
// @Produce application/json
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /{{.Abbreviation}}/{{.Router}} [{{.Method}}]
func (a *{{.Abbreviation}}) {{.FuncName}}(c *gin.Context) {
// Context
ctx := c.Request.Context()
//
err := service{{ .StructName }}.{{.FuncName}}(ctx)
if err != nil {
global.GVA_LOG.Error("失败!", zap.Error(err))
response.FailWithMessage("失败", c)
return
}
response.OkWithData("返回数据",c)
}
{{- else -}}
// {{.FuncName}} {{.FuncDesc}}
// @Tags {{.StructName}}
// @Summary {{.FuncDesc}}
@@ -41,4 +18,3 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api){{.FuncName}}(c *gin.Context) {
}
response.OkWithData("返回数据",c)
}
{{end}}

View File

@@ -1,20 +1,3 @@
{{if .IsPlugin}}
// {{.FuncName}} {{.FuncDesc}}
// @Tags {{.StructName}}
// @Summary {{.FuncDesc}}
// @Accept application/json
// @Produce application/json
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /{{.Abbreviation}}/{{.Router}} [{{.Method}}]
export const {{.Router}} = () => {
return service({
url: '/{{.Abbreviation}}/{{.Router}}',
method: '{{.Method}}'
})
}
{{- else -}}
// {{.FuncName}} {{.FuncDesc}}
// @Tags {{.StructName}}
// @Summary {{.FuncDesc}}
@@ -28,5 +11,3 @@ export const {{.Router}} = () => {
method: '{{.Method}}'
})
}
{{- end -}}

View File

@@ -4,16 +4,6 @@
{{- else}}
{{- $db = printf "global.MustGetGlobalDBByDBName(\"%s\")" .BusinessDB }}
{{- end}}
{{if .IsPlugin}}
// {{.FuncName}} {{.FuncDesc}}
// Author [yourname](https://github.com/yourname)
func (s *{{.Abbreviation}}) {{.FuncName}}(ctx context.Context) (err error) {
db := {{$db}}.Model(&model.{{.StructName}}{})
return db.Error
}
{{- else -}}
// {{.FuncName}} {{.FuncDesc}}
// Author [yourname](https://github.com/yourname)
@@ -22,4 +12,3 @@ func ({{.Abbreviation}}Service *{{.StructName}}Service){{.FuncName}}(ctx context
db := {{$db}}.Model(&{{.Package}}.{{.StructName}}{})
return db.Error
}
{{end}}