package com.fjhx.sale.controller.ext;

import com.fjhx.sale.entity.ext.dto.ExtQuotationFollowDto;
import com.fjhx.sale.entity.ext.vo.ExtQuotationFollowVo;
import com.fjhx.sale.service.ext.ExtQuotationFollowService;
import com.ruoyi.common.core.domain.BaseSelectDto;
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 2024-01-14
 */
@RestController
@RequestMapping("/extQuotationFollow")
public class ExtQuotationFollowController {

    @Autowired
    private ExtQuotationFollowService extQuotationFollowService;

    /**
     * 对外报价单跟进记录明细
     */
    @PostMapping("/detail")
    public ExtQuotationFollowVo detail(@RequestBody BaseSelectDto dto) {
        return extQuotationFollowService.detail(dto.getId());
    }

    /**
     * 对外报价单跟进记录新增
     */
    @PostMapping("/add")
    public void add(@RequestBody ExtQuotationFollowDto extQuotationFollowDto) {
        extQuotationFollowService.add(extQuotationFollowDto);
    }

    /**
     * 对外报价单跟进记录编辑
     */
    @PostMapping("/edit")
    public void edit(@RequestBody ExtQuotationFollowDto extQuotationFollowDto) {
        extQuotationFollowService.edit(extQuotationFollowDto);
    }

    /**
     * 对外报价单跟进记录删除
     */
    @PostMapping("/delete")
    public void delete(@RequestBody BaseSelectDto dto) {
        extQuotationFollowService.delete(dto.getId());
    }

}
