Commit fe4d017d by 穆龙飞

Merge branch 'release-2023050401' into 'master'

分支release-2023050401已上线,自动合并到master

See merge request !24
parents 0f3357e5 fe77d5e2
Pipeline #69542 canceled with stages
...@@ -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