From a41ca5df78d3655e6dc1ff38824f0df9b36f45e3 Mon Sep 17 00:00:00 2001
From: gongzuming <gongzuming>
Date: 星期三, 09 十月 2024 09:29:09 +0800
Subject: [PATCH] 支付

---
 src/main/java/com/mzl/flower/web/v2/report/OrderReportController.java |   44 +++++++++++++++++++++++++++++++-------------
 1 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/src/main/java/com/mzl/flower/web/v2/report/OrderReportController.java b/src/main/java/com/mzl/flower/web/v2/report/OrderReportController.java
index 71ed3c6..b94025a 100644
--- a/src/main/java/com/mzl/flower/web/v2/report/OrderReportController.java
+++ b/src/main/java/com/mzl/flower/web/v2/report/OrderReportController.java
@@ -5,27 +5,19 @@
 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.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;
 import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
 
 
 /**
@@ -44,10 +36,36 @@
 
     @GetMapping("/sale/page")
     @ApiOperation(value = "查询-分页", notes = "查询-分页")
-    public ResponseEntity<ReturnDataDTO<Page<CouponRecordVO>>> page(
-            Page page, QueryOrderDTO dto
+    public ResponseEntity<ReturnDataDTO<Page<OrderReportResultVO>>> page(
+            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(@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,@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);
+    }
+
 }
\ No newline at end of file

--
Gitblit v1.9.3