Authored by hugufei

service添加serviceCaller的依赖

... ... @@ -12,6 +12,10 @@
<dependencies>
<dependency>
<groupId>com.yoho.core</groupId>
<artifactId>yoho-core-rest-client-simple</artifactId>
</dependency>
<dependency>
<groupId>com.yoho.search</groupId>
<artifactId>search-es</artifactId>
</dependency>
... ...
package com.yoho.search.recall.scene.beans.persional;
import com.yoho.core.rest.client.ServiceCaller;
import com.yoho.search.core.personalized.models.UserPersionalFactorReq;
import com.yoho.search.core.personalized.models.UserPersionalFactorRsp;
import com.yoho.search.recall.scene.models.PersionalFactor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
... ... @@ -9,6 +13,14 @@ import java.util.List;
@Component
class UserPersionalFactorComponent {
@Autowired
private ServiceCaller serviceCaller;
//serviceCaller.asyncCall("message.publishIosUser", iosTokenBO, Integer.class);
private static final String SERVICE_NAME = "bigdata.UserPersionalFactor";
private static final int timeOut = 100;
/**
* 获取用户的个性化因子
*
... ... @@ -29,5 +41,8 @@ class UserPersionalFactorComponent {
return new PersionalFactor(brandIds, sortPriceArea,factor);
}
private UserPersionalFactorRsp queryUserPersionalFactorRsp( UserPersionalFactorReq userPersionalFactorReq){
return serviceCaller.call(SERVICE_NAME,userPersionalFactorReq,UserPersionalFactorRsp.class,timeOut);
}
}
... ...