Commit 6a164a8f authored by m1991's avatar m1991

登录模块——登录功能修复

parent 894056c1
......@@ -240,7 +240,6 @@
select id as id,
user_id as userId,
password as password,
userName as userName,
user_level as userLevel,
cross_border_line as crossBorderLine,
id_card_number as idCardNumber,
......@@ -263,9 +262,7 @@
<if test="salt != null and salt!=''">
and userLevel=#{userLevel}
</if>
<if test="userName != null and userName!=''">
and crossBorderLine=#{crossBorderLine}
</if>
<if test="sex != null">
and idCardNumber=#{idCardNumber}
</if>
......
......@@ -122,11 +122,9 @@ public class LoginController {
map.put("code","2001");
map.put("msg","未登录");
return map;
///throw new BaseException(ResultEnum.FILE_NOT_LOGIN);
}
UsersDto usersDto=JSONObject.parseObject(userDtoJson,UsersDto.class);
usersDto.setPassword(null);
return (Map) ResultUtils.returnDataSuccess(userDtoJson);
}
......@@ -169,33 +167,19 @@ public class LoginController {
String key= StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.SMS_PRIFIX,userId,Constants.Sms.CodeType.LOGIN_OR_REGISTER+"");
String redisCode=redisUtils.getValue(key);
if(StringUtil.isBlank(redisCode) || !sms.equals(redisCode)){
// try {
// throw new BaseException(ResultEnum.FAIL_VERIFY);
//
// } catch (BaseException e) {
Map map=new HashMap();
map.put("code","1003");
map.put("msg","验证码错误");
// throw new BaseException(ResultEnum.FAIL_VERIFY);
return map;
// }
}
redisUtils.delete(key);
//判断phone是否符合输入类型
if(!userId.matches(Constants.RegConstant.PHONE_REGSTR)){
// try {
// throw new BaseException(ResultEnum.PHONE_ERROR);
// } catch (BaseException e) {
// e.printStackTrace();
Map map=new HashMap();
map.put("code","1008");
map.put("msg","手机号码格式不正确");
// throw new BaseException(ResultEnum.FAIL_VERIFY);
return map;
// }
}
return usersService.userByZx(userId,beInvitedCode);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment