解决注册验证码错误问题、日志报空指针问题
This commit is contained in:
parent
90e93b2774
commit
6024588155
@ -108,7 +108,7 @@ public class XhpcAppUserController extends BaseController {
|
||||
/**
|
||||
* C端用户注册
|
||||
*/
|
||||
@Log(title = "C端用户--注册", businessType = BusinessType.INSERT)
|
||||
//@Log(title = "C端用户--注册", businessType = BusinessType.INSERT)
|
||||
@ApiOperation("注册")
|
||||
@PostMapping("/register")
|
||||
public R<?> register(@RequestBody Map<String, Object> map) {
|
||||
|
||||
@ -149,8 +149,11 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
|
||||
return R.fail(HttpStatus.NOT_NULL, "验证码不能为空");
|
||||
}
|
||||
String captcha = redisService.getCacheObject("pvToken:" + phone);
|
||||
if(captcha==null || "".equals(captcha)){
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
}
|
||||
if (!code.equalsIgnoreCase(captcha)) {
|
||||
R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
}
|
||||
XhpcAppUser info = xhpcAppUserMapper.getAppUserByPhone(phone,tenantId);
|
||||
if (StringUtils.isNotNull(info)) {
|
||||
@ -209,11 +212,15 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
|
||||
String openid = StringUtils.valueOf(map.get("openid"));
|
||||
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
|
||||
logger.info("<<<<<<<<<<登录openid>>>>>>>>>>>>"+openid);
|
||||
|
||||
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
|
||||
if (StringUtils.isEmpty(openid)) {
|
||||
return R.fail(HttpStatus.NOT_NULL, "openid不能为空");
|
||||
}
|
||||
String captcha = redisService.getCacheObject("pvToken:" + phone);
|
||||
if(null ==captcha || "".equals(captcha)){
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
}
|
||||
if (!code.equalsIgnoreCase(captcha)) {
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
}
|
||||
@ -530,6 +537,9 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
|
||||
return R.fail(HttpStatus.NOT_NULL, "手机号不能为空");
|
||||
}
|
||||
String captcha = redisService.getCacheObject("pvToken:" + phone);
|
||||
if(null ==captcha || "".equals(captcha)){
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
}
|
||||
if (!code.equalsIgnoreCase(captcha)) {
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user