mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	update 修改已过期方法 调整编译警告
This commit is contained in:
		@@ -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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -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");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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,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);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user