fix(sj_1.2.0-beta1): PaginationInnerInterceptor不制定 dbType,由 mp 自动管理,解决 Oracle 11g分页兼容问题。
This commit is contained in:
parent
ec5b53208c
commit
ab9b96db47
@ -46,9 +46,9 @@ public class SnailJobTemplateAutoConfiguration {
|
|||||||
|
|
||||||
@Bean("sqlSessionFactory")
|
@Bean("sqlSessionFactory")
|
||||||
public SqlSessionFactory sqlSessionFactory(DataSource dataSource, Environment environment,
|
public SqlSessionFactory sqlSessionFactory(DataSource dataSource, Environment environment,
|
||||||
MybatisPlusInterceptor mybatisPlusInterceptor,
|
MybatisPlusInterceptor mybatisPlusInterceptor,
|
||||||
MybatisPlusProperties mybatisPlusProperties,
|
MybatisPlusProperties mybatisPlusProperties,
|
||||||
SnailJobMybatisConfiguration snailJobMybatisConfiguration) throws Exception {
|
SnailJobMybatisConfiguration snailJobMybatisConfiguration) throws Exception {
|
||||||
MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();
|
MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();
|
||||||
factoryBean.setDataSource(dataSource);
|
factoryBean.setDataSource(dataSource);
|
||||||
DbTypeEnum dbTypeEnum = DbUtils.getDbType();
|
DbTypeEnum dbTypeEnum = DbUtils.getDbType();
|
||||||
@ -91,9 +91,7 @@ public class SnailJobTemplateAutoConfiguration {
|
|||||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
String tablePrefix = Optional.ofNullable(environment.getProperty("mybatis-plus.global-config.db-config.table-prefix")).orElse(StrUtil.EMPTY);
|
String tablePrefix = Optional.ofNullable(environment.getProperty("mybatis-plus.global-config.db-config.table-prefix")).orElse(StrUtil.EMPTY);
|
||||||
interceptor.addInnerInterceptor(dynamicTableNameInnerInterceptor(tablePrefix));
|
interceptor.addInnerInterceptor(dynamicTableNameInnerInterceptor(tablePrefix));
|
||||||
DbTypeEnum dbTypeEnum = DbUtils.getDbType();
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
|
||||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(dbTypeEnum.getMpDbType()));
|
|
||||||
|
|
||||||
return interceptor;
|
return interceptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user