mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
This commit is contained in:
parent
379c143dbb
commit
5308e309ea
@ -5,7 +5,6 @@ import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
|||||||
import cn.iocoder.yudao.framework.datapermission.core.rule.DataPermissionRule;
|
import cn.iocoder.yudao.framework.datapermission.core.rule.DataPermissionRule;
|
||||||
import cn.iocoder.yudao.framework.datapermission.core.rule.DataPermissionRuleFactory;
|
import cn.iocoder.yudao.framework.datapermission.core.rule.DataPermissionRuleFactory;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
|
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
|
||||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
|
import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
|
||||||
import com.baomidou.mybatisplus.extension.parser.JsqlParserSupport;
|
import com.baomidou.mybatisplus.extension.parser.JsqlParserSupport;
|
||||||
@ -508,6 +507,9 @@ public class DataPermissionDatabaseInterceptor extends JsqlParserSupport impleme
|
|||||||
// 单条规则的条件
|
// 单条规则的条件
|
||||||
String tableName = MyBatisUtils.getTableName(table);
|
String tableName = MyBatisUtils.getTableName(table);
|
||||||
Expression oneExpress = rule.getExpression(tableName, table.getAlias());
|
Expression oneExpress = rule.getExpression(tableName, table.getAlias());
|
||||||
|
if (oneExpress == null){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// 拼接到 allExpression 中
|
// 拼接到 allExpression 中
|
||||||
allExpression = allExpression == null ? oneExpress
|
allExpression = allExpression == null ? oneExpress
|
||||||
: new AndExpression(allExpression, oneExpress);
|
: new AndExpression(allExpression, oneExpress);
|
||||||
|
Loading…
Reference in New Issue
Block a user