注释shirouser寻找上下级部门的代码,防止大数据量的场景影响效率
This commit is contained in:
parent
453229091d
commit
f1f57e0617
|
|
@ -21,7 +21,6 @@ import org.springblade.core.toolbox.CMap;
|
||||||
import org.springblade.core.toolbox.Func;
|
import org.springblade.core.toolbox.Func;
|
||||||
import org.springblade.core.toolbox.kit.CollectionKit;
|
import org.springblade.core.toolbox.kit.CollectionKit;
|
||||||
import org.springblade.core.toolbox.kit.StrKit;
|
import org.springblade.core.toolbox.kit.StrKit;
|
||||||
import org.springblade.core.toolbox.support.Convert;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -55,7 +54,7 @@ public class ShiroUser implements Serializable {
|
||||||
this.roles = CollectionKit.join(roleList.toArray(), ",");
|
this.roles = CollectionKit.join(roleList.toArray(), ",");
|
||||||
|
|
||||||
// 递归查找上级部门id集合
|
// 递归查找上级部门id集合
|
||||||
String superDeptSql;
|
/*String superDeptSql;
|
||||||
String superDepts = null;
|
String superDepts = null;
|
||||||
if (Func.isOracle()) {
|
if (Func.isOracle()) {
|
||||||
superDeptSql = "select wm_concat(ID) subDepts from (select ID,PID,SIMPLENAME from blade_dept start with ID in (#{join(deptIds)}) connect by prior PID=ID order by ID) a where a.ID not in (#{join(deptIds)})";
|
superDeptSql = "select wm_concat(ID) subDepts from (select ID,PID,SIMPLENAME from blade_dept start with ID in (#{join(deptIds)}) connect by prior PID=ID order by ID) a where a.ID not in (#{join(deptIds)})";
|
||||||
|
|
@ -78,10 +77,10 @@ public class ShiroUser implements Serializable {
|
||||||
}
|
}
|
||||||
superDepts = StrKit.removeSuffix(sb.toString(), ",");
|
superDepts = StrKit.removeSuffix(sb.toString(), ",");
|
||||||
}
|
}
|
||||||
this.superDepts = superDepts;
|
this.superDepts = superDepts;*/
|
||||||
|
|
||||||
// 递归查找子部门id集合
|
// 递归查找子部门id集合
|
||||||
String subDeptSql;
|
/*String subDeptSql;
|
||||||
String subDepts = null;
|
String subDepts = null;
|
||||||
if (Func.isOracle()) {
|
if (Func.isOracle()) {
|
||||||
subDeptSql = "select wm_concat(ID) subDepts from (select ID,PID,SIMPLENAME from blade_dept start with ID in (#{join(deptIds)}) connect by prior ID=PID order by ID) a where a.ID not in (#{join(deptIds)})";
|
subDeptSql = "select wm_concat(ID) subDepts from (select ID,PID,SIMPLENAME from blade_dept start with ID in (#{join(deptIds)}) connect by prior ID=PID order by ID) a where a.ID not in (#{join(deptIds)})";
|
||||||
|
|
@ -104,7 +103,7 @@ public class ShiroUser implements Serializable {
|
||||||
}
|
}
|
||||||
subDepts = StrKit.removeSuffix(sb.toString(), ",");
|
subDepts = StrKit.removeSuffix(sb.toString(), ",");
|
||||||
}
|
}
|
||||||
this.subDepts = subDepts;
|
this.subDepts = subDepts;*/
|
||||||
|
|
||||||
// 递归查找子角色id集合
|
// 递归查找子角色id集合
|
||||||
String roleSql;
|
String roleSql;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user