mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
修复一个用户有多个角色时,拼接数据权限的SQL由于带有OR,使得MP方法注入的SQL其他Where条件失效
This commit is contained in:
parent
c6963e1a96
commit
c145b8645e
@ -127,7 +127,9 @@ public class DataScopeAspect {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//sql添加括号防止OR导致其他条件失效
|
||||
sqlString.insert(4,"(");
|
||||
sqlString.append(')');
|
||||
if (StringUtils.isNotBlank(sqlString.toString())) {
|
||||
putDataScope(joinPoint, sqlString.substring(4));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user