|
@@ -152,7 +152,12 @@ public class LiveGoodsServiceImpl extends ServiceImpl<LiveGoodsMapper, LiveGoods
|
|
|
}
|
|
|
// 查询商品信息列表(假设返回 List<StoreProduct>)
|
|
|
List<FsStoreProduct> productInfoList = fsStoreProductMapper.selectFsStoreProductByProductIds(productIdList);
|
|
|
- if (productInfoList.stream().map(FsStoreProduct::getStoreId).collect(Collectors.toSet()).size() > 1) {
|
|
|
+ Set<Long> storeSet = productInfoList.stream().map(FsStoreProduct::getStoreId).collect(Collectors.toSet());
|
|
|
+ List<Long> storeIds = baseMapper.selectStoreIdsByLiveId(liveId);
|
|
|
+ if (!storeIds.isEmpty()) {
|
|
|
+ storeSet.addAll(storeIds);
|
|
|
+ }
|
|
|
+ if (storeSet.size() > 1) {
|
|
|
return R.error("商品来自不同的店铺,请重新选择商品");
|
|
|
}
|
|
|
|