Authored by hugufei

大数据接口不兼容

@@ -20,11 +20,8 @@ import java.util.List; @@ -20,11 +20,8 @@ import java.util.List;
20 @Component 20 @Component
21 class UserPersionalFactorComponent { 21 class UserPersionalFactorComponent {
22 22
23 - private static final Logger logger = LoggerFactory.getLogger(UserPersionalFactorComponent.class);  
24 -  
25 private static final Logger RECALL_NEW_LOGGER = LoggerFactory.getLogger("RECALL"); 23 private static final Logger RECALL_NEW_LOGGER = LoggerFactory.getLogger("RECALL");
26 private static final String SERVICE_NAME = "bigdata.searchPersonalFactors"; 24 private static final String SERVICE_NAME = "bigdata.searchPersonalFactors";
27 - private static final String SERVICE_NAME_NEW = "bigdata.searchPersonalFactorsNew";  
28 private static final int timeOut = 100; 25 private static final int timeOut = 100;
29 @Autowired 26 @Autowired
30 private ServiceCaller serviceCaller; 27 private ServiceCaller serviceCaller;
@@ -47,7 +44,7 @@ class UserPersionalFactorComponent { @@ -47,7 +44,7 @@ class UserPersionalFactorComponent {
47 } 44 }
48 return rsp; 45 return rsp;
49 } catch (Exception e) { 46 } catch (Exception e) {
50 - logger.error(e.getMessage(), e); 47 + RECALL_NEW_LOGGER.error(e.getMessage(), e);
51 return new UserPersonalFactorRsp(); 48 return new UserPersonalFactorRsp();
52 } 49 }
53 } 50 }
@@ -62,7 +59,7 @@ class UserPersionalFactorComponent { @@ -62,7 +59,7 @@ class UserPersionalFactorComponent {
62 public UserPersonalFactorRspNew queryUserPersionalFactorNew(int uid, String udid, PagePersonalFactor pageFactor) { 59 public UserPersonalFactorRspNew queryUserPersionalFactorNew(int uid, String udid, PagePersonalFactor pageFactor) {
63 try { 60 try {
64 UserPersonalFactorReq userPersionalFactorReq = new UserPersonalFactorReq(uid, udid); 61 UserPersonalFactorReq userPersionalFactorReq = new UserPersonalFactorReq(uid, udid);
65 - JSONObject result = serviceCaller.call(SERVICE_NAME_NEW, userPersionalFactorReq, JSONObject.class, timeOut); 62 + JSONObject result = serviceCaller.call(SERVICE_NAME, userPersionalFactorReq, JSONObject.class, timeOut);
66 JSONObject userPersonalFactorRspJSon = result.getJSONObject("data"); 63 JSONObject userPersonalFactorRspJSon = result.getJSONObject("data");
67 UserPersonalFactorRspNew rsp = JSON.toJavaObject(userPersonalFactorRspJSon, UserPersonalFactorRspNew.class); 64 UserPersonalFactorRspNew rsp = JSON.toJavaObject(userPersonalFactorRspJSon, UserPersonalFactorRspNew.class);
68 if (rsp == null || rsp.getSortBrandList() == null || rsp.getSortPriceAreasList() == null) { 65 if (rsp == null || rsp.getSortBrandList() == null || rsp.getSortPriceAreasList() == null) {
@@ -70,7 +67,7 @@ class UserPersionalFactorComponent { @@ -70,7 +67,7 @@ class UserPersionalFactorComponent {
70 } 67 }
71 return rsp; 68 return rsp;
72 } catch (Exception e) { 69 } catch (Exception e) {
73 - logger.error(e.getMessage(), e); 70 + RECALL_NEW_LOGGER.error(e.getMessage(), e);
74 return getDefaultUserPersonalFactorRspNew(pageFactor); 71 return getDefaultUserPersonalFactorRspNew(pageFactor);
75 } 72 }
76 } 73 }