修复json tag生成

This commit is contained in:
白茶清欢 2024-08-30 14:16:11 +08:00
parent aebb943603
commit c9d6c4c845

View File

@ -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":