| | |
| | | import com.xcong.excoin.common.system.bean.LoginUserBean; |
| | | import com.xcong.excoin.modules.member.dao.MemberDao; |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.utils.MessageSourceUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.core.GrantedAuthority; |
| | | import org.springframework.security.core.userdetails.UserDetailsService; |
| | |
| | | |
| | | @Override |
| | | public LoginUserBean loadUserByUsername(String username) throws UsernameNotFoundException { |
| | | log.info("#登陆账号:{}#", username); |
| | | //log.info("#登陆账号:{}#", username); |
| | | List<GrantedAuthority> grantedAuthorities = new ArrayList<>(); |
| | | // GrantedAuthority grantedAuthority = new SimpleGrantedAuthority("ROLE_ADMIN"); |
| | | // grantedAuthorities.add(grantedAuthority); |
| | |
| | | } |
| | | |
| | | if (MemberEntity.ACCOUNT_STATUS_DISABLED == memberEntity.getAccountStatus()) { |
| | | throw new GlobalException("账号已被禁用"); |
| | | throw new GlobalException(MessageSourceUtils.getString("member_service_0092")); |
| | | } |
| | | |
| | | return new LoginUserBean(memberEntity, null, null); |