| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.domain.dto.MgtMemberOrderPageDto; |
| | | import com.ruoyi.order.domain.dto.MgtMemberOrderTotalDto; |
| | | import com.ruoyi.order.domain.dto.MgtShopAllOrderPageDto; |
| | | import com.ruoyi.order.domain.dto.MgtShopOrderPageDto; |
| | | import com.ruoyi.order.domain.dto.*; |
| | | import com.ruoyi.order.domain.vo.*; |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | |
| | | util.exportExcel(response, shopAllOrderPageVoList, "商户订单记录"); |
| | | } |
| | | |
| | | //todo 取消 |
| | | //取消 |
| | | @RequestMapping(value = "/cancelOrderBySys", method = RequestMethod.POST) |
| | | @Log(title = "订单管理", businessType = BusinessType.UPDATE,operContent = "取消订单") |
| | | @ApiOperation(value = "取消订单【2.0】") |
| | | public R cancelOrderBySys(@RequestBody CancelOrderDTO dto) { |
| | | return orderService.cancelOrderBySys(dto); |
| | | } |
| | | //退款 |
| | | @RequestMapping(value = "/refundOrderBySys", method = RequestMethod.POST) |
| | | @Log(title = "订单管理", businessType = BusinessType.UPDATE,operContent = "退款") |
| | | @ApiOperation(value = "退款【2.0】") |
| | | public R refundOrderBySys(@RequestBody CancelOrderDTO dto) { |
| | | return orderService.refundOrderBySys(dto); |
| | | } |
| | | |
| | | //todo 退款 |
| | | //todo 分页获取三方订单 |
| | | //todo 导出 |
| | | |
| | | //分页获取三方订单 |
| | | @RequestMapping(value = "/pageMgtThirdOrder", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取三方订单") |
| | | public R<Page<MgtThirdOrderPageVo>> pageMgtThirdOrder(@RequestBody MgtThirdOrderPageDto dto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | dto.setUserId(userId); |
| | | Page<MgtThirdOrderPageVo> page = new Page<>(); |
| | | page.setSize(dto.getPageSize()); |
| | | page.setCurrent(dto.getPageNum()); |
| | | List<MgtThirdOrderPageVo> thirdOrderPageVoList = orderService.pageMgtThirdOrder(page,dto); |
| | | return R.ok(page.setRecords(thirdOrderPageVoList)); |
| | | } |
| | | // 导出三方订单 |
| | | @RequestMapping(value = "/exportPageMgtThirdOrder", method = RequestMethod.POST) |
| | | @ApiOperation(value = "导出三方订单列表") |
| | | public void exportPageMgtThirdOrder( MgtThirdOrderPageDto mgtShopOrderPageDto, HttpServletResponse response) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtShopOrderPageDto.setUserId(userId); |
| | | Page<MgtThirdOrderPageVo> page = new Page<>(); |
| | | page.setSize(Integer.MAX_VALUE); |
| | | page.setCurrent(1); |
| | | List<MgtThirdOrderPageVo> mgtActivityOrderPageVos = orderService.pageMgtThirdOrder(page,mgtShopOrderPageDto); |
| | | ExcelUtil<MgtThirdOrderPageVo> util = new ExcelUtil<MgtThirdOrderPageVo>(MgtThirdOrderPageVo.class); |
| | | util.exportExcel(response, mgtActivityOrderPageVos, "秒杀订单列表", "秒杀订单列表"); |
| | | } |
| | | |
| | | } |