From c9d6c4c845e4b0455ca6036f6f0bce966e4e52ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Fri, 30 Aug 2024 14:16:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Djson=20tag=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api2sql/execute.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api2sql/execute.go b/api2sql/execute.go index 4dbb4b2..157fb8a 100644 --- a/api2sql/execute.go +++ b/api2sql/execute.go @@ -89,7 +89,7 @@ func (e *execute) List(ctx context.Context, inputParam *define.Api2SqlParam) (an // 动态生成结果解析结构体 st := wrapper.NewDynamic() for _, columnConfig := range inputParam.ColumnList { - tag := fmt.Sprintf(`gorm:"%v" json:"%v"`, columnConfig.Column, columnConfig.Alias) + tag := fmt.Sprintf(`%v`, columnConfig.Alias) column := wrapper.String(columnConfig.Column).SnakeCaseToCamel() switch columnConfig.Type { case "int", "int8", "int16", "int32", "int64":