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.PurchasePriceVo;
import vip.xiaonuo.purchase.param.PurchasePayParam;
import vip.xiaonuo.purchase.param.PurchasePriceParam;
import vip.xiaonuo.purchase.service.IPurchasePriceService;

import java.util.List;

/**
 * <p>
 * 采购单品价格表 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-27
 */
@RequestMapping("/purchase-price")
@Api(tags = "采购单品价格表控制器")
@ApiSupport(author = "wang", order = 1)
@RestController
@Validated
public class PurchasePriceController {

    @Autowired
    private IPurchasePriceService priceService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("采购单品价格环比")
    @PostMapping("/purchase-price-pay/getList")
    public CommonResult<List<PurchasePriceVo>> getList(@RequestBody PurchasePriceParam priceParam) {
        return CommonResult.data(priceService.getList(priceParam));
    }
}
