Authored by hugufei

fix bug

@@ -83,15 +83,7 @@ public class UserRecallRequestResponseCacheBean extends AbstractCacheBean<UserRe @@ -83,15 +83,7 @@ public class UserRecallRequestResponseCacheBean extends AbstractCacheBean<UserRe
83 RECALL_NEW_LOGGER.info("UserRecallRequestResponseCacheBean[2]-batchRecallAndCache,cost is [{}]", System.currentTimeMillis()-begin); 83 RECALL_NEW_LOGGER.info("UserRecallRequestResponseCacheBean[2]-batchRecallAndCache,cost is [{}]", System.currentTimeMillis()-begin);
84 if(param.getUid()==13420925){ 84 if(param.getUid()==13420925){
85 for(RecallRequestResponse recallRequestResponse: requestResponses){ 85 for(RecallRequestResponse recallRequestResponse: requestResponses){
86 - StringBuilder responseLog = new StringBuilder();  
87 - RecallResponse recallResponse = recallRequestResponse.getResponse();  
88 - if(recallResponse==null){  
89 - responseLog.append("null");  
90 - }else{  
91 - responseLog.append("total is [").append(recallResponse.getTotal()).append("], ");  
92 - responseLog.append("sknList is ").append(recallResponse.getSkns()==null?"[]", JSON.toJSONString(recallResponse.getSkns()));  
93 - }  
94 - RECALL_NEW_LOGGER.info("request_type is [{}], response is [{}] ", recallRequestResponse.getRequest().requestStrategy().name(),responseLog); 86 + RECALL_NEW_LOGGER.info("request_type is [{}], response is [{}] ", recallRequestResponse.getRequest().requestStrategy().name(),this.getResponseLog(recallRequestResponse));
95 } 87 }
96 } 88 }
97 //4、获取skn列表[去重] 89 //4、获取skn列表[去重]
@@ -103,6 +95,18 @@ public class UserRecallRequestResponseCacheBean extends AbstractCacheBean<UserRe @@ -103,6 +95,18 @@ public class UserRecallRequestResponseCacheBean extends AbstractCacheBean<UserRe
103 return userRecallResponse; 95 return userRecallResponse;
104 } 96 }
105 97
  98 + private String getResponseLog(RecallRequestResponse recallRequestResponse){
  99 + RecallResponse recallResponse = recallRequestResponse.getResponse();
  100 + StringBuilder responseLog = new StringBuilder();
  101 + if(recallResponse==null){
  102 + responseLog.append("null");
  103 + }else{
  104 + responseLog.append("total is [").append(recallResponse.getTotal()).append("], ");
  105 + responseLog.append("sknList is ").append(recallResponse.getSkns()==null?"[]":JSON.toJSONString(recallResponse.getSkns()));
  106 + }
  107 + return responseLog.toString();
  108 + }
  109 +
106 /** 110 /**
107 * 批量构造请求 111 * 批量构造请求
108 * @param param 112 * @param param