|
@@ -107,7 +107,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
@@ -107,7 +107,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
107
|
}
|
107
|
}
|
108
|
req.setId(info.getContainsProductIds());
|
108
|
req.setId(info.getContainsProductIds());
|
109
|
req.setNot_id(info.getExcludeProductIds());
|
109
|
req.setNot_id(info.getExcludeProductIds());
|
110
|
- logger.info("contains {} ex {}",info.getContainsProductIds(), info.getExcludeProductIds());
|
110
|
+ //logger.info("contains {} ex {}",info.getContainsProductIds(), info.getExcludeProductIds());
|
111
|
searchParam = new SearchParam().buildPageSearchParam(req).setShowChannel(req.getBusinessClient());
|
111
|
searchParam = new SearchParam().buildPageSearchParam(req).setShowChannel(req.getBusinessClient());
|
112
|
} else if (StringUtils.equals("Y", req.getIsSoonSale())) {
|
112
|
} else if (StringUtils.equals("Y", req.getIsSoonSale())) {
|
113
|
url = ProductSearchConstants.SOON_SALE_PRODUCT_LIST_URL;
|
113
|
url = ProductSearchConstants.SOON_SALE_PRODUCT_LIST_URL;
|
|
@@ -562,6 +562,17 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
@@ -562,6 +562,17 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
562
|
|
562
|
|
563
|
private CouponInfo getCouponInfo(String token) {
|
563
|
private CouponInfo getCouponInfo(String token) {
|
564
|
ApiResponse resp = ufoServiceCaller.call("ufo.coupons.getProductIds", ApiResponse.class, token);
|
564
|
ApiResponse resp = ufoServiceCaller.call("ufo.coupons.getProductIds", ApiResponse.class, token);
|
565
|
- return (CouponInfo) resp.getData();
|
565
|
+ CouponInfo couponInfo = (CouponInfo) resp.getData();
|
|
|
566
|
+
|
|
|
567
|
+ // 如果券包含的商品列表、排除的商品列表太多,则调用搜索的时候会报参数链接太长,所以这里进行截取
|
|
|
568
|
+ if (StringUtils.isNotEmpty(couponInfo.getContainsProductIds())
|
|
|
569
|
+ && couponInfo.getContainsProductIds().length() > 1800) {
|
|
|
570
|
+ couponInfo.setContainsProductIds(couponInfo.getContainsProductIds().substring(0, 1800));
|
|
|
571
|
+ }
|
|
|
572
|
+ if (StringUtils.isNotEmpty(couponInfo.getExcludeProductIds())
|
|
|
573
|
+ && couponInfo.getExcludeProductIds().length() > 1800) {
|
|
|
574
|
+ couponInfo.setExcludeProductIds(couponInfo.getExcludeProductIds().substring(0, 1800));
|
|
|
575
|
+ }
|
|
|
576
|
+ return couponInfo;
|
566
|
}
|
577
|
}
|
567
|
} |
578
|
} |