浏览代码

登录用户添加用户禁用验证

andy 1 年之前
父节点
当前提交
517e035efc
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      mainFactory/src/main/java/org/bfkj/application/AuthApplicationImpl.java

+ 5 - 1
mainFactory/src/main/java/org/bfkj/application/AuthApplicationImpl.java

@@ -238,7 +238,7 @@ public class AuthApplicationImpl {
         if (applicationList == null || applicationList.isEmpty()) {
             return processFail("验证码错误或过期");
         }
-        Map<String, Object> userInfoResult = myDbHelper.queryByParamsReturnList("select user_id,token_valid_duration from t_user where user_name = ?  and user_pwd =?", username, password);
+        Map<String, Object> userInfoResult = myDbHelper.queryByParamsReturnList("select user_id,token_valid_duration,user_status from t_user where user_name = ?  and user_pwd =?", username, password);
         if (!userInfoResult.get("code").equals("0")) {
             return processFail("校验用户信息,执行异常");
         }
@@ -246,6 +246,10 @@ public class AuthApplicationImpl {
         if (null == userInfoList || userInfoList.isEmpty()) {
             return processFail("用户名或密码错误");
         }
+        String userStatus = userInfoList.get(0).get("user_status").toString();
+        if (Objects.equals(userStatus,"0")) {
+            return processFail("用户名被禁用");
+        }
         String userID = userInfoList.get(0).get("user_id").toString();
         String userToken = MapTools.getMD5Str(String.valueOf(new Date().getTime()));
         try {