From c0554ce9807489b8c28135dcb0fec80b7e500ff7 Mon Sep 17 00:00:00 2001 From: huiyifyj Date: Wed, 18 Dec 2024 11:36:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E6=A8=A1=E6=9D=BF=E4=B8=AD?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=96=87=E6=A1=A3=20query=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit swag 工具的 query 为具体字符的字段,目前不支持 ast 扫描对应结构体 --- server/api/v1/system/sys_export_template.go | 2 +- server/resource/package/server/api/api.go.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api/v1/system/sys_export_template.go b/server/api/v1/system/sys_export_template.go index 38b22965be..9b83a17c43 100644 --- a/server/api/v1/system/sys_export_template.go +++ b/server/api/v1/system/sys_export_template.go @@ -213,7 +213,7 @@ func (sysExportTemplateApi *SysExportTemplateApi) ExportExcel(c *gin.Context) { // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Router /sysExportTemplate/exportExcel [get] +// @Router /sysExportTemplate/ExportTemplate [get] func (sysExportTemplateApi *SysExportTemplateApi) ExportTemplate(c *gin.Context) { templateID := c.Query("templateID") if templateID == "" { diff --git a/server/resource/package/server/api/api.go.tpl b/server/resource/package/server/api/api.go.tpl index 5aae0995ff..988e3c622d 100644 --- a/server/resource/package/server/api/api.go.tpl +++ b/server/resource/package/server/api/api.go.tpl @@ -130,7 +130,7 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api) Update{{.StructName}}(c *gin.Con // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data query {{.Package}}.{{.StructName}} true "用id查询{{.Description}}" +// @Param data query {{.PrimaryField.FieldJson}} true "用id查询{{.Description}}" // @Success 200 {object} response.Response{data={{.Package}}.{{.StructName}},msg=string} "查询成功" // @Router /{{.Abbreviation}}/find{{.StructName}} [get] func ({{.Abbreviation}}Api *{{.StructName}}Api) Find{{.StructName}}(c *gin.Context) {