diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java index a8290ab4..cf49bc3d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java @@ -281,6 +281,12 @@ public class AdminAuthServiceImpl implements AdminAuthService { createLoginLog(user.getId(), phoneNumber, logTypeEnum, LoginResultEnum.USER_DISABLED); throw exception(AUTH_LOGIN_USER_DISABLED); } + // 校验账号是否为工厂用户 + if (user.getUserType() == 2) { + createLoginLog(null, phoneNumber, logTypeEnum, LoginResultEnum.BAD_CREDENTIALS); + throw exception(AUTH_MOBILE_NOT_EXISTS); + } + //清空openId userService.emptyOpenId(reqVO.getOpenId()); //绑定用户openId