diff --git a/base/res_field.go b/base/res_field.go index 982e076..beecea0 100644 --- a/base/res_field.go +++ b/base/res_field.go @@ -101,36 +101,6 @@ func (this ResField) GetQueryDataType() contracts.QueryDataType { } func (this ResField) ToValue(v any) any { - // 类型转换, 填补 cast 未知的类型 - switch data := v.(type) { - case res_type.ResFieldByInteger: - v = int64(data) - case res_type.ResFieldByFloat: - v = float64(data) - case res_type.ResFieldByNumber: - v = float64(data) - case string: - v = strings.Trim(string(data), " ") - case []any, []string, []int, []float64, []float32, []int64: - if v != nil { - b, _ := json.Marshal(v) - return string(b) - } - v = data - case map[string]any, map[string]string, map[string]int: - if v != nil { - b, _ := json.Marshal(v) - return string(b) - } - v = data - default: - if v != nil { - b, _ := json.Marshal(v) - return string(b) - } - v = data - } - switch this.DataType { case contracts.ResDataType_String, contracts.ResDataType_Text, contracts.ResDataType_Enum, contracts.ResDataType_Timestamp, contracts.ResDataType_Date, contracts.ResDataType_Datetime: