|
@@ -11,6 +11,7 @@ import cn.newfeifan.mall.module.trade.controller.app.cart.vo.*;
|
|
|
import cn.newfeifan.mall.module.trade.convert.cart.TradeCartConvert;
|
|
|
import cn.newfeifan.mall.module.trade.dal.dataobject.cart.CartDO;
|
|
|
import cn.newfeifan.mall.module.trade.dal.mysql.cart.CartMapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -170,7 +171,17 @@ public class CartServiceImpl implements CartService {
|
|
|
}
|
|
|
appCartListRespVO.setShopSkuMap(shopSkuMap);
|
|
|
|
|
|
- List<ShopDO> shopDOList = shopMapper.selectList("id", shopSkuMap.keySet());
|
|
|
+ List<Long> list = new ArrayList<Long>();
|
|
|
+ for (Long shopId : shopSkuMap.keySet()) {
|
|
|
+ list.add(shopId);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ShopDO> shopDOList = shopMapper.selectBatchIds(list);
|
|
|
+
|
|
|
+// QueryWrapper<ShopDO> queryWrapper = new QueryWrapper<>();
|
|
|
+// queryWrapper.in("id", shopSkuMap.keySet()); // 使用 in 方法并传入 ID 列表
|
|
|
+// List<ShopDO> shopDOList = shopMapper.selectList(queryWrapper);
|
|
|
+
|
|
|
//key为店铺ID,value为店铺名
|
|
|
Map<Long,String> shopNameMap = new HashMap<Long,String>();
|
|
|
for(ShopDO shopDO:shopDOList){
|