Commit adee1121 authored by lee_mingzhu's avatar lee_mingzhu

change something

parent e4637ce4
......@@ -37,7 +37,7 @@ public class InnerController {
@RequestMapping("/user/search/phoneNo")
public JsonResult findByPhoneNo(String phoneNo) {
User user = userService.findByPhoneInRedisIfExist(phoneNo);
User user = userService.findByPhoneInDb(phoneNo);
if (user == null) {
return JsonResult.buildErrorStateResult("", null);
}
......
......@@ -196,7 +196,7 @@ public class Jr58Controller implements ApplicationEventPublisherAware {
LOGGER.error("58金融运营商授权数据导入接口 - uuid对应的UuidPhoneMapping为空");
}
// 手机号在新系统中存在,说明之前已经注册过
userInXyqb = xyqbUserService.findByPhoneInRedisIfExist(phoneNo);
userInXyqb = xyqbUserService.findByPhone(phoneNo);
if (userInXyqb != null) {
String token = authApiService.login(phoneNo, Constants.Channel.JR58);
return new Tuple<>(String.format(ENTRY_POINT_URL_TEMPLATE, xyqbUrl, token), userInXyqb);
......
......@@ -58,7 +58,7 @@ public class SyncUserController {
return JsonResult.buildErrorStateResult(null, null);
}
String phoneNo = userDetail.getPhoneNo();
User user = userService.findByPhoneInRedisIfExist(phoneNo);
User user = userService.findByPhone(phoneNo);
if (null == user) {
return JsonResult.buildErrorStateResult(null, null);
}
......
......@@ -50,7 +50,7 @@ public class UserApiController {
if (!"abc1234".equals(key) || StringUtils.isEmpty(phoneNo)) {
return JsonResult.buildErrorStateResult(null, null);
}
User user = userService.findByPhoneInRedisIfExist(phoneNo);
User user = userService.findByPhone(phoneNo);
if (null == user) {
return JsonResult.buildErrorStateResult(null, null);
}
......
......@@ -97,7 +97,7 @@ public class UserController implements IBaseController {
}
String userName = credentialArr[0];
String pass = credentialArr[1];
User user = userService.findByPhoneInRedisIfExist(userName);
User user = userService.findByPhone(userName);
if(user == null){
return JsonResult.buildErrorStateResult("用户名或密码不正确", null);
}
......@@ -190,7 +190,7 @@ public class UserController implements IBaseController {
LOGGER.info("用户快速登录,验证码校验失败,phoneNo:{} , verificationCode:{}", phoneNo, verificationCode);
return JsonResult.buildErrorStateResult("验证码错误", null);
}
User user = userService.findByPhoneInRedisIfExist(phoneNo);
User user = userService.findByPhone(phoneNo);
if(user == null){
user = registerFastWhenLogin(phoneNo, channelId, createdFrom, appChannel);
if (user == null) {
......
......@@ -7,7 +7,7 @@ import cn.quantgroup.xyqb.entity.User;
*/
public interface IUserService {
//User findByPhone(String phone);
User findByPhone(String phone);
User findByUuid(String uuid);
......@@ -19,7 +19,7 @@ public interface IUserService {
boolean resetPassword(String phoneNo, String password);
User findByPhoneInRedisIfExist(String phone);
User findByPhoneInDb(String phone);
User findByUuidInDb(String uuid);
......
......@@ -77,11 +77,11 @@ public class UserServiceImpl implements IUserService {
}
/*@Override
@Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhone(String phone) {
return userRepository.findByPhoneNo(phone);
}*/
}
@Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #uuid", unless = "#result == null", cacheManager = "cacheManager")
......
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