Compare commits

...

2 Commits

Author SHA1 Message Date
fc61abbe3b Merge pull request '修改积分商城报错' (#36) from sjy-two into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #36
2024-10-09 11:29:03 +08:00
56e27a925e 修改积分商城报错 2024-10-09 10:41:51 +08:00

View File

@ -4,6 +4,9 @@ import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
/**
* 商品 SPU API 接口
@ -21,6 +24,16 @@ public interface ProductSpuApi {
*/
List<ProductSpuRespDTO> getSpuList(Collection<Long> ids);
/**
* 批量查询 SPU MAP
*
* @param ids SPU 编号列表
* @return SPU MAP
*/
default Map<Long, ProductSpuRespDTO> getSpusMap(Collection<Long> ids) {
return convertMap(getSpuList(ids), ProductSpuRespDTO::getId);
}
/**
* 批量查询 SPU 数组并且校验是否 SPU 是否有效
*