From f67743e47f57dafc7031af44e2037c03e680a60c Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期一, 25 三月 2019 11:30:43 +0800 Subject: [PATCH] 清理无效引用 --- fanli/src/main/java/com/yeshi/fanli/aspect/ActiveUserAspect.java | 29 ++++++++++++----------------- 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/aspect/ActiveUserAspect.java b/fanli/src/main/java/com/yeshi/fanli/aspect/ActiveUserAspect.java index 5c9d268..800e6ae 100644 --- a/fanli/src/main/java/com/yeshi/fanli/aspect/ActiveUserAspect.java +++ b/fanli/src/main/java/com/yeshi/fanli/aspect/ActiveUserAspect.java @@ -5,14 +5,12 @@ import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.springframework.core.annotation.Order; import org.springframework.core.task.TaskExecutor; -import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import com.yeshi.fanli.service.inter.user.UserSystemCouponService; +import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.RedisManager; /** @@ -63,18 +61,16 @@ return; } -// // 缂撳瓨uid鐨凨ey -// String key = "activeUid_" + uuid; -// -// // 缂撳瓨涓槸鍚﹀瓨鍦╱id -// String cacheValue = redisManager.getCommonString(key); -// if (cacheValue != null && cacheValue.trim().length() > 0) { -// return; -// } -// -// // 鍔犲叆缂撳瓨 20鍒嗛挓 -// redisManager.cacheCommonString("activeUid_" + uuid, uuid.toString(), 60 * 20); -// + if (Constant.IS_OUTNET) { + String key = "activeUid_" + uuid; + // 缂撳瓨涓槸鍚﹀瓨鍦╱id + String cacheValue = redisManager.getCommonString(key); + if (cacheValue != null && cacheValue.trim().length() > 0) { + return; + } + // 鍔犲叆缂撳瓨 20鍒嗛挓 + redisManager.cacheCommonString("activeUid_" + uuid, uuid.toString(), 60 * 20); + } // 鎺ユ敹鍒� try { @@ -85,8 +81,7 @@ } }); - Object[] args = joinPoint.getArgs(); - return joinPoint.proceed(args); + return joinPoint.proceed(joinPoint.getArgs()); } } -- Gitblit v1.8.0