mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 02:25:56 +08:00
修复scheduler非web环境下查询错误
Signed-off-by: 其实我是kala <kala.niubility@gmail.com>
This commit is contained in:
parent
c1b9b95581
commit
14a1ddb375
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.common.mybatis.handler;
|
package org.dromara.common.mybatis.handler;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.spring.SpringMVCUtil;
|
||||||
import cn.hutool.core.annotation.AnnotationUtil;
|
import cn.hutool.core.annotation.AnnotationUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.ConcurrentHashSet;
|
import cn.hutool.core.collection.ConcurrentHashSet;
|
||||||
@ -72,6 +73,10 @@ public class PlusDataPermissionHandler {
|
|||||||
invalidCacheSet.add(mappedStatementId);
|
invalidCacheSet.add(mappedStatementId);
|
||||||
return where;
|
return where;
|
||||||
}
|
}
|
||||||
|
// scheduler 为非web环境,参考为admin
|
||||||
|
if (!SpringMVCUtil.isWeb()) {
|
||||||
|
return where;
|
||||||
|
}
|
||||||
LoginUser currentUser = DataPermissionHelper.getVariable("user");
|
LoginUser currentUser = DataPermissionHelper.getVariable("user");
|
||||||
if (ObjectUtil.isNull(currentUser)) {
|
if (ObjectUtil.isNull(currentUser)) {
|
||||||
currentUser = LoginHelper.getLoginUser();
|
currentUser = LoginHelper.getLoginUser();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user