fix: selectBatchIds 已过期

This commit is contained in:
xingyu4j
2025-05-26 14:06:02 +08:00
parent 837f155668
commit 5caf990920
63 changed files with 101 additions and 101 deletions

View File

@@ -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

View File

@@ -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 -> {

View File

@@ -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

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -154,7 +154,7 @@ public class BargainActivityServiceImpl implements BargainActivityService {
@Override
public List<BargainActivityDO> getBargainActivityList(Set<Long> ids) {
return bargainActivityMapper.selectBatchIds(ids);
return bargainActivityMapper.selectByIds(ids);
}
@Override

View File

@@ -132,7 +132,7 @@ public class CouponTemplateServiceImpl implements CouponTemplateService {
@Override
public List<CouponTemplateDO> getCouponTemplateList(Collection<Long> ids) {
return couponTemplateMapper.selectBatchIds(ids);
return couponTemplateMapper.selectByIds(ids);
}
}

View File

@@ -104,7 +104,7 @@ public class DiyPageServiceImpl implements DiyPageService {
if (CollUtil.isEmpty(ids)) {
return ListUtil.empty();
}
return diyPageMapper.selectBatchIds(ids);
return diyPageMapper.selectByIds(ids);
}
@Override

View File

@@ -132,7 +132,7 @@ public class SeckillConfigServiceImpl implements SeckillConfigService {
return;
}
// 1. 如果有数量不匹配,说明有不存在的,则抛出 SECKILL_CONFIG_NOT_EXISTS 业务异常
List<SeckillConfigDO> configs = seckillConfigMapper.selectBatchIds(ids);
List<SeckillConfigDO> configs = seckillConfigMapper.selectByIds(ids);
if (configs.size() != ids.size()) {
throw exception(SECKILL_CONFIG_NOT_EXISTS);
}

View File

@@ -176,7 +176,7 @@ public class DeliveryExpressTemplateServiceImpl implements DeliveryExpressTempla
@Override
public List<DeliveryExpressTemplateDO> getDeliveryExpressTemplateList(Collection<Long> ids) {
return expressTemplateMapper.selectBatchIds(ids);
return expressTemplateMapper.selectByIds(ids);
}
@Override
@@ -205,7 +205,7 @@ public class DeliveryExpressTemplateServiceImpl implements DeliveryExpressTempla
if (CollUtil.isEmpty(ids)) {
return Collections.emptyMap();
}
List<DeliveryExpressTemplateDO> templateList = expressTemplateMapper.selectBatchIds(ids);
List<DeliveryExpressTemplateDO> templateList = expressTemplateMapper.selectByIds(ids);
// 查询 templateCharge 数组
List<DeliveryExpressTemplateChargeDO> chargeList = expressTemplateChargeMapper.selectByTemplateIds(ids);
// 查询 templateFree 数组

View File

@@ -75,7 +75,7 @@ public class DeliveryPickUpStoreServiceImpl implements DeliveryPickUpStoreServic
@Override
public List<DeliveryPickUpStoreDO> getDeliveryPickUpStoreList(Collection<Long> ids) {
return deliveryPickUpStoreMapper.selectBatchIds(ids);
return deliveryPickUpStoreMapper.selectByIds(ids);
}
@Override

View File

@@ -84,7 +84,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
if (CollUtil.isEmpty(ids)) {
return Collections.emptyList();
}
return tradeOrderMapper.selectBatchIds(ids);
return tradeOrderMapper.selectByIds(ids);
}
@Override