Преглед изворни кода

组织架构中 同步企微通讯录 新增【可见范围设置】按钮 修改
登录获取企业管理员列表 修改

yurk пре 2 година
родитељ
комит
d2946d1c21

+ 6 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -444,8 +444,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         HttpRespMsg msg=new HttpRespMsg();
         User user= userMapper.selectById(request.getHeader("token"));
         List<User> adminList = wxCorpInfoService.getAdminList(user.getCompanyId());
-        boolean match = adminList.stream().anyMatch(al -> user.getCorpwxUserid() != null && al.getCorpwxUserid() != null && al.getCorpwxUserid().equals(user.getCorpwxUserid()));
-        msg.data=match;
+        /*boolean match = adminList.stream().anyMatch(al -> user.getCorpwxUserid() != null && al.getCorpwxUserid() != null && al.getCorpwxUserid().equals(user.getCorpwxUserid()));*/
+        if(adminList!=null){
+            boolean match = adminList.stream().anyMatch(al -> al.getId().equals(user.getId()));
+            msg.data=match;
+        }
+        msg.data=false;
         return msg;
     }