Authored by hugufei

大数据接口不兼容

... ... @@ -20,11 +20,8 @@ import java.util.List;
@Component
class UserPersionalFactorComponent {
private static final Logger logger = LoggerFactory.getLogger(UserPersionalFactorComponent.class);
private static final Logger RECALL_NEW_LOGGER = LoggerFactory.getLogger("RECALL");
private static final String SERVICE_NAME = "bigdata.searchPersonalFactors";
private static final String SERVICE_NAME_NEW = "bigdata.searchPersonalFactorsNew";
private static final int timeOut = 100;
@Autowired
private ServiceCaller serviceCaller;
... ... @@ -47,7 +44,7 @@ class UserPersionalFactorComponent {
}
return rsp;
} catch (Exception e) {
logger.error(e.getMessage(), e);
RECALL_NEW_LOGGER.error(e.getMessage(), e);
return new UserPersonalFactorRsp();
}
}
... ... @@ -62,7 +59,7 @@ class UserPersionalFactorComponent {
public UserPersonalFactorRspNew queryUserPersionalFactorNew(int uid, String udid, PagePersonalFactor pageFactor) {
try {
UserPersonalFactorReq userPersionalFactorReq = new UserPersonalFactorReq(uid, udid);
JSONObject result = serviceCaller.call(SERVICE_NAME_NEW, userPersionalFactorReq, JSONObject.class, timeOut);
JSONObject result = serviceCaller.call(SERVICE_NAME, userPersionalFactorReq, JSONObject.class, timeOut);
JSONObject userPersonalFactorRspJSon = result.getJSONObject("data");
UserPersonalFactorRspNew rsp = JSON.toJavaObject(userPersonalFactorRspJSon, UserPersonalFactorRspNew.class);
if (rsp == null || rsp.getSortBrandList() == null || rsp.getSortPriceAreasList() == null) {
... ... @@ -70,7 +67,7 @@ class UserPersionalFactorComponent {
}
return rsp;
} catch (Exception e) {
logger.error(e.getMessage(), e);
RECALL_NEW_LOGGER.error(e.getMessage(), e);
return getDefaultUserPersonalFactorRspNew(pageFactor);
}
}
... ...