作者 朱兆平

优化sql树形结构的查询-改为查询出所有的数据后用steam进行children Set

... ... @@ -48,7 +48,7 @@ public class UserServiceImpl implements UserService{
//新SQL MYBATIS SQL 绑定role跟perm的方法,以减少数据库查询次数
if (userInfo!=null){
if (userInfo.getRoles()!=null && userInfo.getRoles().isEmpty()){
if (userInfo.getRoles()!=null && !userInfo.getRoles().isEmpty()){
List<ROLE> topRoles = roleMapper.selectTopByChildID(userInfo.getRoles().get(0).getRoleId());
topRoles.removeAll(Collections.singleton(null));
... ...