package com.fjhx.sale.controller.contract;

import com.fjhx.sale.entity.contract.dto.ContractProductFollowUpDto;
import com.fjhx.sale.entity.contract.dto.ContractProductFollowUpSelectDto;
import com.fjhx.sale.entity.contract.vo.ContractProductFollowUpVo;
import com.fjhx.sale.service.contract.ContractProductFollowUpService;
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;

import java.util.List;

/**
 * <p>
 * 外销合同-产品-跟进记录 前端控制器
 * </p>
 *
 * @author
 * @since 2023-06-14
 */
@RestController
@RequestMapping("/contractProductFollowUp")
public class ContractProductFollowUpController {

    @Autowired
    private ContractProductFollowUpService contractProductFollowUpService;

    /**
     * 外销合同-产品-跟进记录列表
     */
    @PostMapping("/list")
    public List<ContractProductFollowUpVo> list(@RequestBody ContractProductFollowUpSelectDto dto) {
        return contractProductFollowUpService.getList(dto);
    }

    /**
     * 外销合同-产品-跟进记录新增
     */
    @PostMapping("/add")
    public void add(@RequestBody ContractProductFollowUpDto contractProductFollowUpDto) {
        contractProductFollowUpService.add(contractProductFollowUpDto);
    }

}
