fix: 修改sercurity的UserDetailsService的实现类
Dieser Commit ist enthalten in:
Ursprung
4fe4936dfd
Commit
3a30a2a34c
@ -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());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren