浏览代码

规范格式化

gaodm 6 年之前
父节点
当前提交
6e25aebb6e
共有 1 个文件被更改,包括 151 次插入126 次删除
  1. 151 126
      user-service/src/main/java/com/diagbot/facade/UserFacade.java

+ 151 - 126
user-service/src/main/java/com/diagbot/facade/UserFacade.java

@@ -79,28 +79,29 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 注册
      * 注册
+     *
      * @param userSaveVO 参数
      * @param userSaveVO 参数
      * @return 用户信息
      * @return 用户信息
      */
      */
-    public User createUser(UserSaveVO userSaveVO){
+    public User createUser(UserSaveVO userSaveVO) {
         User user = new User();
         User user = new User();
         BeanUtil.copyProperties(userSaveVO, user);
         BeanUtil.copyProperties(userSaveVO, user);
         user.setGmtCreate(new Date());
         user.setGmtCreate(new Date());
         ImgVerVerVO imgVerVerVO = new ImgVerVerVO();
         ImgVerVerVO imgVerVerVO = new ImgVerVerVO();
         BeanUtil.copyProperties(userSaveVO, imgVerVerVO);
         BeanUtil.copyProperties(userSaveVO, imgVerVerVO);
         User bean = findByName(user.getUsername());
         User bean = findByName(user.getUsername());
-        if(bean != null) {
+        if (bean != null) {
             throw new CommonException(ServiceErrorCode.USER_EXIST);
             throw new CommonException(ServiceErrorCode.USER_EXIST);
         }
         }
-        if(!RegexValidateUtil.checkMobileNumber(userSaveVO.getUsername())) {
+        if (!RegexValidateUtil.checkMobileNumber(userSaveVO.getUsername())) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请输入正确的手机号!");
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请输入正确的手机号!");
         }
         }
 
 
         //TODO 测试注释了图形验证和短信验证,后面要开启
         //TODO 测试注释了图形验证和短信验证,后面要开启
-//        verFacade.verifyImgVerification(imgVerVerVO); //保存时再次校验图形验证码,主要是为了防止跳过前端校验直接调用接口
+        //        verFacade.verifyImgVerification(imgVerVerVO); //保存时再次校验图形验证码,主要是为了防止跳过前端校验直接调用接口
 
 
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
-        String entryPassword= passwordEncoder.encode(user.getPassword());
+        String entryPassword = passwordEncoder.encode(user.getPassword());
         user.setPassword(entryPassword);
         user.setPassword(entryPassword);
         this.save(user);
         this.save(user);
 
 
@@ -112,16 +113,16 @@ public class UserFacade extends UserServiceImpl {
 
 
         //用户认证业务
         //用户认证业务
         doUserAuthentication(userSaveVO, user);
         doUserAuthentication(userSaveVO, user);
-        return  user;
+        return user;
     }
     }
 
 
 
 
     /**
     /**
-     * @param page 分页参数
+     * @param page       分页参数
      * @param userSaveVO 参数
      * @param userSaveVO 参数
      * @return 用户列表
      * @return 用户列表
      */
      */
-    public RespDTO<IPage<User>> index(Page page, UserSaveVO userSaveVO){
+    public RespDTO<IPage<User>> index(Page page, UserSaveVO userSaveVO) {
         User user = new User();
         User user = new User();
         BeanUtil.copyProperties(userSaveVO, user);
         BeanUtil.copyProperties(userSaveVO, user);
         IPage<User> res = this.indexPage(page, user);
         IPage<User> res = this.indexPage(page, user);
@@ -131,8 +132,9 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 添加一条默认用户认证信息
      * 添加一条默认用户认证信息
+     *
      * @param userSaveVO 参数
      * @param userSaveVO 参数
-     * @param user 参数
+     * @param user       参数
      */
      */
     public void doUserAuthentication(UserSaveVO userSaveVO, User user) {
     public void doUserAuthentication(UserSaveVO userSaveVO, User user) {
         UserAuthentication ua = new UserAuthentication();
         UserAuthentication ua = new UserAuthentication();
@@ -144,11 +146,12 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 如果机构已存在,只要添加用户与机构的映射即可;如果机构不存在,先添加机构信息
      * 如果机构已存在,只要添加用户与机构的映射即可;如果机构不存在,先添加机构信息
+     *
      * @param userSaveVO 参数
      * @param userSaveVO 参数
-     * @param user 参数
+     * @param user       参数
      */
      */
     public void doPermisson(UserSaveVO userSaveVO, User user) {
     public void doPermisson(UserSaveVO userSaveVO, User user) {
-        UserRole  userRole = new UserRole();
+        UserRole userRole = new UserRole();
         userRole.setUserId(user.getId());
         userRole.setUserId(user.getId());
         userRole.setRoleId(1L);
         userRole.setRoleId(1L);
         userRole.setGmtCreate(new Date());
         userRole.setGmtCreate(new Date());
@@ -158,8 +161,9 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 如果机构已存在,只要添加用户与机构的映射即可;如果机构不存在,先添加机构信息
      * 如果机构已存在,只要添加用户与机构的映射即可;如果机构不存在,先添加机构信息
+     *
      * @param userSaveVO 参数
      * @param userSaveVO 参数
-     * @param user 参数
+     * @param user       参数
      */
      */
     public void doOrganization(UserSaveVO userSaveVO, User user) {
     public void doOrganization(UserSaveVO userSaveVO, User user) {
         Map<String, Object> paramMap = new HashMap<>();
         Map<String, Object> paramMap = new HashMap<>();
@@ -167,7 +171,7 @@ public class UserFacade extends UserServiceImpl {
         paramMap.put("name", name);
         paramMap.put("name", name);
         Long orgId = 0L;
         Long orgId = 0L;
         List<Organization> list = organizationFacade.selectByMap(paramMap);
         List<Organization> list = organizationFacade.selectByMap(paramMap);
-        if(ListUtil.isEmpty(list)) {
+        if (ListUtil.isEmpty(list)) {
             Organization org = new Organization();
             Organization org = new Organization();
             org.setName(name);
             org.setName(name);
             org.setGmtCreate(new Date());
             org.setGmtCreate(new Date());
@@ -180,7 +184,7 @@ public class UserFacade extends UserServiceImpl {
             paramMap1.put("organization_id", orgId);
             paramMap1.put("organization_id", orgId);
             paramMap1.put("is_deleted", "N");
             paramMap1.put("is_deleted", "N");
             List<UserOrganization> res1 = userOrganizationFacade.selectByMap(paramMap1);
             List<UserOrganization> res1 = userOrganizationFacade.selectByMap(paramMap1);
-            if(ListUtil.isNotEmpty(res1)) {
+            if (ListUtil.isNotEmpty(res1)) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该机构下已存在用户,不能再添加别的用户!");
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该机构下已存在用户,不能再添加别的用户!");
             }
             }
         }
         }
@@ -194,36 +198,46 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 根据用户名获取用户信息
      * 根据用户名获取用户信息
+     *
      * @param username 用户名
      * @param username 用户名
      * @return 用户信息
      * @return 用户信息
      */
      */
     //@Cacheable(value = "UserName", key = "'username:'+#p0")
     //@Cacheable(value = "UserName", key = "'username:'+#p0")
-    public User  getUserInfo(String username){
+    public User getUserInfo(String username) {
         return this.findByName(username);
         return this.findByName(username);
     }
     }
 
 
 
 
     /**
     /**
      * 登录
      * 登录
+     *
      * @param username 用户名
      * @param username 用户名
      * @param password 密码
      * @param password 密码
      * @return 登录相关信息
      * @return 登录相关信息
      */
      */
-    public RespDTO login(String username , String password){
-        User user= this.findByName(username);
-        if(null==user){
+    public RespDTO login(String username, String password) {
+        if (StringUtil.isBlank(username)) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
+                    "请输入手机号!");
+        }
+        if (StringUtil.isBlank(password)) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
+                    "请输入密码!");
+        }
+        User user = this.findByName(username);
+        if (null == user) {
             throw new CommonException(ServiceErrorCode.USER_NOT_FOUND);
             throw new CommonException(ServiceErrorCode.USER_NOT_FOUND);
         }
         }
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
-        if(!passwordEncoder.matches(password,user.getPassword())){
+        if (!passwordEncoder.matches(password, user.getPassword())) {
             throw new CommonException(ServiceErrorCode.USER_PASSWORD_ERROR);
             throw new CommonException(ServiceErrorCode.USER_PASSWORD_ERROR);
         }
         }
         JWT jwt = authServiceClient.getToken("Basic dWFhLXNlcnZpY2U6MTIzNDU2", "password", username, password);
         JWT jwt = authServiceClient.getToken("Basic dWFhLXNlcnZpY2U6MTIzNDU2", "password", username, password);
         // 获得用户菜单
         // 获得用户菜单
-        if(null==jwt){
+        if (null == jwt) {
             throw new CommonException(ServiceErrorCode.GET_TOKEN_FAIL);
             throw new CommonException(ServiceErrorCode.GET_TOKEN_FAIL);
         }
         }
-        LoginDTO loginDTO=new LoginDTO();
+        LoginDTO loginDTO = new LoginDTO();
         //添加用户
         //添加用户
         loginDTO.setUser(user);
         loginDTO.setUser(user);
         //添加token
         //添加token
@@ -241,10 +255,11 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 递归获取菜单结构
      * 递归获取菜单结构
+     *
      * @param menuList 菜单参数
      * @param menuList 菜单参数
      */
      */
     public void getMenuStruct(List<MenuWrapper> menuList) {
     public void getMenuStruct(List<MenuWrapper> menuList) {
-        for(MenuWrapper m : menuList) {
+        for (MenuWrapper m : menuList) {
             m.setSubMenuList(recursion(m));
             m.setSubMenuList(recursion(m));
         }
         }
     }
     }
@@ -252,6 +267,7 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 递归查询菜单信息
      * 递归查询菜单信息
+     *
      * @param m 参数
      * @param m 参数
      * @return 菜单信息
      * @return 菜单信息
      */
      */
@@ -266,50 +282,52 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 获取用户相关信息和机构信息
      * 获取用户相关信息和机构信息
+     *
      * @param userIds 用户ids
      * @param userIds 用户ids
      * @return 用户相关信息和机构信息
      * @return 用户相关信息和机构信息
      */
      */
     public Map<Long, UserOrgDTO> getUserAndOrg(List<Long> userIds) {
     public Map<Long, UserOrgDTO> getUserAndOrg(List<Long> userIds) {
         Map<Long, UserOrgDTO> data = new HashMap();
         Map<Long, UserOrgDTO> data = new HashMap();
-        if(ListUtil.isEmpty(userIds)) {
+        if (ListUtil.isEmpty(userIds)) {
             return data;
             return data;
         }
         }
         List<UserOrgDTO> list = this.getUserOrgByIds(userIds);
         List<UserOrgDTO> list = this.getUserOrgByIds(userIds);
-//        for(UserOrgDTO bean : list) {
-//            data.put(bean.getUserId(), bean);
-//        }
-        data = EntityUtil.makeEntityMap(list,"userId");
+        //        for(UserOrgDTO bean : list) {
+        //            data.put(bean.getUserId(), bean);
+        //        }
+        data = EntityUtil.makeEntityMap(list, "userId");
         return data;
         return data;
     }
     }
 
 
 
 
     /**
     /**
      * 重置密码
      * 重置密码
-     * @param username 用户名
-     * @param password 密码
+     *
+     * @param username     用户名
+     * @param password     密码
      * @param diffPassword 重置的密码
      * @param diffPassword 重置的密码
      * @return 重置密码是否成功
      * @return 重置密码是否成功
      */
      */
     public RespDTO resetPassword(String username, String password, String diffPassword) {
     public RespDTO resetPassword(String username, String password, String diffPassword) {
-        if (StringUtil.isBlank(username)){
+        if (StringUtil.isBlank(username)) {
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
                     "请输入手机号!");
                     "请输入手机号!");
         }
         }
-        if (StringUtil.isBlank(password)){
+        if (StringUtil.isBlank(password)) {
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
                     "请输入密码!");
                     "请输入密码!");
         }
         }
-        User user= this.findByName(username);
-        if(null==user){
+        User user = this.findByName(username);
+        if (null == user) {
             throw new CommonException(ServiceErrorCode.USER_NOT_FOUND);
             throw new CommonException(ServiceErrorCode.USER_NOT_FOUND);
         }
         }
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
-        if(!StringUtil.isBlank(diffPassword) && "Y".equals(diffPassword)) {
-            if(passwordEncoder.matches(password,user.getPassword())){
+        if (!StringUtil.isBlank(diffPassword) && "Y".equals(diffPassword)) {
+            if (passwordEncoder.matches(password, user.getPassword())) {
                 throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "修改后密码不能与修改前相同!");
                 throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "修改后密码不能与修改前相同!");
             }
             }
         }
         }
-        String entryPassword= passwordEncoder.encode(password);
+        String entryPassword = passwordEncoder.encode(password);
         user.setPassword(entryPassword);
         user.setPassword(entryPassword);
         user.setGmtModified(new Date());
         user.setGmtModified(new Date());
         this.updateById(user);
         this.updateById(user);
@@ -318,15 +336,17 @@ public class UserFacade extends UserServiceImpl {
 
 
 
 
     //---------------缓存演示开始-------------------------------------
     //---------------缓存演示开始-------------------------------------
+
     /**
     /**
      * 新建用户
      * 新建用户
+     *
      * @param user 新建用户信息输入参数
      * @param user 新建用户信息输入参数
      * @return 用户信息
      * @return 用户信息
      */
      */
     @CachePut(value = CACHE_NAME, key = "'user:'+#p0['id']")
     @CachePut(value = CACHE_NAME, key = "'user:'+#p0['id']")
-    public User saveUser(User user){
+    public User saveUser(User user) {
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
-        String entryPassword= passwordEncoder.encode(user.getPassword());
+        String entryPassword = passwordEncoder.encode(user.getPassword());
         user.setPassword(entryPassword);
         user.setPassword(entryPassword);
         user.setGmtCreate(new Date());
         user.setGmtCreate(new Date());
         user.setCreator(UserUtils.getCurrentPrincipleID());
         user.setCreator(UserUtils.getCurrentPrincipleID());
@@ -336,13 +356,14 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 更新用户信息
      * 更新用户信息
-     * @param user  更新用户信息输入参数
+     *
+     * @param user 更新用户信息输入参数
      * @return 用户信息
      * @return 用户信息
      */
      */
     @CachePut(value = CACHE_NAME, key = "'user:'+#p0['id']")
     @CachePut(value = CACHE_NAME, key = "'user:'+#p0['id']")
-    public User updateUser(User user){
+    public User updateUser(User user) {
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
-        String entryPassword= passwordEncoder.encode(user.getPassword());
+        String entryPassword = passwordEncoder.encode(user.getPassword());
         user.setPassword(entryPassword);
         user.setPassword(entryPassword);
         user.setGmtModified(new Date());
         user.setGmtModified(new Date());
         user.setModifier(UserUtils.getCurrentPrincipleID());
         user.setModifier(UserUtils.getCurrentPrincipleID());
@@ -352,139 +373,143 @@ public class UserFacade extends UserServiceImpl {
 
 
     /**
     /**
      * 根据用户ID获取用户信息
      * 根据用户ID获取用户信息
+     *
      * @param id 用户ID
      * @param id 用户ID
      * @return 用户信息
      * @return 用户信息
      */
      */
     @Override
     @Override
     @Cacheable(value = CACHE_NAME, key = "'user:'+#p0")
     @Cacheable(value = CACHE_NAME, key = "'user:'+#p0")
-    public User getById(Serializable id){
+    public User getById(Serializable id) {
         return super.getById(id);
         return super.getById(id);
     }
     }
 
 
     /**
     /**
      * 根据用户ID删除用户(物理删除)
      * 根据用户ID删除用户(物理删除)
+     *
      * @param id 用户ID
      * @param id 用户ID
      * @return 是否成功
      * @return 是否成功
      */
      */
     @Override
     @Override
     @CacheEvict(value = CACHE_NAME, key = "'user:'+#p0")
     @CacheEvict(value = CACHE_NAME, key = "'user:'+#p0")
-    public boolean removeById(Serializable id){
+    public boolean removeById(Serializable id) {
         return super.removeById(id);
         return super.removeById(id);
     }
     }
 
 
     /**
     /**
      * 获取控制台用户信息
      * 获取控制台用户信息
+     *
      * @return 用户信息
      * @return 用户信息
      */
      */
-	public GetConsoleUserInfoDTO getConsoleUserInfo() {
-		Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-	    User user = this.getById(userId);
-	    Organization organization = organizationFacade.getByUserId(userId);
+    public GetConsoleUserInfoDTO getConsoleUserInfo() {
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+        User user = this.getById(userId);
+        Organization organization = organizationFacade.getByUserId(userId);
         QueryWrapper<UserAuthentication> qw = new QueryWrapper<>();
         QueryWrapper<UserAuthentication> qw = new QueryWrapper<>();
         qw.eq("user_id", userId);
         qw.eq("user_id", userId);
         qw.eq("is_deleted", "N");
         qw.eq("is_deleted", "N");
         UserAuthentication userAuthentication = userAuthenticationFacade.getOne(qw);
         UserAuthentication userAuthentication = userAuthenticationFacade.getOne(qw);
-	        
-	    GetConsoleUserInfoDTO getConsoleUserInfoDTO = new GetConsoleUserInfoDTO();
-	    getConsoleUserInfoDTO.setUser(user);
-	    getConsoleUserInfoDTO.setOrganization(organization);
-	    getConsoleUserInfoDTO.setUserAuthentication(userAuthentication);
-	      
-	    return getConsoleUserInfoDTO;
-	}
+
+        GetConsoleUserInfoDTO getConsoleUserInfoDTO = new GetConsoleUserInfoDTO();
+        getConsoleUserInfoDTO.setUser(user);
+        getConsoleUserInfoDTO.setOrganization(organization);
+        getConsoleUserInfoDTO.setUserAuthentication(userAuthentication);
+
+        return getConsoleUserInfoDTO;
+    }
     //---------------缓存演示结束-------------------------------------
     //---------------缓存演示结束-------------------------------------
 
 
 
 
     /**
     /**
      * 远程调用,根据机构名称获取用户信息
      * 远程调用,根据机构名称获取用户信息
+     *
      * @param orgName 机构信息
      * @param orgName 机构信息
      * @return 用户ids
      * @return 用户ids
      */
      */
     public List<Long> getUserByOrgNameFac(String orgName) {
     public List<Long> getUserByOrgNameFac(String orgName) {
         List<Long> userIdList = new ArrayList<>();
         List<Long> userIdList = new ArrayList<>();
-        if(StringUtil.isEmpty(orgName)) {
+        if (StringUtil.isEmpty(orgName)) {
             return userIdList;
             return userIdList;
         }
         }
         List<User> userList = this.getUserByOrgName(orgName);
         List<User> userList = this.getUserByOrgName(orgName);
-        for(User bean : userList) {
+        for (User bean : userList) {
             userIdList.add(bean.getId());
             userIdList.add(bean.getId());
         }
         }
         return userIdList;
         return userIdList;
     }
     }
+
     /**
     /**
-	 * 
-	 * @param userExportVO
-	 * @return 导出Excel文件 
-	 */
-	public RespDTO export(UserExportVO userExportVO){
-		Map<String, Object> userMap = new HashMap<String, Object>();
-		userMap.put("startTime", userExportVO.getStartTime());
-		userMap.put("endTime", userExportVO.getEndTime());
-		List<UserInfoDTO> datas = dependentuserInfoByTime(userMap);
-		GsonUtil.toJson(datas);
-		List<String> listName = new ArrayList<>();
-
-		listName.add("用户id");
-		listName.add("记录创建时间");
-		listName.add("用户名");
-		listName.add("联系人");
-		listName.add("邮箱");
-		listName.add("机构ID");
-		listName.add("机构名称");
-		listName.add("机构属性");
-		listName.add("负责人");
-		listName.add("机构地址");
-		listName.add("上级机构id");
-		listName.add("下属机构数量");
-		listName.add("岗位信息");
-		listName.add("是否通过认证 ");
-		listName.add("认证状态");
-		
-		List<String> listId = new ArrayList<>();
-		listId.add("userId");//用户ID
-		listId.add("userGmtCreate");//记录创建时间
-		listId.add("userName");// 用户名
-		listId.add("linKman");//联系人
-		listId.add("email");// 邮箱
-		listId.add("orgId");//机构ID
-		//listId.add("orgGmtCreate");//记录创建时间
-		listId.add("orgName");//机构名称
-		listId.add("orgType");//机构属性
-		listId.add("orgPrincipal");//负责人
+     * @param userExportVO
+     * @return 导出Excel文件
+     */
+    public RespDTO export(UserExportVO userExportVO) {
+        Map<String, Object> userMap = new HashMap<String, Object>();
+        userMap.put("startTime", userExportVO.getStartTime());
+        userMap.put("endTime", userExportVO.getEndTime());
+        List<UserInfoDTO> datas = dependentuserInfoByTime(userMap);
+        GsonUtil.toJson(datas);
+        List<String> listName = new ArrayList<>();
+
+        listName.add("用户id");
+        listName.add("记录创建时间");
+        listName.add("用户名");
+        listName.add("联系人");
+        listName.add("邮箱");
+        listName.add("机构ID");
+        listName.add("机构名称");
+        listName.add("机构属性");
+        listName.add("负责人");
+        listName.add("机构地址");
+        listName.add("上级机构id");
+        listName.add("下属机构数量");
+        listName.add("岗位信息");
+        listName.add("是否通过认证 ");
+        listName.add("认证状态");
+
+        List<String> listId = new ArrayList<>();
+        listId.add("userId");//用户ID
+        listId.add("userGmtCreate");//记录创建时间
+        listId.add("userName");// 用户名
+        listId.add("linKman");//联系人
+        listId.add("email");// 邮箱
+        listId.add("orgId");//机构ID
+        //listId.add("orgGmtCreate");//记录创建时间
+        listId.add("orgName");//机构名称
+        listId.add("orgType");//机构属性
+        listId.add("orgPrincipal");//负责人
         listId.add("orgAddress");//机构地址
         listId.add("orgAddress");//机构地址
         listId.add("orgParentId");//上级机构id
         listId.add("orgParentId");//上级机构id
         listId.add("orgSubNum");//下属机构数量
         listId.add("orgSubNum");//下属机构数量
         listId.add("autPosition");//岗位信息
         listId.add("autPosition");//岗位信息
         listId.add("autIsReject");//是否通过认证 N:未通过,Y:已通过
         listId.add("autIsReject");//是否通过认证 N:未通过,Y:已通过
         listId.add("autStatus");//认证状态
         listId.add("autStatus");//认证状态
-		
-		List<UserInfoExportDTO> list = new ArrayList<>();
-		for (int i = 0; i < datas.size(); i++) {
-			UserInfoDTO userInfo = datas.get(i); 
-			list.add(new UserInfoExportDTO(String.valueOf(userInfo.getUserId()),
-					DateUtil.formatDate(userInfo.getUserGmtCreate()),
-					userInfo.getUserName(),
-					userInfo.getLinKman(),
-					userInfo.getEmail(),
-					String.valueOf(userInfo.getOrgId()),
-					userInfo.getOrgName(),
-					OrganizationTypeEnum.getName(userInfo.getOrgType()),
-					userInfo.getOrgPrincipal(),
-					userInfo.getOrgAddress(),
-					String.valueOf(userInfo.getOrgParentId()),
-					String.valueOf(userInfo.getOrgSubNum()),
-					userInfo.getAutPosition(),
-					String.valueOf(userInfo.getAutIsReject()),
-					AuthStatusEnum.getName(userInfo.getAutStatus())));
-		}
-		//response.setContentType("text/html;charset=UTF-8");
-		String filePath =userExportVO.getFilePath();//文件路径
-		String fileName = userExportVO.getFileName();//文件名
-		ExportBeanExcelUtil ex = new ExportBeanExcelUtil();
-		RespDTO resul = ex.exportExcel("测试POI导出EXCEL文档", listName, listId, list,filePath,fileName);
-		
-		return resul;
-		
-		
-	}
+
+        List<UserInfoExportDTO> list = new ArrayList<>();
+        for (int i = 0; i < datas.size(); i++) {
+            UserInfoDTO userInfo = datas.get(i);
+            list.add(new UserInfoExportDTO(String.valueOf(userInfo.getUserId()),
+                    DateUtil.formatDate(userInfo.getUserGmtCreate()),
+                    userInfo.getUserName(),
+                    userInfo.getLinKman(),
+                    userInfo.getEmail(),
+                    String.valueOf(userInfo.getOrgId()),
+                    userInfo.getOrgName(),
+                    OrganizationTypeEnum.getName(userInfo.getOrgType()),
+                    userInfo.getOrgPrincipal(),
+                    userInfo.getOrgAddress(),
+                    String.valueOf(userInfo.getOrgParentId()),
+                    String.valueOf(userInfo.getOrgSubNum()),
+                    userInfo.getAutPosition(),
+                    String.valueOf(userInfo.getAutIsReject()),
+                    AuthStatusEnum.getName(userInfo.getAutStatus())));
+        }
+        //response.setContentType("text/html;charset=UTF-8");
+        String filePath = userExportVO.getFilePath();//文件路径
+        String fileName = userExportVO.getFileName();//文件名
+        ExportBeanExcelUtil ex = new ExportBeanExcelUtil();
+        RespDTO resul = ex.exportExcel("测试POI导出EXCEL文档", listName, listId, list, filePath, fileName);
+
+        return resul;
+
+
+    }
 }
 }