Showing
2 changed files
with
32 additions
and
31 deletions
service/src/main/java/com/yoho/search/recall/scene/beans/persional/UserPersionalFactorComponent.java
@@ -56,20 +56,21 @@ class UserPersionalFactorComponent { | @@ -56,20 +56,21 @@ class UserPersionalFactorComponent { | ||
56 | } | 56 | } |
57 | 57 | ||
58 | private UserPersonalFactorRsp queryUserPersionalFactorRsp(int uid, String udid){ | 58 | private UserPersonalFactorRsp queryUserPersionalFactorRsp(int uid, String udid){ |
59 | - try { | ||
60 | - UserPersonalFactorReq userPersionalFactorReq = new UserPersonalFactorReq(uid,udid); | ||
61 | - JSONObject result = serviceCaller.call(SERVICE_NAME,userPersionalFactorReq,JSONObject.class,timeOut); | ||
62 | - RECALL_NEW_LOGGER.info("UserPersionalFactorComponent.result is[{}]",result.toJSONString()); | ||
63 | - JSONObject userPersonalFactorRspJSon = result.getJSONObject("data"); | ||
64 | - UserPersonalFactorRsp rsp = JSON.toJavaObject(userPersonalFactorRspJSon,UserPersonalFactorRsp.class); | ||
65 | - if(rsp==null ||rsp.getBrandIds()==null || rsp.getSortPriceAreas()==null){ | ||
66 | - RECALL_NEW_LOGGER.error("query bigdata fail, result is [{}]",result.toJSONString()); | ||
67 | - return null; | ||
68 | - } | ||
69 | - return rsp; | ||
70 | - }catch (Exception e){ | ||
71 | - logger.error(e.getMessage(),e); | ||
72 | - return null; | ||
73 | - } | 59 | +// try { |
60 | +// UserPersonalFactorReq userPersionalFactorReq = new UserPersonalFactorReq(uid,udid); | ||
61 | +// JSONObject result = serviceCaller.call(SERVICE_NAME,userPersionalFactorReq,JSONObject.class,timeOut); | ||
62 | +// RECALL_NEW_LOGGER.info("UserPersionalFactorComponent.result is[{}]",result.toJSONString()); | ||
63 | +// JSONObject userPersonalFactorRspJSon = result.getJSONObject("data"); | ||
64 | +// UserPersonalFactorRsp rsp = JSON.toJavaObject(userPersonalFactorRspJSon,UserPersonalFactorRsp.class); | ||
65 | +// if(rsp==null ||rsp.getBrandIds()==null || rsp.getSortPriceAreas()==null){ | ||
66 | +// RECALL_NEW_LOGGER.error("query bigdata fail, result is [{}]",result.toJSONString()); | ||
67 | +// return null; | ||
68 | +// } | ||
69 | +// return rsp; | ||
70 | +// }catch (Exception e){ | ||
71 | +// logger.error(e.getMessage(),e); | ||
72 | +// return null; | ||
73 | +// } | ||
74 | + return null; | ||
74 | } | 75 | } |
75 | } | 76 | } |
@@ -49,23 +49,23 @@ public class ProductListSwitchService { | @@ -49,23 +49,23 @@ public class ProductListSwitchService { | ||
49 | if (!this.isPersionalScene(paramMap)) { | 49 | if (!this.isPersionalScene(paramMap)) { |
50 | return defaultProductListService.productListNotPersional(paramMap); | 50 | return defaultProductListService.productListNotPersional(paramMap); |
51 | } | 51 | } |
52 | -// // 2、个性化时根据开关,决定是否使用高性能的场景-双11专用 | ||
53 | -// boolean perfamanceStrategyOpen = searchDynamicConfigService.searchPersionalPerfamanceStrategyOpen(); | ||
54 | -// if (perfamanceStrategyOpen) { | ||
55 | -// return performanceRecallProductListService.productList(paramMap); | ||
56 | -// } | ||
57 | -// // 3、品类页-是否使用品类页的召回策略 | ||
58 | -// boolean sortPageRecallOpen = searchDynamicConfigService.isSortPageRecallOpen(); | ||
59 | -// if (sortPageRecallOpen && searchCommonHelper.isSortPageDefault(paramMap)) { | ||
60 | -// return sortRecallProductListService.productList(paramMap); | ||
61 | -// } | ||
62 | -// // 4、是否使用新的召回策略 | ||
63 | -// boolean searchPersionalNewStrategyOpen = searchDynamicConfigService.searchPersionalNewStrategyOpen(); | ||
64 | -// if (searchPersionalNewStrategyOpen) { | 52 | + // 2、个性化时根据开关,决定是否使用高性能的场景-双11专用 |
53 | + boolean perfamanceStrategyOpen = searchDynamicConfigService.searchPersionalPerfamanceStrategyOpen(); | ||
54 | + if (perfamanceStrategyOpen) { | ||
55 | + return performanceRecallProductListService.productList(paramMap); | ||
56 | + } | ||
57 | + // 3、品类页-是否使用品类页的召回策略 | ||
58 | + boolean sortPageRecallOpen = searchDynamicConfigService.isSortPageRecallOpen(); | ||
59 | + if (sortPageRecallOpen && searchCommonHelper.isSortPageDefault(paramMap)) { | ||
60 | + return sortRecallProductListService.productList(paramMap); | ||
61 | + } | ||
62 | + // 4、是否使用新的召回策略 | ||
63 | + boolean searchPersionalNewStrategyOpen = searchDynamicConfigService.searchPersionalNewStrategyOpen(); | ||
64 | + if (searchPersionalNewStrategyOpen) { | ||
65 | return sceneRecallProductListService.productList(paramMap); | 65 | return sceneRecallProductListService.productList(paramMap); |
66 | -// } | ||
67 | -// // 5、默认-使用向量版本的个性化方案 | ||
68 | -// return defaultProductListService.productListForDefaultPersional(paramMap); | 66 | + } |
67 | + // 5、默认-使用向量版本的个性化方案 | ||
68 | + return defaultProductListService.productListForDefaultPersional(paramMap); | ||
69 | } | 69 | } |
70 | 70 | ||
71 | private boolean isPersionalScene(Map<String, String> paramMap) { | 71 | private boolean isPersionalScene(Map<String, String> paramMap) { |
-
Please register or login to post a comment