|
@@ -280,14 +280,14 @@ public class LoginToWebsiteController {
|
|
|
@MyRequestBody String countryCode) throws UnsupportedEncodingException
|
|
|
{
|
|
|
// 校验短信验证码
|
|
|
-// String smsCodeKey = CacheConstants.getSmsCodeKey(loginMoblie);
|
|
|
-// RBucket<String> bucket = redissonClient.getBucket(smsCodeKey);
|
|
|
-// String redisCode = bucket.get();
|
|
|
-// if(StringUtils.isBlank(redisCode) || !redisCode.equals(smsCode)){
|
|
|
-// return ResponseResult.error(ErrorCodeEnum.SMS_CODE_ERR);
|
|
|
-// }
|
|
|
-// // 短信验证码校验成功,清除验证码
|
|
|
-// bucket.delete();
|
|
|
+ String smsCodeKey = CacheConstants.getSmsCodeKey(loginMoblie);
|
|
|
+ RBucket<String> bucket = redissonClient.getBucket(smsCodeKey);
|
|
|
+ String redisCode = bucket.get();
|
|
|
+ if(StringUtils.isBlank(redisCode) || !redisCode.equals(smsCode)){
|
|
|
+ return ResponseResult.error(ErrorCodeEnum.SMS_CODE_ERR);
|
|
|
+ }
|
|
|
+ // 短信验证码校验成功,清除验证码
|
|
|
+ bucket.delete();
|
|
|
// 查询用户信息
|
|
|
TourUser tourUser = tourUserService.getOne(Wrappers.<TourUser>lambdaQuery().eq(TourUser::getMobile, loginMoblie));
|
|
|
// 如果用户信息不存在,则新建
|