| | |
| | | import com.ruoyi.order.vo.*; |
| | | import com.ruoyi.other.api.domain.BaseSetting; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.api.dto.ShopAnalysisDTO; |
| | | import com.ruoyi.other.api.feignClient.BaseSettingClient; |
| | | import com.ruoyi.other.api.feignClient.ShopClient; |
| | |
| | | orderExport.setSupplierCostPrice(goods.getShopCost());*/ |
| | | } |
| | | }); |
| | | |
| | | List<Shop> data = shopClient.getAllShop().getData(); |
| | | // 转化为map |
| | | Map<Integer, Shop> shopMap = data.stream().collect(Collectors.toMap(Shop::getId, shop -> shop)); |
| | | for (OrderExport orderExport : orderExportList) { |
| | | Shop shop = shopMap.get(orderExport.getShopId()); |
| | | if (shop!=null){ |
| | | orderExport.setShopName(shop.getName()); |
| | | } |
| | | } |
| | | ExcelUtil<OrderExport> util = new ExcelUtil<OrderExport>(OrderExport.class); |
| | | util.exportExcel(response, orderExportList, "订单数据"); |
| | | } |