fix: 修改sercurity的UserDetailsService的实现类
This commit is contained in:
		@@ -7,6 +7,7 @@ import com.cnbm.admin.dto.SysUserDTO;
 | 
			
		||||
import com.cnbm.admin.entity.LoginUser;
 | 
			
		||||
import com.cnbm.admin.entity.SysMenuEntity;
 | 
			
		||||
import com.cnbm.admin.entity.SysUserEntity;
 | 
			
		||||
import com.cnbm.admin.exception.LoginStatusException;
 | 
			
		||||
import com.cnbm.admin.service.SysMenuService;
 | 
			
		||||
import com.cnbm.common.utils.ConvertUtils;
 | 
			
		||||
import lombok.extern.log4j.Log4j2;
 | 
			
		||||
@@ -48,7 +49,7 @@ public class UserDetailsServiceImpl implements UserDetailsService {
 | 
			
		||||
            throw new UsernameNotFoundException("用户名不存在");
 | 
			
		||||
        }
 | 
			
		||||
        if (sysUserEntity.getStatus() == 0) {
 | 
			
		||||
            throw new DisabledException("该账户已被禁用,请联系管理员");
 | 
			
		||||
            throw new LoginStatusException("该账户已被禁用,请联系管理员");
 | 
			
		||||
        }
 | 
			
		||||
        log.info("sysUserEntity的值是"+sysUserEntity.toString());
 | 
			
		||||
        log.info("sysUserEntity.getSuperAdmin()=="+sysUserEntity.getSuperAdmin());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user