package com.cm.central.control.dao.customer;

import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.common.result.SuccessResultList;
import com.cm.central.control.pojo.dtos.customer.CustomerDTO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: ICustomerDao
 * @Description: 客户管理
 * @Author: WenG
 * @Date: 2020-07-30 19:00
 * @Version: 1.0
 **/
@Repository
public interface ICustomerDao {

    /**
     * 新增客户管理
     *
     * @param params
     * @throws SaveException
     */
    void saveCustomer(Map<String, Object> params) throws SaveException;

    /**
     * 删除客户管理
     *
     * @param params
     * @throws RemoveException
     */
    void removeCustomer(Map<String, Object> params) throws RemoveException;

    /**
    * 删除客户管理（物理）
    *
    * @param params
    * @throws RemoveException
    */
    void deleteCustomer(Map<String, Object> params) throws RemoveException;

    /**
     * 修改客户管理
     *
     * @param params
     * @throws UpdateException
     */
    void updateCustomer(Map<String, Object> params) throws UpdateException;

    /**
     * 客户管理详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    CustomerDTO getCustomer(Map<String, Object> params) throws SearchException;

    /**
     * 客户管理列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<CustomerDTO> listCustomer(Map<String, Object> params) throws SearchException;

    /**
    * 客户管理统计
    *
    * @param params
    * @return
    * @throws SearchException
    */
    Integer countCustomer(Map<String, Object> params) throws SearchException;

}