| | |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | |
| | | import java.sql.SQLException; |
| | | |
| | | /** |
| | | * MyBatis Plus config. |
| | | */ |
| | |
| | | PaginationInnerInterceptor interceptor = new PaginationInnerInterceptor(DbType.MYSQL) { |
| | | @Override |
| | | public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, |
| | | RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) |
| | | throws SQLException { |
| | | RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) { |
| | | IPage<?> page = ParameterUtils.findPage(parameter).orElse(null); |
| | | if (page != null && page.getSize() <= 0) { |
| | | return; |