mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-31 17:40:05 +08:00
fix: 修复MailAccountService 更新/删除缓存未清空
This commit is contained in:
parent
c434c960a1
commit
c4755c49b1
@ -47,8 +47,7 @@ public class MailAccountServiceImpl implements MailAccountService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@CacheEvict(value = RedisKeyConstants.MAIL_ACCOUNT,
|
@CacheEvict(value = RedisKeyConstants.MAIL_ACCOUNT, key = "#updateReqVO.id")
|
||||||
allEntries = true)// allEntries 清空所有缓存,主要一次更新涉及到的 mailAccountId 较多,反倒批量会更快
|
|
||||||
public void updateMailAccount(MailAccountUpdateReqVO updateReqVO) {
|
public void updateMailAccount(MailAccountUpdateReqVO updateReqVO) {
|
||||||
// 校验是否存在
|
// 校验是否存在
|
||||||
validateMailAccountExists(updateReqVO.getId());
|
validateMailAccountExists(updateReqVO.getId());
|
||||||
@ -59,8 +58,7 @@ public class MailAccountServiceImpl implements MailAccountService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@CacheEvict(value = RedisKeyConstants.MAIL_ACCOUNT,
|
@CacheEvict(value = RedisKeyConstants.MAIL_ACCOUNT, key = "#updateReqVO.id")
|
||||||
allEntries = true) // allEntries 清空所有缓存,主要一次更新涉及到的 mailAccountId 较多,反倒批量会更快
|
|
||||||
public void deleteMailAccount(Long id) {
|
public void deleteMailAccount(Long id) {
|
||||||
// 校验是否存在账号
|
// 校验是否存在账号
|
||||||
validateMailAccountExists(id);
|
validateMailAccountExists(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user