fix: selectBatchIds 已过期
This commit is contained in:
@@ -90,7 +90,7 @@ public class ProductBrandServiceImpl implements ProductBrandService {
|
||||
|
||||
@Override
|
||||
public List<ProductBrandDO> getBrandList(Collection<Long> ids) {
|
||||
return brandMapper.selectBatchIds(ids);
|
||||
return brandMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -109,7 +109,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService {
|
||||
return;
|
||||
}
|
||||
// 获得商品分类信息
|
||||
List<ProductCategoryDO> list = productCategoryMapper.selectBatchIds(ids);
|
||||
List<ProductCategoryDO> list = productCategoryMapper.selectByIds(ids);
|
||||
Map<Long, ProductCategoryDO> categoryMap = CollectionUtils.convertMap(list, ProductCategoryDO::getId);
|
||||
// 校验
|
||||
ids.forEach(id -> {
|
||||
|
||||
@@ -106,7 +106,7 @@ public class ProductPropertyServiceImpl implements ProductPropertyService {
|
||||
|
||||
@Override
|
||||
public List<ProductPropertyDO> getPropertyList(Collection<Long> ids) {
|
||||
return productPropertyMapper.selectBatchIds(ids);
|
||||
return productPropertyMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -81,7 +81,7 @@ public class ProductSkuServiceImpl implements ProductSkuService {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return ListUtil.empty();
|
||||
}
|
||||
return productSkuMapper.selectBatchIds(ids);
|
||||
return productSkuMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -268,7 +268,7 @@ public class ProductSkuServiceImpl implements ProductSkuService {
|
||||
});
|
||||
|
||||
// 更新 SPU 库存
|
||||
List<ProductSkuDO> skus = productSkuMapper.selectBatchIds(
|
||||
List<ProductSkuDO> skus = productSkuMapper.selectByIds(
|
||||
convertSet(updateStockReqDTO.getItems(), ProductSkuUpdateStockReqDTO.Item::getId));
|
||||
Map<Long, Integer> spuStockIncrCounts = ProductSkuConvert.INSTANCE.convertSpuStockMap(
|
||||
updateStockReqDTO.getItems(), skus);
|
||||
|
||||
@@ -137,7 +137,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 获得商品信息
|
||||
List<ProductSpuDO> list = productSpuMapper.selectBatchIds(ids);
|
||||
List<ProductSpuDO> list = productSpuMapper.selectByIds(ids);
|
||||
Map<Long, ProductSpuDO> spuMap = CollectionUtils.convertMap(list, ProductSpuDO::getId);
|
||||
// 校验
|
||||
ids.forEach(id -> {
|
||||
@@ -202,7 +202,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Map<Long, ProductSpuDO> spuMap = convertMap(productSpuMapper.selectBatchIds(ids), ProductSpuDO::getId);
|
||||
Map<Long, ProductSpuDO> spuMap = convertMap(productSpuMapper.selectByIds(ids), ProductSpuDO::getId);
|
||||
// 需要按照 ids 顺序返回。例如说:店铺装修选择了 [3, 1, 2] 三个商品,返回结果还是 [3, 1, 2] 这样的顺序
|
||||
return convertList(ids, spuMap::get);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user