From 90e813a06ce43d669302ef5907bd6d3d20be7a5a Mon Sep 17 00:00:00 2001 From: redkale Date: Sat, 25 Nov 2023 21:52:05 +0800 Subject: [PATCH] DataJdbcSource --- src/main/java/org/redkale/source/DataJdbcSource.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/redkale/source/DataJdbcSource.java b/src/main/java/org/redkale/source/DataJdbcSource.java index 66ecec6ff..2e948e4dd 100644 --- a/src/main/java/org/redkale/source/DataJdbcSource.java +++ b/src/main/java/org/redkale/source/DataJdbcSource.java @@ -372,7 +372,7 @@ public class DataJdbcSource extends AbstractDataSqlSource { T entity = entitys[++i]; if (primaryType == int.class || primaryType == Integer.class) { primary.set(entity, set.getInt(1)); - } else if (primaryType == long.class || primaryType == long.class) { + } else if (primaryType == long.class || primaryType == Long.class) { primary.set(entity, set.getLong(1)); } else if (primaryType == String.class) { primary.set(entity, set.getString(1)); @@ -398,7 +398,7 @@ public class DataJdbcSource extends AbstractDataSqlSource { T entity = prepareInfo.entitys.get(++i); if (primaryType == int.class || primaryType == Integer.class) { primary.set(entity, set.getInt(1)); - } else if (primaryType == long.class || primaryType == long.class) { + } else if (primaryType == long.class || primaryType == Long.class) { primary.set(entity, set.getLong(1)); } else if (primaryType == String.class) { primary.set(entity, set.getString(1)); @@ -548,7 +548,7 @@ public class DataJdbcSource extends AbstractDataSqlSource { T entity = entitys[++i]; if (primaryType == int.class || primaryType == Integer.class) { primary.set(entity, set.getInt(1)); - } else if (primaryType == long.class || primaryType == long.class) { + } else if (primaryType == long.class || primaryType == Long.class) { primary.set(entity, set.getLong(1)); } else if (primaryType == String.class) { primary.set(entity, set.getString(1)); @@ -576,7 +576,7 @@ public class DataJdbcSource extends AbstractDataSqlSource { T entity = prepareInfo.entitys.get(++i); if (primaryType == int.class || primaryType == Integer.class) { primary.set(entity, set.getInt(1)); - } else if (primaryType == long.class || primaryType == long.class) { + } else if (primaryType == long.class || primaryType == Long.class) { primary.set(entity, set.getLong(1)); } else if (primaryType == String.class) { primary.set(entity, set.getString(1)); @@ -2143,7 +2143,7 @@ public class DataJdbcSource extends AbstractDataSqlSource { } prestmt = conn.prepareQueryStatement(sql); final ResultSet set = prestmt.executeQuery(); - boolean rs = set.next() ? (set.getInt(1) > 0) : false; + boolean rs = set.next() && (set.getInt(1) > 0); set.close(); conn.offerQueryStatement(prestmt); if (info.isLoggable(logger, Level.FINEST, sql)) {