| | |
| | | import com.mzl.flower.base.BaseController; |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.config.exception.ValidationException; |
| | | import com.mzl.flower.dto.request.coupon.CreateCouponRecordDTO; |
| | | import com.mzl.flower.dto.request.coupon.QueryCouponRecordDTO; |
| | | import com.mzl.flower.dto.request.payment.OrderItemSalesQueryDTO; |
| | | import com.mzl.flower.dto.request.report.QueryOrderDTO; |
| | | import com.mzl.flower.dto.response.coupon.CouponRecordResultVO; |
| | | import com.mzl.flower.dto.response.coupon.CouponRecordVO; |
| | | import com.mzl.flower.dto.response.report.OrderDetailReportResultVO; |
| | | import com.mzl.flower.dto.response.report.OrderReportResultVO; |
| | | import com.mzl.flower.entity.coupon.CouponRecordDO; |
| | | import com.mzl.flower.entity.coupon.CouponTemplateDO; |
| | | import com.mzl.flower.enums.CouponStatusEnum; |
| | | import com.mzl.flower.service.coupon.CouponRecordService; |
| | | import com.mzl.flower.service.coupon.CouponTemplateService2; |
| | | import com.mzl.flower.service.report.OrderReportService; |
| | | import com.mzl.flower.utils.ConverterUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | @GetMapping("/sale/page") |
| | | @ApiOperation(value = "查询-分页", notes = "查询-分页") |
| | | public ResponseEntity<ReturnDataDTO<Page<OrderReportResultVO>>> page( |
| | | Page page, QueryOrderDTO dto |
| | | Page page,@Validated QueryOrderDTO dto |
| | | ) { |
| | | return returnData(R.SUCCESS.getCode(), ConverterUtil.transPage(orderReportService.getSalePage(page,dto), OrderReportResultVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/sale/statis") |
| | | @ApiOperation(value = "统计", notes = "统计") |
| | | public ResponseEntity<ReturnDataDTO<OrderReportResultVO>> statis(QueryOrderDTO dto |
| | | public ResponseEntity<ReturnDataDTO<OrderReportResultVO>> statis(@Validated QueryOrderDTO dto |
| | | ) { |
| | | return returnData(R.SUCCESS.getCode(), ConverterUtil.transObject(orderReportService.getSaleStatis(dto), OrderReportResultVO.class)); |
| | | } |
| | |
| | | |
| | | @GetMapping({"/sale/export"}) |
| | | @ApiOperation(value = "报告列表导出") |
| | | public void exportSales(HttpServletResponse response, QueryOrderDTO dto){ |
| | | public void exportSales(HttpServletResponse response,@Validated QueryOrderDTO dto){ |
| | | orderReportService.exportSalesList(response, dto); |
| | | } |
| | | |
| | | @GetMapping("/detail/page") |
| | | @ApiOperation(value = "查询-分页", notes = "查询-分页") |
| | | public ResponseEntity<ReturnDataDTO<Page<OrderDetailReportResultVO>>> detail(Page page, QueryOrderDTO dto) { |
| | | return returnData(R.SUCCESS.getCode(), orderReportService.getOrderDetailPage(page, dto)); |
| | | } |
| | | |
| | | @GetMapping("/detail/export") |
| | | @ApiOperation(value = "订单结算明细导出") |
| | | public void exportOrderDetail(HttpServletResponse response, QueryOrderDTO queryOrderDTO) { |
| | | orderReportService.exportOrderDetail(response, queryOrderDTO); |
| | | } |
| | | |
| | | } |