mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-02-08 14:44:57 +08:00
增加 Spring Cache 框架
This commit is contained in:
parent
1cfc0bc9ea
commit
a426384d41
@ -33,7 +33,6 @@ public class TestDemoServiceImpl implements TestDemoService {
|
|||||||
private TestDemoMapper testDemoMapper;
|
private TestDemoMapper testDemoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@CacheEvict(value = "test", key = "#createReqVO.id")
|
|
||||||
public Long createTestDemo(TestDemoCreateReqVO createReqVO) {
|
public Long createTestDemo(TestDemoCreateReqVO createReqVO) {
|
||||||
// 插入
|
// 插入
|
||||||
TestDemoDO testDemo = TestDemoConvert.INSTANCE.convert(createReqVO);
|
TestDemoDO testDemo = TestDemoConvert.INSTANCE.convert(createReqVO);
|
||||||
@ -53,7 +52,7 @@ public class TestDemoServiceImpl implements TestDemoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@CacheEvict(value = "test", key = "'test:' + #id")
|
@CacheEvict(value = "test", key = "#id")
|
||||||
public void deleteTestDemo(Long id) {
|
public void deleteTestDemo(Long id) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
this.validateTestDemoExists(id);
|
this.validateTestDemoExists(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user