yangys
2024-04-09 6cbeec5fa8e11547b1baec937575376b780aeb2e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);
      } 
    }
}