package com.qianwen.core.mp.plugins;
|
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
import org.apache.ibatis.executor.Executor;
|
import org.apache.ibatis.mapping.BoundSql;
|
import org.apache.ibatis.mapping.MappedStatement;
|
import org.apache.ibatis.session.ResultHandler;
|
import org.apache.ibatis.session.RowBounds;
|
import com.qianwen.core.mp.intercept.QueryInterceptor;
|
|
/* loaded from: blade-starter-mybatis-9.3.0.0-SNAPSHOT.jar:org/springblade/core/mp/plugins/BladePaginationInterceptor.class */
|
public class BladePaginationInterceptor extends PaginationInnerInterceptor {
|
private QueryInterceptor[] queryInterceptors;
|
|
public void setQueryInterceptors(final QueryInterceptor[] queryInterceptors) {
|
this.queryInterceptors = queryInterceptors;
|
}
|
|
public boolean willDoQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) {
|
//QueryInterceptorExecutor.exec(this.queryInterceptors, executor, ms, parameter, rowBounds, resultHandler, boundSql);
|
//return super.willDoQuery(executor, ms, parameter, rowBounds, resultHandler, boundSql);
|
|
try {
|
QueryInterceptorExecutor.exec(this.queryInterceptors, executor, ms, parameter, rowBounds, resultHandler, boundSql);
|
return super.willDoQuery(executor, ms, parameter, rowBounds, resultHandler, boundSql);
|
} catch (Throwable ex) {
|
throw new RuntimeException(ex);
|
}
|
}
|
}
|