Commit 35e87a657979f0c3ba6a5a108dcb1866000a2aa6
1 parent
a3f02b77
Exists in
master
and in
2 other branches
1.fix a bug about getTableSql
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
build.gradle
@@ -51,7 +51,7 @@ uploadArchives { | @@ -51,7 +51,7 @@ uploadArchives { | ||
51 | authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) | 51 | authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) |
52 | } | 52 | } |
53 | pom.project { | 53 | pom.project { |
54 | - version '2.1.0' | 54 | + version '2.1.1' |
55 | artifactId ARTIFACT_Id | 55 | artifactId ARTIFACT_Id |
56 | groupId GROUP_ID | 56 | groupId GROUP_ID |
57 | packaging TYPE | 57 | packaging TYPE |
src/main/java/com/taover/repository/CustomJdbcTemplate.java
@@ -227,7 +227,9 @@ public class CustomJdbcTemplate<T, ID extends Serializable> { | @@ -227,7 +227,9 @@ public class CustomJdbcTemplate<T, ID extends Serializable> { | ||
227 | } | 227 | } |
228 | 228 | ||
229 | private String getTableSql(){ | 229 | private String getTableSql(){ |
230 | - return "".equals(this.dbName)?"`"+this.tableName+"`":("`"+this.dbName+"`.`"+this.tableName+"`"); | 230 | + return (this.dbName == null || "".equals(this.dbName.trim()))? |
231 | + ("`"+this.tableName+"`"): | ||
232 | + ("`"+this.dbName+"`.`"+this.tableName+"`"); | ||
231 | } | 233 | } |
232 | 234 | ||
233 | /** | 235 | /** |