浏览代码

登录接口逻辑修改

wangtong 1 年之前
父节点
当前提交
dfd5d5048b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java

@@ -218,7 +218,7 @@ public class SysLoginService {
         if (ObjectUtil.isNull(user)) {
         if (ObjectUtil.isNull(user)) {
             log.info("登录用户:{} 不存在.", username);
             log.info("登录用户:{} 不存在.", username);
             throw new UserException("user.not.exists", username);
             throw new UserException("user.not.exists", username);
-        }else if ("app_user".equals(user.getUserType())&&type.equals("pc")) {
+        }else if (UserType.getUserType(user.getUserType())==UserType.APP_USER&&type.equals(DeviceType.PC.getDevice())) {
             log.info("登录用户:{} 为手机端用户无权登录后台.", username);
             log.info("登录用户:{} 为手机端用户无权登录后台.", username);
             throw new UserException("user.not.apptopc.exists", username);
             throw new UserException("user.not.apptopc.exists", username);
         }
         }