postgresql Monetary Types to BigDecimal ,error -> Bad value for type BigDecimal : 2,500.00
因为从数据库拿出来的value值带有逗号,又没有处理逗号的方法,所以会出现转型错误
解决方法:拿出来的时候强转 numeric 类型
select salary::numeric from table where id = #{id};
postgresql Monetary Types to BigDecimal ,error -> Bad value for type BigDecimal : 2,500.00
因为从数据库拿出来的value值带有逗号,又没有处理逗号的方法,所以会出现转型错误
解决方法:拿出来的时候强转 numeric 类型
select salary::numeric from table where id = #{id};