Bladeren bron

update 修改已过期方法 调整编译警告

疯狂的狮子Li 3 jaren geleden
bovenliggende
commit
44bc7dd9a5

+ 1 - 2
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);
     }
 
     /**

+ 14 - 3
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<T, V> extends IService<T> {
 	 * @param page         分页对象
 	 * @param queryWrapper 查询条件
 	 * @return V对象
+     * @deprecated 3.6.0 移除 请使用 {@link ServicePlusImpl#pageVo(IPage, Wrapper)}
 	 */
+    @Deprecated
 	PagePlus<T, V> pageVo(PagePlus<T, V> page, Wrapper<T> queryWrapper);
 
-	/**
-	 * @param convertor 自定义转换器
-	 */
+    /**
+     * @param convertor 自定义转换器
+     * @deprecated 3.6.0 移除 请使用 {@link ServicePlusImpl#pageVo(IPage, Wrapper)}
+     */
+    @Deprecated
 	default PagePlus<T, V> pageVo(PagePlus<T, V> page, Wrapper<T> queryWrapper,
 								  Function<Collection<T>, List<V>> convertor) {
 		PagePlus<T, V> result = getBaseMapper().selectPage(page, queryWrapper);
 		return result.setRecordsVo(convertor.apply(result.getRecords()));
 	}
 
+    /**
+     * @deprecated 3.6.0 移除 请使用 {@link ServicePlusImpl#pageVo(IPage, Wrapper)}
+     */
+    @Deprecated
 	default PagePlus<T, V> pageVo(PagePlus<T, V> page) {
 		return pageVo(page, Wrappers.emptyWrapper());
 	}
 
 	/**
 	 * @param convertor 自定义转换器
+     * @deprecated 3.6.0 移除 请使用 {@link ServicePlusImpl#pageVo(IPage, Wrapper)}
 	 */
+    @Deprecated
 	default PagePlus<T, V> pageVo(PagePlus<T, V> page, Function<Collection<T>, List<V>> convertor) {
 		return pageVo(page, Wrappers.emptyWrapper(), convertor);
 	}

+ 1 - 1
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");
     }
 }

+ 1 - 1
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");
     }
 }

+ 1 - 1
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");
     }
 }

+ 5 - 5
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);
 	}
-	
+
 }

+ 6 - 6
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);
 	}
-	
+
 }