Commit 816cf521 authored by hezhen's avatar hezhen

123

parent 13f1719f
...@@ -249,6 +249,9 @@ public class AppPermissionService { ...@@ -249,6 +249,9 @@ public class AppPermissionService {
if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(mobilecode)) { if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(mobilecode)) {
return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空"); return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空");
} }
if(StringUtils.isNotBlank(code)&&appUserDetailBiz.getUserByCode(code)==0){
return JsonResultUtil.createFailedResult(ResultCode.NOTEXIST_CODE, "邀请人不存在");
}
String redisLockKey = RedisKey.CONSTANT_CODE_PREFIX + username + mobilecode; String redisLockKey = RedisKey.CONSTANT_CODE_PREFIX + username + mobilecode;
String mobilecodeRedis = userRedisTemplate.opsForValue().get(redisLockKey) == null ? "" : userRedisTemplate.opsForValue().get(redisLockKey).toString(); String mobilecodeRedis = userRedisTemplate.opsForValue().get(redisLockKey) == null ? "" : userRedisTemplate.opsForValue().get(redisLockKey).toString();
log.info("注册接口,获取redis中的验证码:" + mobilecodeRedis+"---time===="+System.currentTimeMillis()/1000L); log.info("注册接口,获取redis中的验证码:" + mobilecodeRedis+"---time===="+System.currentTimeMillis()/1000L);
...@@ -257,9 +260,6 @@ public class AppPermissionService { ...@@ -257,9 +260,6 @@ public class AppPermissionService {
if (StringUtils.isBlank(mobilecodeRedis)) { if (StringUtils.isBlank(mobilecodeRedis)) {
return JsonResultUtil.createFailedResult(ResultCode.NOTEXIST_CODE, "验证码错误"); return JsonResultUtil.createFailedResult(ResultCode.NOTEXIST_CODE, "验证码错误");
} }
if(StringUtils.isNotBlank(code)&&appUserDetailBiz.getUserByCode(code)==0){
return JsonResultUtil.createFailedResult(ResultCode.NOTEXIST_CODE, "邀请人不存在");
}
// 是否已存在 // 是否已存在
AppUserLogin user = appUserLoginBiz.checkeUserLogin(username); AppUserLogin user = appUserLoginBiz.checkeUserLogin(username);
if (null != user) { if (null != user) {
......
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