Commit f2b7aadb authored by xiaoguang.xu's avatar xiaoguang.xu

Merge branch 'cleanCache' into baseEntity

parents f59b7352 5ec6d230
...@@ -34,7 +34,7 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService { ...@@ -34,7 +34,7 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService {
@Resource @Resource
private IUserRepository userRepository; private IUserRepository userRepository;
@Cacheable(value = "user_authorized_idno_cache", key = "#idNo", unless = "#result == false", cacheManager = "cacheManager") // @Cacheable(value = "user_authorized_idno_cache", key = "#idNo", unless = "#result == false", cacheManager = "cacheManager")
@Override @Override
public Boolean hasUserAuthorized(String idNo) { public Boolean hasUserAuthorized(String idNo) {
try { try {
...@@ -92,7 +92,7 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService { ...@@ -92,7 +92,7 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService {
} }
} }
@Cacheable(value = "user_authorized_uuid_2_id_cache", key = "#userUuid", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "user_authorized_uuid_2_id_cache", key = "#userUuid", unless = "#result == null", cacheManager = "cacheManager")
@Override @Override
public String getUserAuthorizedId(String userUuid) { public String getUserAuthorizedId(String userUuid) {
if (StringUtils.isBlank(userUuid)) { if (StringUtils.isBlank(userUuid)) {
......
...@@ -22,7 +22,7 @@ public class AddressServiceImpl implements IAddressService { ...@@ -22,7 +22,7 @@ public class AddressServiceImpl implements IAddressService {
private IAddressRepository addressRepository; private IAddressRepository addressRepository;
@Override @Override
@Cacheable(value = "addresscache", key = "'address' + #userId", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "addresscache", key = "'address' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public Address findByUserId(Long userId) { public Address findByUserId(Long userId) {
return addressRepository.findByUserId(userId); return addressRepository.findByUserId(userId);
} }
......
...@@ -28,7 +28,7 @@ public class ContactServiceImpl implements IContactService { ...@@ -28,7 +28,7 @@ public class ContactServiceImpl implements IContactService {
private IContactRepository contactRepository; private IContactRepository contactRepository;
@Override @Override
@Cacheable(value = "contact", key = "'contact:' + #trim + #userId", unless = "#result == null or #result.size() == 0", cacheManager = "cacheManager") // @Cacheable(value = "contact", key = "'contact:' + #trim + #userId", unless = "#result == null or #result.size() == 0", cacheManager = "cacheManager")
public List<Contact> findByUserId(Long userId, boolean trim) { public List<Contact> findByUserId(Long userId, boolean trim) {
List<Contact> contacts = contactRepository.findByUserId(userId); List<Contact> contacts = contactRepository.findByUserId(userId);
if (trim) { if (trim) {
......
...@@ -20,7 +20,7 @@ public class UserBtRegisterServiceImpl implements IUserBtRegisterService { ...@@ -20,7 +20,7 @@ public class UserBtRegisterServiceImpl implements IUserBtRegisterService {
private IUserBtRegisterRepository userBtRegisterRepository; private IUserBtRegisterRepository userBtRegisterRepository;
@Override @Override
@Cacheable(value = "btRegisterCache", key = "'userId' + #userId", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "btRegisterCache", key = "'userId' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public UserBtRegister findByUserId(Long userId) { public UserBtRegister findByUserId(Long userId) {
if (null != userId) { if (null != userId) {
return userBtRegisterRepository.findOne((root, query, cb) -> { return userBtRegisterRepository.findOne((root, query, cb) -> {
......
...@@ -28,7 +28,7 @@ public class UserCenterServiceImpl implements UserCenterService { ...@@ -28,7 +28,7 @@ public class UserCenterServiceImpl implements UserCenterService {
private IUserAttachedRepository userAttachedRepository; private IUserAttachedRepository userAttachedRepository;
@Override @Override
@Cacheable(value = "userAttachedCache", key = "'xyqbUserAttached' + #userId", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "userAttachedCache", key = "'xyqbUserAttached' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public UserAttached searchUserAttachedByUserId(long userId) { public UserAttached searchUserAttachedByUserId(long userId) {
return userAttachedRepository.findByUserId(userId); return userAttachedRepository.findByUserId(userId);
} }
......
...@@ -21,7 +21,7 @@ public class UserExtInfoServiceImpl implements IUserExtInfoService { ...@@ -21,7 +21,7 @@ public class UserExtInfoServiceImpl implements IUserExtInfoService {
private IUserExtInfoRepository userExtInfoRepository; private IUserExtInfoRepository userExtInfoRepository;
@Override @Override
@Cacheable(value = "userextinfocache", key = "'extinfo' + #userId", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "userextinfocache", key = "'extinfo' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public UserExtInfo findByUserId(Long userId) { public UserExtInfo findByUserId(Long userId) {
return userExtInfoRepository.findByUserId(userId); return userExtInfoRepository.findByUserId(userId);
} }
......
...@@ -82,7 +82,7 @@ public class UserServiceImpl implements IUserService, IBaseController { ...@@ -82,7 +82,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
private IContactService contactService; private IContactService contactService;
@Override @Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneInDb(String phone) { public User findByPhoneInDb(String phone) {
return userRepository.findByPhoneNo(phone); return userRepository.findByPhoneNo(phone);
} }
...@@ -136,13 +136,13 @@ public class UserServiceImpl implements IUserService, IBaseController { ...@@ -136,13 +136,13 @@ public class UserServiceImpl implements IUserService, IBaseController {
} }
@Override @Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneWithCache(String phone) { public User findByPhoneWithCache(String phone) {
return userRepository.findByPhoneNo(phone); return userRepository.findByPhoneNo(phone);
} }
@Override @Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #uuid", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "usercache", key = "'xyqbuser' + #uuid", unless = "#result == null", cacheManager = "cacheManager")
public User findByUuidWithCache(String uuid) { public User findByUuidWithCache(String uuid) {
return userRepository.findByUuid(uuid); return userRepository.findByUuid(uuid);
} }
......
...@@ -15,7 +15,7 @@ public class UserSpouseServiceImpl implements IUserSpouseService { ...@@ -15,7 +15,7 @@ public class UserSpouseServiceImpl implements IUserSpouseService {
private IUserSpouseRepository userSpouseRepository; private IUserSpouseRepository userSpouseRepository;
@Override @Override
@Cacheable(value = "userSpouseCache", key = "'spouse' + #userId", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "userSpouseCache", key = "'spouse' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public UserSpouse findByUserId(Long userId) { public UserSpouse findByUserId(Long userId) {
return userSpouseRepository.findByUserId(userId); return userSpouseRepository.findByUserId(userId);
} }
......
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