mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-26 00:45:08 +08:00
【修复】商城系统:店铺装修时,商品列表组件返回的商品信息,按照选择的顺序返回
This commit is contained in:
@ -192,7 +192,9 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
|||||||
if (CollUtil.isEmpty(ids)) {
|
if (CollUtil.isEmpty(ids)) {
|
||||||
return Collections.emptyList();
|
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
|
@Override
|
||||||
|
Reference in New Issue
Block a user