Ver código fonte

账号停用启用状态码修改

gao.qiang 2 anos atrás
pai
commit
e58949507b

+ 1 - 1
base-common/src/main/java/com/ozs/common/enums/UserStatus.java

@@ -7,7 +7,7 @@ package com.ozs.common.enums;
  */
 public enum UserStatus
 {
-    OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
+    OK("1", "正常"), DISABLE("2", "停用"), DELETED("3", "删除");
 
     private final String code;
     private final String info;

+ 2 - 2
base-framework/src/main/java/com/ozs/framework/web/service/UserDetailsServiceImpl.java

@@ -42,12 +42,12 @@ public class UserDetailsServiceImpl implements UserDetailsService
             log.info("登录用户:{} 不存在.", username);
             throw new ServiceException("登录用户:" + username + " 不存在");
         }
-        else if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
+        else if (UserStatus.DELETED.getCode().equals(user.getDelFlag().toString()))
         {
             log.info("登录用户:{} 已被删除.", username);
             throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
         }
-        else if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
+        else if (UserStatus.DISABLE.getCode().equals(user.getStatus().toString()))
         {
             log.info("登录用户:{} 已被停用.", username);
             throw new ServiceException("对不起,您的账号:" + username + " 已停用");