Commit fe77d5e2 by yxdubhe_bot

merge:feature-0427-itemQueryEx:operator:hzhuyuanyuan@corp.netease.com:auto_branc…

merge:feature-0427-itemQueryEx:operator:hzhuyuanyuan@corp.netease.com:auto_branch_merge_by_branchService_end
parents 0f3357e5 0052c8f6
Pipeline #47794 passed with stages
in 1 minute 57 seconds
...@@ -48,13 +48,13 @@ public class SupplierItemServiceImpl implements ISupplierItemService { ...@@ -48,13 +48,13 @@ public class SupplierItemServiceImpl implements ISupplierItemService {
List<SupplierGoodsInfoRsp> data = listAjaxResponse.getData(); List<SupplierGoodsInfoRsp> data = listAjaxResponse.getData();
List<SpuTO> spuTOList = new ArrayList<>(); List<SpuTO> spuTOList = new ArrayList<>();
if (data != null) { if (data != null) {
List<String> commonProps = new ArrayList<>();
commonProps.add("sku");
commonProps.add("skuSpec");
Set<Long> fullItemIds = data.stream().map(SupplierGoodsInfoRsp::getItemId).collect(Collectors.toSet()); Set<Long> fullItemIds = data.stream().map(SupplierGoodsInfoRsp::getItemId).collect(Collectors.toSet());
log.debug("[op:supplierGoodsInfoBySupplier] fullItemIds: {}", fullItemIds); log.debug("[op:supplierGoodsInfoBySupplier] fullItemIds: {}", fullItemIds);
while (fullItemIds.size() > 200) { while (fullItemIds.size() > 200) {
List<Long> itemIds = new ArrayList<>(fullItemIds).subList(0, 200); List<Long> itemIds = new ArrayList<>(fullItemIds).subList(0, 200);
List<String> commonProps = new ArrayList<>();
commonProps.add("sku");
commonProps.add("skuSpec");
AjaxResult<List<SpuTO>> listAjaxResult = itemRpcService AjaxResult<List<SpuTO>> listAjaxResult = itemRpcService
.batchQuerySpuInfo(BatchQuerySpuInfoParam.builder().ids(itemIds).commonProps(commonProps).build()); .batchQuerySpuInfo(BatchQuerySpuInfoParam.builder().ids(itemIds).commonProps(commonProps).build());
List<SpuTO> pageSpuTo = listAjaxResult.getData(); List<SpuTO> pageSpuTo = listAjaxResult.getData();
...@@ -65,7 +65,7 @@ public class SupplierItemServiceImpl implements ISupplierItemService { ...@@ -65,7 +65,7 @@ public class SupplierItemServiceImpl implements ISupplierItemService {
} }
List<Long> itemIds = new ArrayList<>(fullItemIds); List<Long> itemIds = new ArrayList<>(fullItemIds);
AjaxResult<List<SpuTO>> listAjaxResult = itemRpcService AjaxResult<List<SpuTO>> listAjaxResult = itemRpcService
.batchQuerySpuInfo(BatchQuerySpuInfoParam.builder().ids(itemIds).build()); .batchQuerySpuInfo(BatchQuerySpuInfoParam.builder().ids(itemIds).commonProps(commonProps).build());
List<SpuTO> pageSpuTo = listAjaxResult.getData(); List<SpuTO> pageSpuTo = listAjaxResult.getData();
if (!CollectionUtils.isEmpty(pageSpuTo)) { if (!CollectionUtils.isEmpty(pageSpuTo)) {
spuTOList.addAll(pageSpuTo); spuTOList.addAll(pageSpuTo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment