@Before(value = "groupRelationServicePointcut() && groupRelationMaybeCacheEvictAllOrSpecialPointcut(arg)", argNames = "jp,arg")
public void groupRelationMaybeCacheClearAllOrSpecialAdvice(JoinPoint jp, Object arg) {
String methodName = jp.getSignature().getName();
if (arg instanceof GroupRelation) {
GroupRelation r = (GroupRelation) arg;
log.debug("cacheName:{}, method:groupRelationMaybeCacheClearAllOrSpecialAdvice delagate to evictForGroupRelation", cacheName);
if (evictForGroupRelation(r)) {
return;
}
} else if ("delete".equals(methodName)) {//删除情况
if (arg instanceof Long) {
Long rId = (Long) arg;
GroupRelation r = groupRelationService.findOne(rId);
log.debug("cacheName:{}, method:groupRelationMaybeCacheClearAllOrSpecialAdvice delagate to evictForGroupRelation", cacheName);
if (evictForGroupRelation(r)) {
return;
}
} else if (arg instanceof Long[]) {
for (Long rId : (Long[]) arg) {
GroupRelation r = groupRelationService.findOne(rId);
log.debug("cacheName:{}, method:groupRelationMaybeCacheClearAllOrSpecialAdvice delagate to evictForGroupRelation", cacheName);
if (evictForGroupRelation(r)) {
return;
}