diff --git a/ym-admin/src/main/java/com/cnbm/admin/service/impl/UserDetailsServiceImpl.java b/ym-admin/src/main/java/com/cnbm/admin/service/impl/UserDetailsServiceImpl.java index dcee45d..389c4c9 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/service/impl/UserDetailsServiceImpl.java +++ b/ym-admin/src/main/java/com/cnbm/admin/service/impl/UserDetailsServiceImpl.java @@ -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());