| | |
| | | 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; |
| | |
| | | @ApiImplicitParam(value = "订单状态", name = "status", required = true, dataType = "int"), |
| | | }) |
| | | @GetMapping("/getMyOrderList") |
| | | public TableDataInfo<OrderVO> getMyOrderList(@RequestParam("status") Integer status) { |
| | | public TableDataInfo<OrderVO> getMyOrderList(@RequestParam(value = "status",required = false) Integer status) { |
| | | startPage(); |
| | | LoginUser loginUserApplet = tokenService.getLoginUserApplet(); |
| | | return getDataTable(orderService.selectOrderListByUserId(status, loginUserApplet.getUserid())); |
| | |
| | | |
| | | @GetMapping("/getShopOrderList") |
| | | @ApiOperation(value = "获取订单列表", tags = {"门店后台-订单管理-获取订单列表"}) |
| | | public R<IPage<OrderPageListVo>> getShopOrderList(@RequestParam("content") String content , |
| | | @RequestParam("status") Integer status, |
| | | public R<IPage<OrderPageListVo>> getShopOrderList(@RequestParam(value = "content",required = false) String content , |
| | | @RequestParam(value = "status",required = false) Integer status, |
| | | @RequestParam("shopId") Integer shopId, |
| | | @RequestParam("pageNum") Integer pageNum, |
| | | @RequestParam("pageSize") Integer pageSize) { |
| | |
| | | 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, "订单数据"); |
| | | } |