|
|
@ -18,26 +18,21 @@ package com.baiye.modules.system.service.impl;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
|
import cn.hutool.core.text.CharSequenceUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.text.StrPool;
|
|
|
|
import cn.hutool.core.text.StrPool;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
|
|
|
import com.alibaba.excel.EasyExcelFactory;
|
|
|
|
import com.alibaba.excel.EasyExcelFactory;
|
|
|
|
import com.baiye.config.properties.FileProperties;
|
|
|
|
import com.baiye.config.properties.FileProperties;
|
|
|
|
import com.baiye.constant.DefaultNumberConstants;
|
|
|
|
import com.baiye.constant.DefaultNumberConstants;
|
|
|
|
import com.baiye.exception.BadRequestException;
|
|
|
|
import com.baiye.exception.BadRequestException;
|
|
|
|
import com.baiye.exception.EntityExistException;
|
|
|
|
import com.baiye.exception.EntityExistException;
|
|
|
|
import com.baiye.exception.EntityNotFoundException;
|
|
|
|
|
|
|
|
import com.baiye.model.dto.TreeUserDTO;
|
|
|
|
import com.baiye.model.dto.TreeUserDTO;
|
|
|
|
import com.baiye.model.dto.UserDto;
|
|
|
|
import com.baiye.model.dto.UserDto;
|
|
|
|
import com.baiye.model.dto.UserFavorOfExcel;
|
|
|
|
import com.baiye.model.dto.UserFavorOfExcel;
|
|
|
|
import com.baiye.modules.security.service.OnlineUserService;
|
|
|
|
import com.baiye.modules.security.service.OnlineUserService;
|
|
|
|
import com.baiye.modules.system.domain.Company;
|
|
|
|
import com.baiye.modules.system.domain.Company;
|
|
|
|
import com.baiye.modules.system.domain.OrganizeUser;
|
|
|
|
import com.baiye.modules.system.domain.OrganizeUser;
|
|
|
|
import com.baiye.modules.system.repository.OrganizeUserRepository;
|
|
|
|
|
|
|
|
import com.baiye.modules.system.service.CompanyService;
|
|
|
|
|
|
|
|
import com.baiye.service.UserCacheClean;
|
|
|
|
|
|
|
|
import com.baiye.modules.system.domain.Role;
|
|
|
|
import com.baiye.modules.system.domain.Role;
|
|
|
|
import com.baiye.modules.system.domain.User;
|
|
|
|
import com.baiye.modules.system.domain.User;
|
|
|
|
|
|
|
|
import com.baiye.modules.system.repository.OrganizeUserRepository;
|
|
|
|
import com.baiye.modules.system.repository.RoleRepository;
|
|
|
|
import com.baiye.modules.system.repository.RoleRepository;
|
|
|
|
import com.baiye.modules.system.repository.UserRepository;
|
|
|
|
import com.baiye.modules.system.repository.UserRepository;
|
|
|
|
import com.baiye.modules.system.service.CompanyService;
|
|
|
|
import com.baiye.modules.system.service.CompanyService;
|
|
|
@ -52,8 +47,6 @@ import org.springframework.cache.annotation.CacheConfig;
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
import org.springframework.security.authentication.BadCredentialsException;
|
|
|
|
|
|
|
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
|
|
|
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@ -315,7 +308,7 @@ public class UserServiceImpl implements UserService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return convert;
|
|
|
|
return convert;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
throw new UsernameNotFoundException("user not found");
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|