The field of the oracle number type appears in the Java code where 0 after the decimal point is lost.

The field of the oracle number type appears in the Java code where 0 after the decimal point is lost.

SQL query is like this
Insert picture description here

As a result, after arriving in the Java code, it was found that all 0 after the decimal point was rounded off. This field is of type number
Insert picture description here

My solution is to use the String type to receive the Java entity class,
and then convert the number type field into a varchar type in SQL.

 trim(to_char(SALEFEE_PER, '99999999990.999999')) as SALEFEE_PER

Full SQL.

Insert picture description here
This is of type varchar2, and it is directly received by the Java field of type String to the Java side, so that the tail 0 will not be discarded.

Guess you like

Origin blog.csdn.net/qq_41489540/article/details/114026803