|
@@ -50,14 +50,15 @@ public class LoginController extends BaseController{
|
|
|
|| StringUtils.isBlank(param.getCode()) || StringUtils.isBlank(param.getDeptId())){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
- String id = request.getSession().getId();
|
|
|
+ //String id = request.getSession().getId();
|
|
|
+ String id = param.getCode();
|
|
|
if(!redisUtil.hasKey(String.format(RedisKeyUtil.loginAuthCode,id))){
|
|
|
throw new BusinessException(ResultCode.LOGIN_AUTH_NOT_EXIST);
|
|
|
}
|
|
|
if(!redisUtil.get(String.format(RedisKeyUtil.loginAuthCode,id)).equals(param.getCode())){
|
|
|
throw new BusinessException(ResultCode.LOGIN_AUTH_NOT_EXIST);
|
|
|
}
|
|
|
- redisUtil.del(String.format(RedisKeyUtil.loginAuthCode,param.getCode()));
|
|
|
+ redisUtil.del(String.format(RedisKeyUtil.loginAuthCode,id));
|
|
|
TmUser tmUser = tmUserService.getByUserName(param.getPhoneNum());
|
|
|
if(tmUser == null){
|
|
|
throw new BusinessException(ResultCode.PASSWORD_ERROR);
|