package vip.xiaonuo.purchase.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.pojo.CommonResult;
import vip.xiaonuo.purchase.entity.PurchasePay;
import vip.xiaonuo.purchase.entity.vo.PurchaseOrderVo;
import vip.xiaonuo.purchase.param.PurchaseParam;
import vip.xiaonuo.purchase.param.PurchasePayParam;
import vip.xiaonuo.purchase.service.IPurchasePayService;

/**
 * <p>
 * 采购应付账款 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-26
 */

@Api(tags = "采购应付账款控制器")
@ApiSupport(author = "wang", order = 1)
@RestController
@Validated
public class PurchasePayController {

    @Autowired
    private IPurchasePayService payService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("应付账款明细表")
    @PostMapping("/purchase-pay/listPay")
    public CommonResult<Page<PurchasePay>> listPay(@RequestBody PurchasePayParam purchasePayParam) {
        return CommonResult.data(payService.listPay(purchasePayParam));
    }
}
