提交 4ad27adb authored 作者: zhoushaopan's avatar zhoushaopan

feat(缓存模块): 更新缓存

更新缓存
上级 121f7c03
...@@ -11,8 +11,11 @@ import org.aspectj.lang.annotation.AfterReturning; ...@@ -11,8 +11,11 @@ import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.concurrent.Executor;
/** /**
* 增强更新缓存aop * 增强更新缓存aop
* *
...@@ -23,9 +26,6 @@ import org.springframework.stereotype.Component; ...@@ -23,9 +26,6 @@ import org.springframework.stereotype.Component;
@Component @Component
public class UpdateCacheAspect { public class UpdateCacheAspect {
/**
* 业务新状态
*/
@Autowired @Autowired
private DeviceLibraryCacheService deviceLibraryCacheService; private DeviceLibraryCacheService deviceLibraryCacheService;
...@@ -42,7 +42,8 @@ public class UpdateCacheAspect { ...@@ -42,7 +42,8 @@ public class UpdateCacheAspect {
@AfterReturning(pointcut = "operationLog()") @AfterReturning(pointcut = "operationLog()")
public void doAfterReturning(JoinPoint point) { public void doAfterReturning(JoinPoint point) {
log.info("通过AOP更新缓存"); log.info("通过AOP更新缓存");
deviceLibraryCacheService.asyncUpdateCache(); deviceLibraryCacheService.deletAllDeviceLibraryList();
deviceLibraryCacheService.getAllDeviceLibraryList();
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论