Authored by mali

Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8

@@ -100,7 +100,7 @@ public class ControllerCacheAop implements ApplicationContextAware{ @@ -100,7 +100,7 @@ public class ControllerCacheAop implements ApplicationContextAware{
100 100
101 private Object dealPageCache(String cacheKey, Cachable cacheExpire, Class<?> returnType, String methodName, ProceedingJoinPoint joinPoint) throws Throwable { 101 private Object dealPageCache(String cacheKey, Cachable cacheExpire, Class<?> returnType, String methodName, ProceedingJoinPoint joinPoint) throws Throwable {
102 //从一级缓存中获取数据 102 //从一级缓存中获取数据
103 - String pageKey = getPageCacheKey(cacheExpire.pageArgs()); 103 + String pageKey = getPageCacheKey(cacheExpire.pageArgs(), joinPoint.getArgs());
104 try { 104 try {
105 Object level1_obj = this.cacheClient.hashGet(cacheKey, pageKey, returnType); 105 Object level1_obj = this.cacheClient.hashGet(cacheKey, pageKey, returnType);
106 if (level1_obj != null) { 106 if (level1_obj != null) {
@@ -254,8 +254,14 @@ public class ControllerCacheAop implements ApplicationContextAware{ @@ -254,8 +254,14 @@ public class ControllerCacheAop implements ApplicationContextAware{
254 return cacheKeyPrefix + ":" + args_sign; 254 return cacheKeyPrefix + ":" + args_sign;
255 } 255 }
256 256
257 - private String getPageCacheKey(int[] pageParams) {  
258 - return "PAGE:" + StringUtils.join(pageParams, ":"); 257 + private String getPageCacheKey(int[] pageParams, Object[] args) {
  258 + StringBuilder sb = new StringBuilder();
  259 + for (int index : pageParams) {
  260 + if (index < args.length) {
  261 + sb.append(":").append(args[index]);
  262 + }
  263 + }
  264 + return "PAGE" + sb.toString();
259 } 265 }
260 266
261 267