...
|
...
|
@@ -33,13 +33,11 @@ public class CommpressAspect { |
|
|
|
|
|
@Around("@annotation(com.yoho.search.common.compress.aop.CommpressAble)")
|
|
|
public Object downGrade(ProceedingJoinPoint pjp) throws Throwable {
|
|
|
// 获取方法签名
|
|
|
MethodSignature signature = (MethodSignature) pjp.getSignature();
|
|
|
final Class<?> returnType = signature.getMethod().getReturnType();
|
|
|
if (!returnType.isAssignableFrom(SearchApiResult.class)) {
|
|
|
return pjp.proceed();
|
|
|
}
|
|
|
// 从降级缓存中可以获取结果,则直接返回[说明此刻是降级状态]
|
|
|
Object result = pjp.proceed();
|
|
|
if (result == null) {
|
|
|
return result;
|
...
|
...
|
|