Showing
1 changed file
with
0 additions
and
2 deletions
@@ -33,13 +33,11 @@ public class CommpressAspect { | @@ -33,13 +33,11 @@ public class CommpressAspect { | ||
33 | 33 | ||
34 | @Around("@annotation(com.yoho.search.common.compress.aop.CommpressAble)") | 34 | @Around("@annotation(com.yoho.search.common.compress.aop.CommpressAble)") |
35 | public Object downGrade(ProceedingJoinPoint pjp) throws Throwable { | 35 | public Object downGrade(ProceedingJoinPoint pjp) throws Throwable { |
36 | - // 获取方法签名 | ||
37 | MethodSignature signature = (MethodSignature) pjp.getSignature(); | 36 | MethodSignature signature = (MethodSignature) pjp.getSignature(); |
38 | final Class<?> returnType = signature.getMethod().getReturnType(); | 37 | final Class<?> returnType = signature.getMethod().getReturnType(); |
39 | if (!returnType.isAssignableFrom(SearchApiResult.class)) { | 38 | if (!returnType.isAssignableFrom(SearchApiResult.class)) { |
40 | return pjp.proceed(); | 39 | return pjp.proceed(); |
41 | } | 40 | } |
42 | - // 从降级缓存中可以获取结果,则直接返回[说明此刻是降级状态] | ||
43 | Object result = pjp.proceed(); | 41 | Object result = pjp.proceed(); |
44 | if (result == null) { | 42 | if (result == null) { |
45 | return result; | 43 | return result; |
-
Please register or login to post a comment