【功能修复】商城:物流信息、微信通知的缓存,因为 @Cacheable 错误使用 condition 导致无法缓存的问题

This commit is contained in:
YunaiV
2024-09-17 16:30:20 +08:00
parent 639ce7bb31
commit 4c09a559c4
2 changed files with 4 additions and 3 deletions

View File

@ -280,7 +280,8 @@ public class SocialClientServiceImpl implements SocialClientService {
}
@Override
@Cacheable(cacheNames = RedisKeyConstants.WXA_SUBSCRIBE_TEMPLATE, key = "#userType", condition = "#result != null")
@Cacheable(cacheNames = RedisKeyConstants.WXA_SUBSCRIBE_TEMPLATE, key = "#userType",
unless = "#result == null")
public List<TemplateInfo> getSubscribeTemplateList(Integer userType) {
WxMaService service = getWxMaService(userType);
try {