🐛 Fixing a bug. #2242 数据权限 用户权限设置为ALL(0, "全部"), selectCountByScope报错

This commit is contained in:
lbw committed 2021-01-08 11:21:36 +08:00
1 parent bbc5d8ff44
commit 61d05ebce7
1 file changed
+3
@@ -41,6 +41,9 @@ public class DataScopeInnerInterceptor implements InnerInterceptor {
List<Integer> deptIds = dataScope.getDeptIds();
// 优先获取赋值数据
if (CollUtil.isEmpty(deptIds) && dataScopeHandle.calcScope(deptIds)) {
originalSql = String.format("SELECT %s FROM (%s) temp_data_scope", dataScope.getFunc().getType(),
originalSql);
mpBs.sql(originalSql);
return;
}