...
|
...
|
@@ -96,33 +96,21 @@ public class StorageSkuIndexToolsService implements ApplicationEventPublisherAwa |
|
|
// 1、根据sku去取数据库对象
|
|
|
List<Integer> productSkus = this.getElementsFromArrayBlockingQueue(productSkuQueue, 200);
|
|
|
if (!productSkus.isEmpty()) {
|
|
|
if (ISearchConstans.BUILD_STORAGESKUINDEX_USE_CODE) {
|
|
|
storageSkuList.addAll(storageSkuLogicService.getStorageSkuIndexBySkus(productSkus));
|
|
|
} else {
|
|
|
storageSkuList.addAll(storageSkuService.selectListProductSkus(productSkus));
|
|
|
}
|
|
|
storageSkuList.addAll(storageSkuLogicService.getStorageSkuIndexBySkus(productSkus));
|
|
|
logger.info("doBulkUpdateStorageSkuIndex[getListBySku], storageSkuList size is [{}], cost [{}]ms", storageSkuList.size(), costStatistics.getCost());
|
|
|
}
|
|
|
|
|
|
// 2、根据skc去取数据库对象
|
|
|
List<Integer> goodsIds = this.getElementsFromArrayBlockingQueue(goodsIdQueue, 200);
|
|
|
if (!goodsIds.isEmpty()) {
|
|
|
if (ISearchConstans.BUILD_STORAGESKUINDEX_USE_CODE) {
|
|
|
storageSkuList.addAll(storageSkuLogicService.getStorageSkuIndexBySkcs(goodsIds));
|
|
|
} else {
|
|
|
storageSkuList.addAll(storageSkuService.selectListByGoodsIds(goodsIds));
|
|
|
}
|
|
|
storageSkuList.addAll(storageSkuLogicService.getStorageSkuIndexBySkcs(goodsIds));
|
|
|
logger.info("doBulkUpdateStorageSkuIndex[getListBySkc], storageSkuList size is [{}], cost [{}]ms", storageSkuList.size(), costStatistics.getCost());
|
|
|
}
|
|
|
|
|
|
// 3、根据skn去取数据库对象
|
|
|
List<Integer> productIds = this.getElementsFromArrayBlockingQueue(productIdQueue, 200);
|
|
|
if (!productIds.isEmpty()) {
|
|
|
if (ISearchConstans.BUILD_STORAGESKUINDEX_USE_CODE) {
|
|
|
storageSkuList.addAll(storageSkuLogicService.getStorageSkuIndexBySkns(productIds));
|
|
|
} else {
|
|
|
storageSkuList.addAll(storageSkuService.selectListByProductIds(productIds));
|
|
|
}
|
|
|
logger.info("doBulkUpdateStorageSkuIndex[getListBySkn], storageSkuList size is [{}], cost [{}]ms", storageSkuList.size(), costStatistics.getCost());
|
|
|
}
|
|
|
|
...
|
...
|
|