Commit 26008324 authored by 技术部-任文超's avatar 技术部-任文超

删除微信缓存

parent 5f25b397
...@@ -117,13 +117,11 @@ public class WechatServiceImpl implements IWechatService { ...@@ -117,13 +117,11 @@ public class WechatServiceImpl implements IWechatService {
} }
@Override @Override
@Cacheable(value = "WechatUserInfo", key = "'openId:' + #openId", unless = "#result == null", cacheManager = "cacheManager")
public WechatUserInfo findWechatUserInfoFromDb(String openId) { public WechatUserInfo findWechatUserInfoFromDb(String openId) {
return weChatUserRepository.findByOpenId(openId); return weChatUserRepository.findByOpenId(openId);
} }
@Override @Override
@CacheEvict(value = "WechatUserInfo", key = "'openId:' + #userInfo.openId", cacheManager = "cacheManager")
@Transactional @Transactional
public WechatUserInfo saveWechatUserInfo(WechatUserInfo userInfo) { public WechatUserInfo saveWechatUserInfo(WechatUserInfo userInfo) {
if(Objects.isNull(userInfo) || Objects.isNull(userInfo.getOpenId())){ if(Objects.isNull(userInfo) || Objects.isNull(userInfo.getOpenId())){
...@@ -141,7 +139,6 @@ public class WechatServiceImpl implements IWechatService { ...@@ -141,7 +139,6 @@ public class WechatServiceImpl implements IWechatService {
} }
@Override @Override
@CacheEvict(value = "WechatUserInfo", key = "'openId:' + #openId", cacheManager = "cacheManager")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int relateUser(Long userId, String phoneNo, String openId) { public int relateUser(Long userId, String phoneNo, String openId) {
if(Objects.isNull(userId) || Objects.isNull(openId) || StringUtils.isBlank(openId)){ if(Objects.isNull(userId) || Objects.isNull(openId) || StringUtils.isBlank(openId)){
......
...@@ -126,9 +126,9 @@ public class AESUtil { ...@@ -126,9 +126,9 @@ public class AESUtil {
} }
public static void main(String[] args){ public static void main(String[] args){
System.out.println(encryptAndBase64Encode("21297546", Constants.AES_KEY)); System.out.println(encryptAndBase64Encode("45949139", Constants.AES_KEY));
System.out.println(encryptAndBase64Encode("18610277039", Constants.AES_KEY)); System.out.println(encryptAndBase64Encode("18611428880", Constants.AES_KEY));
System.out.println(encryptAndBase64Encode("15010086580", Constants.AES_KEY)); System.out.println(encryptAndBase64Encode("15810672369", Constants.AES_KEY));
} }
} }
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