Skip to content

Commit

Permalink
v1.3.6: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mizuki1412 committed Apr 13, 2022
1 parent 3c19c68 commit 727014f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion class/float64.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ func (th *Float64) Scan(value any) error {
return nil
}
th.Valid = true
th.Float64 = cast.ToFloat64(value)
switch value.(type) {
case []uint8:
// 数据库中decimal的值是字符数组返回
a := value.([]uint8)
th.Float64 = cast.ToFloat64(string(a))
default:
th.Float64 = cast.ToFloat64(value)
}
return nil
}

Expand Down

0 comments on commit 727014f

Please sign in to comment.