| | |
| | | import com.ruoyi.account.api.model.UserAddress; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.core.web.page.TableDataInfo; |
| | |
| | | */ |
| | | @PostMapping("/importExpress") |
| | | public R importExpress(@RequestParam("file") MultipartFile file){ |
| | | return null; |
| | | orderService.importExpress(file); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 导出订单信息 |
| | | */ |
| | | @GetMapping("/exportExpress") |
| | | public void exportExpress(HttpServletResponse response,OrderPageList orderPage){ |
| | | PageInfo<OrderPageListVo> orderPageList = orderService.getOrderPageList(orderPage); |
| | | List<OrderPageListVo> list = orderPageList.getRecords(); |
| | | ExcelUtil<OrderPageListVo> util = new ExcelUtil<OrderPageListVo>(OrderPageListVo.class); |
| | | util.exportExcel(response, list, "订单数据"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取用户订单数量 |
| | | * @param appUserId |
| | | * @return |
| | | */ |
| | | @PostMapping("/getOrderCountByAppUserId") |
| | | public R<Long> getOrderCountByAppUserId(@RequestParam("id") Long appUserId){ |
| | | long count = orderService.count(new LambdaQueryWrapper<Order>().eq(Order::getDelFlag, 0) |
| | | .eq(Order::getAppUserId, appUserId).in(Order::getOrderStatus, Arrays.asList(1, 2, 3, 4, 7, 8)) |
| | | .eq(Order::getPayStatus, 2)); |
| | | return R.ok(count); |
| | | } |
| | | } |
| | | |