Commit 35e87a657979f0c3ba6a5a108dcb1866000a2aa6

Authored by 王彬
1 parent a3f02b77

1.fix a bug about getTableSql

build.gradle
... ... @@ -51,7 +51,7 @@ uploadArchives {
51 51 authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
52 52 }
53 53 pom.project {
54   - version '2.1.0'
  54 + version '2.1.1'
55 55 artifactId ARTIFACT_Id
56 56 groupId GROUP_ID
57 57 packaging TYPE
... ...
src/main/java/com/taover/repository/CustomJdbcTemplate.java
... ... @@ -227,7 +227,9 @@ public class CustomJdbcTemplate<T, ID extends Serializable> {
227 227 }
228 228  
229 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 /**
... ...