package com.fdkankan.platform.goods.controller.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fdkankan.common.controller.BaseController;
import com.fdkankan.platform.order.service.IInvoiceService;
import com.fdkankan.platform.user.request.RequestInvoice;
import com.fdkankan.platform.user.vo.ResponseInvoice;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 设备中心接口-设备发票模块
 */
@Log4j2
@RestController
@RequestMapping("/service/platform/device/invoice")
public class DeviceInvoiceController extends BaseController {

    @Autowired
    private IInvoiceService invoiceService;

    /**
     * 设备发票列表
     * pageNum
     * pageSize
     * @return
     */
    @RequestMapping(value = "/list", method = RequestMethod.POST)
    public Page<ResponseInvoice> getInvoices(@RequestBody RequestInvoice param) throws Exception {
        return invoiceService.listInvoice(param,null);
    }


}
