diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java index 01374837..05917807 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java @@ -7,7 +7,6 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.PageUtils; import com.ruoyi.common.utils.RedisUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.SysUserOnline; @@ -63,7 +62,7 @@ public class SysUserOnlineController extends BaseController { } Collections.reverse(userOnlineList); userOnlineList.removeAll(Collections.singleton(null)); - return PageUtils.buildDataInfo(userOnlineList); + return TableDataInfo.build(userOnlineList); } /** diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/core/IServicePlus.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/core/IServicePlus.java index 6b373ffc..e645562a 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/core/IServicePlus.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/core/IServicePlus.java @@ -1,6 +1,7 @@ package com.ruoyi.common.core.mybatisplus.core; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.common.core.page.PagePlus; @@ -114,25 +115,35 @@ public interface IServicePlus extends IService { * @param page 分页对象 * @param queryWrapper 查询条件 * @return V对象 + * @deprecated 3.6.0 移除 请使用 {@link ServicePlusImpl#pageVo(IPage, Wrapper)} */ + @Deprecated PagePlus pageVo(PagePlus page, Wrapper queryWrapper); - /** - * @param convertor 自定义转换器 - */ + /** + * @param convertor 自定义转换器 + * @deprecated 3.6.0 移除 请使用 {@link ServicePlusImpl#pageVo(IPage, Wrapper)} + */ + @Deprecated default PagePlus pageVo(PagePlus page, Wrapper queryWrapper, Function, List> convertor) { PagePlus result = getBaseMapper().selectPage(page, queryWrapper); return result.setRecordsVo(convertor.apply(result.getRecords())); } + /** + * @deprecated 3.6.0 移除 请使用 {@link ServicePlusImpl#pageVo(IPage, Wrapper)} + */ + @Deprecated default PagePlus pageVo(PagePlus page) { return pageVo(page, Wrappers.emptyWrapper()); } /** * @param convertor 自定义转换器 + * @deprecated 3.6.0 移除 请使用 {@link ServicePlusImpl#pageVo(IPage, Wrapper)} */ + @Deprecated default PagePlus pageVo(PagePlus page, Function, List> convertor) { return pageVo(page, Wrappers.emptyWrapper(), convertor); } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java b/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java index 90404854..2345c204 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java @@ -9,6 +9,6 @@ public class CaptchaException extends UserException { private static final long serialVersionUID = 1L; public CaptchaException() { - super("user.jcaptcha.error", null); + super("user.jcaptcha.error"); } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java b/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java index ae5f759f..bb4c0376 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java @@ -9,6 +9,6 @@ public class CaptchaExpireException extends UserException { private static final long serialVersionUID = 1L; public CaptchaExpireException() { - super("user.jcaptcha.expire", null); + super("user.jcaptcha.expire"); } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java b/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java index 0fab1167..863ba765 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java @@ -9,6 +9,6 @@ public class UserPasswordNotMatchException extends UserException { private static final long serialVersionUID = 1L; public UserPasswordNotMatchException() { - super("user.password.not.match", null); + super("user.password.not.match"); } } diff --git a/ruoyi-extend/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/CookieInterceptor.java b/ruoyi-extend/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/CookieInterceptor.java index 57c1c08d..e55b890f 100644 --- a/ruoyi-extend/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/CookieInterceptor.java +++ b/ruoyi-extend/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/CookieInterceptor.java @@ -3,8 +3,8 @@ package com.xxl.job.admin.controller.interceptor; import com.xxl.job.admin.core.util.FtlUtil; import com.xxl.job.admin.core.util.I18nUtil; import org.springframework.stereotype.Component; +import org.springframework.web.servlet.AsyncHandlerInterceptor; import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; @@ -17,7 +17,7 @@ import java.util.HashMap; * @author xuxueli 2015-12-12 18:09:04 */ @Component -public class CookieInterceptor extends HandlerInterceptorAdapter { +public class CookieInterceptor implements AsyncHandlerInterceptor { @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, @@ -36,8 +36,8 @@ public class CookieInterceptor extends HandlerInterceptorAdapter { if (modelAndView != null) { modelAndView.addObject("I18nUtil", FtlUtil.generateStaticModel(I18nUtil.class.getName())); } - - super.postHandle(request, response, handler, modelAndView); + + AsyncHandlerInterceptor.super.postHandle(request, response, handler, modelAndView); } - + } diff --git a/ruoyi-extend/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/PermissionInterceptor.java b/ruoyi-extend/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/PermissionInterceptor.java index 5202c290..19eac735 100644 --- a/ruoyi-extend/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/PermissionInterceptor.java +++ b/ruoyi-extend/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/PermissionInterceptor.java @@ -6,7 +6,7 @@ import com.xxl.job.admin.core.util.I18nUtil; import com.xxl.job.admin.service.LoginService; import org.springframework.stereotype.Component; import org.springframework.web.method.HandlerMethod; -import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; +import org.springframework.web.servlet.AsyncHandlerInterceptor; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -18,16 +18,16 @@ import javax.servlet.http.HttpServletResponse; * @author xuxueli 2015-12-12 18:09:04 */ @Component -public class PermissionInterceptor extends HandlerInterceptorAdapter { +public class PermissionInterceptor implements AsyncHandlerInterceptor { @Resource private LoginService loginService; @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - + if (!(handler instanceof HandlerMethod)) { - return super.preHandle(request, response, handler); + return AsyncHandlerInterceptor.super.preHandle(request, response, handler); } // if need login @@ -53,7 +53,7 @@ public class PermissionInterceptor extends HandlerInterceptorAdapter { request.setAttribute(LoginService.LOGIN_IDENTITY_KEY, loginUser); } - return super.preHandle(request, response, handler); + return AsyncHandlerInterceptor.super.preHandle(request, response, handler); } - + }