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
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 | /** | ... | ... |