Showing
1 changed file
with
9 additions
and
1 deletions
@@ -74,6 +74,8 @@ public class ProductSearchServiceImpl implements ProductSearchService { | @@ -74,6 +74,8 @@ public class ProductSearchServiceImpl implements ProductSearchService { | ||
74 | public static final String BRAND_LIST_URL = "/yohosearch/ufo/brandList.json"; | 74 | public static final String BRAND_LIST_URL = "/yohosearch/ufo/brandList.json"; |
75 | 75 | ||
76 | public static final String SERIES_LIST_URL = "/yohosearch/ufo/seriesList.json"; | 76 | public static final String SERIES_LIST_URL = "/yohosearch/ufo/seriesList.json"; |
77 | + public static final String SOON_SALE_PRODUCT_LIST_URL = "/yohosearch/ufo/soonSaleProductList.json"; | ||
78 | + public static final String FAVORITE_PRODUCT_LIST_URL = "/yohosearch/ufo/favoriteProductList.json"; | ||
77 | 79 | ||
78 | 80 | ||
79 | public static final String PRODUCT_RECOMMEND_LIST_URL = "/yohosearch/ufo/recommendList.json"; | 81 | public static final String PRODUCT_RECOMMEND_LIST_URL = "/yohosearch/ufo/recommendList.json"; |
@@ -114,7 +116,13 @@ public class ProductSearchServiceImpl implements ProductSearchService { | @@ -114,7 +116,13 @@ public class ProductSearchServiceImpl implements ProductSearchService { | ||
114 | @Override | 116 | @Override |
115 | public JSONObject searchProductList(ProductSearchReq req) { | 117 | public JSONObject searchProductList(ProductSearchReq req) { |
116 | SearchParam searchParam = new SearchParam().buildPageSearchParam(req); | 118 | SearchParam searchParam = new SearchParam().buildPageSearchParam(req); |
117 | - JSONObject data = search(searchParam.getParam(), PRODUCT_LIST_URL); | 119 | + String url = PRODUCT_LIST_URL; |
120 | + if(StringUtils.equals("Y", req.getIsSoonSale())) { | ||
121 | + url = SOON_SALE_PRODUCT_LIST_URL; | ||
122 | + } else if(StringUtils.equals("Y", req.getIsIdFilter())) { | ||
123 | + url = FAVORITE_PRODUCT_LIST_URL; | ||
124 | + } | ||
125 | + JSONObject data = search(searchParam.getParam(), url); | ||
118 | // 将图片的相对路径转成绝对路径 | 126 | // 将图片的相对路径转成绝对路径 |
119 | if (null != data) { | 127 | if (null != data) { |
120 | processProductList(data.getJSONArray("product_list")); | 128 | processProductList(data.getJSONArray("product_list")); |
-
Please register or login to post a comment