Skip to content

Commit 326353a

Browse files
author
Weasley
committed
update
1 parent 234797c commit 326353a

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Domain Driven Table [![Maven Central](https://img.shields.io/maven-central/v/io.
250250
<dependency>
251251
<groupId>io.github.weasley-j</groupId>
252252
<artifactId>mydtt-plus-spring-boot-starter</artifactId>
253-
<version>1.2.9</version>
253+
<version>1.3.0</version>
254254
</dependency>
255255
<!-- javadoc-scribe start -->
256256
<dependency>

mydtt-plus-spring-boot-starter-tests/mydtt-plus-spring-boot-2-x/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>io.github.weasley-j</groupId>
2727
<artifactId>mydtt-plus-spring-boot-starter</artifactId>
28-
<version>1.2.9</version>
28+
<version>1.3.0</version>
2929
</dependency>
3030
<!-- javadoc-scribe start -->
3131
<dependency>

mydtt-plus-spring-boot-starter-tests/mydtt-plus-spring-boot-3-x/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<dependency>
4141
<groupId>io.github.weasley-j</groupId>
4242
<artifactId>mydtt-plus-spring-boot-starter</artifactId>
43-
<version>1.2.9</version>
43+
<version>1.3.0</version>
4444
</dependency>
4545
<!-- javadoc-scribe start -->
4646
<dependency>

mydtt-plus-spring-boot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<groupId>io.github.weasley-j</groupId>
1313
<artifactId>mydtt-plus-spring-boot-starter</artifactId>
14-
<version>1.2.9</version>
14+
<version>1.3.0</version>
1515
<name>mydtt-plus-spring-boot-starter</name>
1616
<description>
1717
MyDtt-Plus is a starter of SpringBoot,I named it DTT, It's an object-oriented Java framework,

mydtt-plus-spring-boot-starter/src/main/java/cn/alphahub/dtt/plus/framework/interceptor/DefaultDttMybatisInterceptor.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
*/
4646
@Component
4747
@ConditionalOnBean(annotation = {EnableDtt.class})
48-
@Intercepts(value = {@Signature(type = StatementHandler.class, method = "getBoundSql", args = {}), @Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class}),})
48+
@Intercepts(value = {
49+
@Signature(type = StatementHandler.class, method = "getBoundSql", args = {}),
50+
@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class}),
51+
})
4952
public class DefaultDttMybatisInterceptor implements Interceptor {
5053
private static final Logger logger = LoggerFactory.getLogger(DefaultDttMybatisInterceptor.class);
5154
private final JdbcTemplate jdbcTemplate;
@@ -149,7 +152,7 @@ public boolean isTableNotExists(String tableName) {
149152
switch (databaseProperty.getDatabaseType()) {
150153
case MYSQL:
151154
case MARIADB:
152-
sql = "SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_NAME = '" + tableName + "'";
155+
sql = "SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA = '" + databaseProperty.getDatabaseName() + "' AND TABLE_NAME = '" + tableName + "'";
153156
break;
154157
case SQLSERVER:
155158
sql = "SELECT COUNT(*) FROM sys.all_objects WHERE object_id = OBJECT_ID( N'[dbo].[" + tableName + "]' ) AND type IN ( 'U' )";

0 commit comments

Comments
 (0)