From a9997e88123217e50c25f23da717e1bdc89bea52 Mon Sep 17 00:00:00 2001 From: public_host Date: Mon, 4 Sep 2023 17:22:48 +0800 Subject: [PATCH] 'fix' --- hasaki-gen-crud/template.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index fcf2bef..70eadd7 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -1,7 +1,6 @@ package main import ( - "encoding/json" "fmt" "reflect" "time" @@ -192,8 +191,7 @@ func (TempLowHead3A60 *Temp3A60) fixSqlRowMap(fieldType map[string]reflect.Kind, case reflect.String: raw[i] = cast.ToString(raw[i]) case reflect.Slice, reflect.Array, reflect.Map, reflect.Struct, reflect.Ptr: - tmp, _ := json.Marshal(raw[i]) - raw[i] = gjson.ParseBytes(tmp).Value() + raw[i] = gjson.Parse(cast.ToString(raw[i])).Value() //todo default: raw[i] = cast.ToString(raw[i]) }