Authored by mali

券商品列表的代码优化

... ... @@ -567,11 +567,11 @@ public class ProductSearchServiceImpl implements ProductSearchService {
// 如果券包含的商品列表、排除的商品列表太多,则调用搜索的时候会报参数链接太长,所以这里进行截取
if (StringUtils.isNotEmpty(couponInfo.getContainsProductIds())
&& couponInfo.getContainsProductIds().length() > 1800) {
couponInfo.setContainsProductIds(couponInfo.getContainsProductIds().substring(0, 1800));
couponInfo.setContainsProductIds(couponInfo.getContainsProductIds().substring(0, 1799));
}
if (StringUtils.isNotEmpty(couponInfo.getExcludeProductIds())
&& couponInfo.getExcludeProductIds().length() > 1800) {
couponInfo.setExcludeProductIds(couponInfo.getExcludeProductIds().substring(0, 1800));
couponInfo.setExcludeProductIds(couponInfo.getExcludeProductIds().substring(0, 1799));
}
return couponInfo;
}
... ...