upgrade wrapper

This commit is contained in:
2025-03-21 18:30:29 +08:00
parent b8c8c9d433
commit 786c03293a
3 changed files with 14 additions and 6 deletions

View File

@ -150,7 +150,7 @@ func getRealDataType(dataType consts.DataType, sourceValue gjson.Result) consts.
dataType = consts.DataTypeSliceAny
} else {
if sourceValue.Num != 0 {
dataType = consts.DataTypeFloat
dataType = consts.DataTypeFloat64
}
}
}
@ -366,7 +366,7 @@ func Value(dataType consts.DataType, sourceValue gjson.Result, defaultValue any)
return Int(sourceValue)
case consts.DataTypeUint:
return Uint(sourceValue)
case consts.DataTypeFloat:
case consts.DataTypeFloat64, consts.DataTypeFloat32:
return Float64(sourceValue)
case consts.DataTypeBool:
boolVal := strVal.ToBool()