Commit fd38d52c authored by hezhen's avatar hezhen

Merge branch 'master_position'

parents 6b67dc15 816cf521
......@@ -249,6 +249,9 @@ public class AppPermissionService {
if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(mobilecode)) {
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 mobilecodeRedis = userRedisTemplate.opsForValue().get(redisLockKey) == null ? "" : userRedisTemplate.opsForValue().get(redisLockKey).toString();
log.info("注册接口,获取redis中的验证码:" + mobilecodeRedis+"---time===="+System.currentTimeMillis()/1000L);
......@@ -590,7 +593,10 @@ public class AppPermissionService {
if (register.getInteger("status") == ResultCode.EXIST_CODE) {
return JsonResultUtil.createFailedResult(ResultCode.EXIST_CODE, "用户已存在");
}
return JsonResultUtil.createFailedResult(register.getInteger("code"), "操作失败");
if (register.getInteger("status") == ResultCode.NOTEXIST_CODE) {
return JsonResultUtil.createFailedResult(ResultCode.NOTEXIST_CODE, register.getString("message"));
}
return JsonResultUtil.createFailedResult(register.getInteger("status"), "操作失败");
}
return register;
......
......@@ -68,7 +68,7 @@ public class UserBiz {
String result = this.doPost(imUrl + "/user/register",str) ;
JSONObject json = JSONObject.parseObject(result);
//如果已经注册过,查询出手机号对应用户信息执行登录返回
if(0 == json.getInteger("resultCode")){
if(0 == json.getInteger("resultCode")||1040107 == json.getInteger("resultCode")){
String phone = map.get("telephone").toString();
Query query = new Query(Criteria.where("phone").is(phone));
User mgt = mongoTemplate.findOne(query, User.class);
......
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