完善泛型类型
This commit is contained in:
parent
ab81a18586
commit
643e22dc24
@ -79,7 +79,7 @@ public class MybatisInterceptor implements Interceptor {
|
||||
CacheKey cacheKey = executor.createCacheKey(ms, parameterObject, rowBounds, boundSql);
|
||||
for (MybatisPreHandler item : preHandlersChain) {
|
||||
item.preHandle(targetExecutor, ms, args[1], (RowBounds) args[2],
|
||||
(ResultHandler) args[3], cacheKey, boundSql);
|
||||
(ResultHandler<?>) args[3], cacheKey, boundSql);
|
||||
}
|
||||
}
|
||||
Object result = invocation.proceed();
|
||||
@ -93,7 +93,7 @@ public class MybatisInterceptor implements Interceptor {
|
||||
if (preHandlersChain != null && preHandlersChain.size() > 0) {
|
||||
for (MybatisPreHandler item : preHandlersChain) {
|
||||
item.preHandle(targetExecutor, (MappedStatement) args[0], args[1], (RowBounds) args[2],
|
||||
(ResultHandler) args[3], (CacheKey) args[4], (BoundSql) args[5]);
|
||||
(ResultHandler<?>) args[3], (CacheKey) args[4], (BoundSql) args[5]);
|
||||
}
|
||||
}
|
||||
Object result = invocation.proceed();
|
||||
|
@ -6,10 +6,9 @@ import org.apache.ibatis.mapping.BoundSql;
|
||||
import org.apache.ibatis.mapping.MappedStatement;
|
||||
import org.apache.ibatis.session.ResultHandler;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
|
||||
public interface MybatisPreHandler {
|
||||
|
||||
void preHandle(Executor executor, MappedStatement mappedStatement, Object params,
|
||||
RowBounds rowBounds, ResultHandler resultHandler, CacheKey cacheKey, BoundSql boundSql)
|
||||
RowBounds rowBounds, ResultHandler<?> resultHandler, CacheKey cacheKey, BoundSql boundSql)
|
||||
throws Throwable;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class DataSecurityPreHandler implements MybatisPreHandler {
|
||||
|
||||
@Override
|
||||
public void preHandle(Executor executor, MappedStatement mappedStatement, Object params, RowBounds rowBounds,
|
||||
ResultHandler resultHandler, CacheKey cacheKey, BoundSql boundSql) throws Throwable {
|
||||
ResultHandler<?> resultHandler, CacheKey cacheKey, BoundSql boundSql) throws Throwable {
|
||||
if (SqlContextHolder.isSecurity()) {
|
||||
Statement sql = parseSql(SqlUtil.parseSql(boundSql.getSql()));
|
||||
sqlFiled.set(boundSql, sql.toString());
|
||||
|
@ -17,7 +17,7 @@ public class PageAfterHandler implements MybatisAfterHandler {
|
||||
public Object handleObject(Object object) throws Throwable {
|
||||
if (PageContextHolder.isPage()) {
|
||||
if (object instanceof List) {
|
||||
TableInfo tableInfo = new TableInfo<>((List) object);
|
||||
TableInfo<Object> tableInfo = new TableInfo<Object>((List<?>) object);
|
||||
tableInfo.setTotal(PageContextHolder.getTotal());
|
||||
PageContextHolder.clear();
|
||||
return tableInfo;
|
||||
|
@ -44,7 +44,7 @@ public class PagePreHandler implements MybatisPreHandler {
|
||||
|
||||
@Override
|
||||
public void preHandle(Executor executor, MappedStatement mappedStatement, Object params, RowBounds rowBounds,
|
||||
ResultHandler resultHandler, CacheKey cacheKey, BoundSql boundSql) throws Throwable {
|
||||
ResultHandler<?> resultHandler, CacheKey cacheKey, BoundSql boundSql) throws Throwable {
|
||||
if (PageContextHolder.isPage()) {
|
||||
String originSql = boundSql.getSql();
|
||||
Statement sql = SqlUtil.parseSql(originSql);
|
||||
@ -95,7 +95,7 @@ public class PagePreHandler implements MybatisPreHandler {
|
||||
}
|
||||
|
||||
public static Long getCount(Executor executor, MappedStatement mappedStatement, Object parameter,
|
||||
BoundSql boundSql, RowBounds rowBounds, ResultHandler resultHandler, String countSql)
|
||||
BoundSql boundSql, RowBounds rowBounds, ResultHandler<?> resultHandler, String countSql)
|
||||
throws SQLException {
|
||||
|
||||
Map<String, Object> additionalParameters = boundSql.getAdditionalParameters();
|
||||
|
Loading…
Reference in New Issue
Block a user