package com.fjhx.customer.controller.customer;

import org.springframework.web.bind.annotation.*;
import com.fjhx.customer.entity.customer.dto.CustomerTopDto;
import com.ruoyi.common.core.domain.BaseSelectDto;
import com.fjhx.customer.service.customer.CustomerTopService;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * <p>
 * 客户置顶表 前端控制器
 * </p>
 *
 * @author
 * @since 2023-05-09
 */
@RestController
@RequestMapping("/customerTop")
public class CustomerTopController {

    @Autowired
    private CustomerTopService customerTopService;

    /**
     * 客户置顶表新增
     */
    @PostMapping("/add")
    public void add(@RequestBody CustomerTopDto customerTopDto) {
        customerTopService.add(customerTopDto);
    }

    /**
     * 客户置顶表删除
     */
    @PostMapping("/delete")
    public void delete(@RequestBody CustomerTopDto dto) {
        customerTopService.delete(dto.getCustomerId());
    }

}
