@Intercepts(value=@Signature(type=org.apache.ibatis.executor.statement.StatementHandler.class,method="prepare",args={java.sql.Connection.class,java.lang.Integer.class}))
public class PaginationInterceptor
extends AbstractSqlParserHandler
implements org.apache.ibatis.plugin.Interceptor
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.apache.ibatis.logging.Log |
logger |
| 构造器和说明 |
|---|
PaginationInterceptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.String |
concatOrderBy(java.lang.String originalSql,
com.baomidou.mybatisplus.core.metadata.IPage<?> page)
查询SQL拼接Order By
|
java.lang.Object |
intercept(org.apache.ibatis.plugin.Invocation invocation)
Physical Page Interceptor for all the queries with parameter
RowBounds |
java.lang.Object |
plugin(java.lang.Object target) |
protected void |
queryTotal(boolean overflowCurrent,
java.lang.String sql,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
org.apache.ibatis.mapping.BoundSql boundSql,
com.baomidou.mybatisplus.core.metadata.IPage<?> page,
java.sql.Connection connection)
查询总记录条数
|
void |
setProperties(java.util.Properties prop) |
sqlParserpublic static java.lang.String concatOrderBy(java.lang.String originalSql,
com.baomidou.mybatisplus.core.metadata.IPage<?> page)
originalSql - 需要拼接的SQLpage - page对象public java.lang.Object intercept(org.apache.ibatis.plugin.Invocation invocation)
throws java.lang.Throwable
RowBoundsintercept 在接口中 org.apache.ibatis.plugin.Interceptorjava.lang.Throwableprotected void queryTotal(boolean overflowCurrent,
java.lang.String sql,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
org.apache.ibatis.mapping.BoundSql boundSql,
com.baomidou.mybatisplus.core.metadata.IPage<?> page,
java.sql.Connection connection)
sql - count sqlmappedStatement - MappedStatementboundSql - BoundSqlpage - IPageconnection - Connectionpublic java.lang.Object plugin(java.lang.Object target)
plugin 在接口中 org.apache.ibatis.plugin.Interceptorpublic void setProperties(java.util.Properties prop)
setProperties 在接口中 org.apache.ibatis.plugin.Interceptor