package com.fjhx.purchase.controller.purchase;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.purchase.entity.purchase.dto.PurchasePayRecordDetailSelectDto;
import com.fjhx.purchase.entity.purchase.vo.PurchasePayRecordDetailVo;
import com.fjhx.purchase.service.purchase.PurchasePayRecordDetailService;
import org.springframework.beans.factory.annotation.Autowired;
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;


/**
 * <p>
 * 采购付款记录 前端控制器
 * </p>
 *
 * @author
 * @since 2023-05-23
 */
@RestController
@RequestMapping("/purchasePayRecordDetail")
public class PurchasePayRecordDetailController {

    @Autowired
    private PurchasePayRecordDetailService purchasePayRecordDetailService;

    /**
     * 采购付款记录分页
     */
    @PostMapping("/page")
    public Page<PurchasePayRecordDetailVo> page(@RequestBody PurchasePayRecordDetailSelectDto dto) {
        return purchasePayRecordDetailService.getPage(dto);
    }

    /**
     * 采购付款记录清空
     */
    @PostMapping("/empty")
    public void empty(@RequestBody PurchasePayRecordDetailSelectDto dto) {
        purchasePayRecordDetailService.empty(dto);
    }

}
