【修复】商城系统:店铺装修时,商品列表组件返回的商品信息,按照选择的顺序返回
This commit is contained in:
parent
ab00986a1d
commit
bbfff1bae3
@ -192,7 +192,9 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return productSpuMapper.selectBatchIds(ids);
|
||||
Map<Long, ProductSpuDO> spuMap = convertMap(productSpuMapper.selectBatchIds(ids), ProductSpuDO::getId);
|
||||
// 需要按照 ids 顺序返回。例如说:店铺装修选择了 [3, 1, 2] 三个商品,返回结果还是 [3, 1, 2] 这样的顺序
|
||||
return convertList(ids, spuMap::get);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user