Showing
1 changed file
with
7 additions
and
4 deletions
@@ -46,7 +46,7 @@ public class DefaultProductListService { | @@ -46,7 +46,7 @@ public class DefaultProductListService { | ||
46 | */ | 46 | */ |
47 | @SearchCacheAble(cacheName = "PRODUCT_LIST_NOT_PERSIONAL", cacheType = CacheType.SEARCH_REDIS, cacheInMinute = 10, excludeParams = { "uid", "firstProductSkn" }) | 47 | @SearchCacheAble(cacheName = "PRODUCT_LIST_NOT_PERSIONAL", cacheType = CacheType.SEARCH_REDIS, cacheInMinute = 10, excludeParams = { "uid", "firstProductSkn" }) |
48 | public SearchApiResult productListNotPersional(Map<String, String> paramMap) { | 48 | public SearchApiResult productListNotPersional(Map<String, String> paramMap) { |
49 | - return this.productList(paramMap); | 49 | + return this.productList(paramMap,false); |
50 | } | 50 | } |
51 | 51 | ||
52 | /** | 52 | /** |
@@ -57,10 +57,10 @@ public class DefaultProductListService { | @@ -57,10 +57,10 @@ public class DefaultProductListService { | ||
57 | */ | 57 | */ |
58 | @SearchCacheAble(cacheName = "PRODUCT_LIST_DEFAULT_PERSIONAL", cacheType = CacheType.SEARCH_REDIS, cacheInMinute = 10) | 58 | @SearchCacheAble(cacheName = "PRODUCT_LIST_DEFAULT_PERSIONAL", cacheType = CacheType.SEARCH_REDIS, cacheInMinute = 10) |
59 | public SearchApiResult productListForDefaultPersional(Map<String, String> paramMap) { | 59 | public SearchApiResult productListForDefaultPersional(Map<String, String> paramMap) { |
60 | - return this.productList(paramMap); | 60 | + return this.productList(paramMap,true); |
61 | } | 61 | } |
62 | 62 | ||
63 | - private SearchApiResult productList(Map<String, String> paramMap){ | 63 | + private SearchApiResult productList(Map<String, String> paramMap,boolean reSort){ |
64 | try { | 64 | try { |
65 | // 1)获取分页参数 | 65 | // 1)获取分页参数 |
66 | int page = StringUtils.isBlank(paramMap.get("page")) ? 1 : Integer.parseInt(paramMap.get("page")); | 66 | int page = StringUtils.isBlank(paramMap.get("page")) ? 1 : Integer.parseInt(paramMap.get("page")); |
@@ -84,7 +84,10 @@ public class DefaultProductListService { | @@ -84,7 +84,10 @@ public class DefaultProductListService { | ||
84 | dataMap.put("page_size", searchParam.getSize()); | 84 | dataMap.put("page_size", searchParam.getSize()); |
85 | dataMap.put("page_total", searchResult.getTotalPage()); | 85 | dataMap.put("page_total", searchResult.getTotalPage()); |
86 | List<Map<String, Object>> product_list = productIndexBaseService.getProductListWithPricePlan(searchResult.getResultList()); | 86 | List<Map<String, Object>> product_list = productIndexBaseService.getProductListWithPricePlan(searchResult.getResultList()); |
87 | - dataMap.put("product_list", productListSortService.sortProductList(product_list));// 处理一下商品的顺序; | 87 | + if(reSort){ |
88 | + product_list = productListSortService.sortProductList(product_list);// 处理一下商品的顺序; | ||
89 | + } | ||
90 | + dataMap.put("product_list",product_list); | ||
88 | return new SearchApiResult().setData(dataMap); | 91 | return new SearchApiResult().setData(dataMap); |
89 | } catch (Exception e) { | 92 | } catch (Exception e) { |
90 | logger.error(e.getMessage(), e); | 93 | logger.error(e.getMessage(), e); |
-
Please register or login to post a comment