package com.hc.web.controller.browser.back;

import com.hc.business.service.OrdersService;
import com.hc.core.utils.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 10696
 */

@RestController
@RequestMapping("/new/api/back/orderInvoices")
public class BackOrderInvoicesController {

    private final OrdersService ordersService;

    public BackOrderInvoicesController(OrdersService ordersService) {
        this.ordersService = ordersService;
    }

    @GetMapping("/list")
    @ApiOperation(value = "获取 全部订单发票信息 (分页)", response = Result.class)
    public Result listBackOrderInvoices(@RequestParam(defaultValue = "0") Integer page,
                                        @RequestParam(defaultValue = "0") Integer size) {
        return Result.success(ordersService.queryAllWithOrderInvoices(page, size));
    }


}
