Commit 4d2d1ad9 authored by 李健华's avatar 李健华

兼容查询不刷历史数据

parent feedd0bb
......@@ -188,7 +188,11 @@ public class UserServiceImpl implements IUserService, IBaseController {
@Override
// @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneWithCache(String phone) {
return userRepository.findByEncryptedPhoneNo(phone);
User user = userRepository.findByEncryptedPhoneNo(phone);
if (user == null) {
user = userRepository.findByPhoneNo(phone);
}
return user;
}
@Override
......
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