Browse Source

'fix'

master
public_host 1 year ago
parent
commit
a9997e8812
  1. 4
      hasaki-gen-crud/template.go

4
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])
}

Loading…
Cancel
Save