package com.yh.saas.plugin.yiliangyiyun.controller;


import com.baomidou.mybatisplus.plugins.Page;
import com.yh.saas.plugin.yiliangyiyun.entity.CustomerInfo;
import com.yh.saas.plugin.yiliangyiyun.entity.InventoryCostInfo;
import com.yh.saas.plugin.yiliangyiyun.service.ICustomerInfoService;
import com.yh.saas.plugin.yiliangyiyun.service.IInventoryCostInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.text.ParseException;

/**
 * <p>
 * 库点费用信息 前端控制器
 * </p>
 *
 * @author Gdc
 * @since 2021-10-08
 */
@RestController
@RequestMapping("/inventoryCostInfo")
public class InventoryCostInfoController {
    @Autowired
    private IInventoryCostInfoService iInventoryCostInfoService;
    /**
     * 列表
     * @param inventoryCostInfo
     * @return
     */
    @GetMapping("/selectInventoryCostInfo")
    public Page<InventoryCostInfo> selectInventoryCostInfo(InventoryCostInfo inventoryCostInfo) throws ParseException {
        return iInventoryCostInfoService.selectInventoryCostInfo(inventoryCostInfo);
    }


    /**
     * 添加
     * @param inventoryCostInfo
     * @return
     */
    @PostMapping("/api/addInventoryCostInfo")
    public String addInventoryCostInfo(@RequestBody InventoryCostInfo inventoryCostInfo){
        return iInventoryCostInfoService.addInventoryCostInfo(inventoryCostInfo);
    }
    /**
     * 编辑
     * @param inventoryCostInfo
     * @return
     */
    @PostMapping("/api/editInventoryCostInfo")
    public String editInventoryCostInfo(@RequestBody InventoryCostInfo inventoryCostInfo){
        return iInventoryCostInfoService.editInventoryCostInfo(inventoryCostInfo);
    }

}

