kidgrow-springcloud/kidgrow-springcloud-zuul/src/main/java/com/kidgrow/zuul/filter/OrganizationFilter.java
@@ -137,12 +137,6 @@ public List<SysUserOrg> getSysUserOrg(Long str) { //获取组织 Redis中获取 List<SysUserOrg> sysUserOrgs = JSON.parseArray(JSON.toJSONString(redisUtils.hget(RedisConstant.USER_ORGANIZATION, str.toString())), SysUserOrg.class); System.out.println("3333333333333333333333"); System.out.println(sysUserOrgs.size()); for (SysUserOrg sysUserOrg : sysUserOrgs) { System.out.println(sysUserOrg.getFromLevel()); } System.out.println("444444444444444444"); if (sysUserOrgs == null || sysUserOrgs.size() <= 0) { //在数据库查询 Map<String, Object> map = new HashMap<>(); kidgrow-springcloud/kidgrow-springcloud-zuul/src/main/java/com/kidgrow/zuul/filter/UserInfoHeaderFilter.java
@@ -113,15 +113,6 @@ List<SysOrganization> organizations = (List<SysOrganization>) user.getOrganizations(); //将组织数据 存到header 里面 if (organizations != null&&organizations.size()>0) { System.out.println(organizations.size()); System.out.println("111111111111111111111"); for (SysOrganization organization : organizations) { if(organization!=null){ System.out.println(organization.getOrgLevel()); } } System.out.println("22222222222222"); // organizations.sort((e1,e2)->e1.getOrgLevel().compareTo(e2.getOrgLevel())); ctx.addZuulRequestHeader(SecurityConstants.USER_ORG_ID_HEADER,String.valueOf(organizations.get(0).getId())); ctx.addZuulRequestHeader(SecurityConstants.USER_ORGS_HEADER,JSON.toJSONString(organizations)); }