gongzuming
2024-09-26 af77899d830e854d01b48bc12db04b02116e5ea4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.mzl.flower.web.v2.report;
 
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.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.*;
 
 
/**
* @author @TaoJie
* @since 2024-09-25
*/
@RestController
@RequestMapping("/v2/report/order")
@Api(value = "报表-订单", tags = "报表-订单")
@Validated
public class OrderReportController extends BaseController {
 
 
    @Autowired
    private OrderReportService orderReportService;
 
    @GetMapping("/sale/page")
    @ApiOperation(value = "查询-分页", notes = "查询-分页")
    public ResponseEntity<ReturnDataDTO<Page<CouponRecordVO>>> page(
            Page page, QueryOrderDTO dto
    ) {
        return returnData(R.SUCCESS.getCode(), ConverterUtil.transPage(orderReportService.getSalePage(page,dto), OrderReportResultVO.class));
    }
 
}