Commit 1333b323 authored by 李健华's avatar 李健华

Merge branch 'hotfix/EncryptedPhoneNo-null-20221020' into 'master'

查询判断加密手机号为空时返回null

See merge request !98
parents b795a618 361456e7
......@@ -153,6 +153,9 @@ public class UserServiceImpl implements IUserService, IBaseController {
@Override
// @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneInDb(String phone) {
if (StringUtils.isBlank(phone)) {
return null;
}
User user = userRepository.findByEncryptedPhoneNo(phone);
if (user == null) {
user = userRepository.findByPhoneNo(phone);
......@@ -230,6 +233,9 @@ public class UserServiceImpl implements IUserService, IBaseController {
@Override
// @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneWithCache(String phone) {
if (StringUtils.isBlank(phone)) {
return null;
}
User user = userRepository.findByEncryptedPhoneNo(phone);
if (user == null) {
user = userRepository.findByPhoneNo(phone);
......
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