forked from github/dataease
fix: NUMERIC 类型丢失精度的问题
This commit is contained in:
parent
793061c7a6
commit
15d18488c9
@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
|
||||
@ -286,6 +287,10 @@ public class JdbcProvider extends DefaultJdbcProvider {
|
||||
case Types.BOOLEAN:
|
||||
row[j] = rs.getBoolean(j + 1) ? "1" : "0";
|
||||
break;
|
||||
case Types.NUMERIC:
|
||||
BigDecimal bigDecimal = rs.getBigDecimal(j + 1);
|
||||
row[j] = bigDecimal == null ? null: bigDecimal.toString();
|
||||
break;
|
||||
default:
|
||||
if (metaData.getColumnTypeName(j + 1).toLowerCase().equalsIgnoreCase("blob")) {
|
||||
row[j] = rs.getBlob(j + 1) == null ? "" : rs.getBlob(j + 1).toString();
|
||||
|
Loading…
Reference in New Issue
Block a user