package cn.iocoder.yudao.module.asset.dal.mysql.customer;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.asset.dal.dataobject.customer.CustomerBusinessManagerDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 客户业务负责人关联 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CustomerBusinessManagerMapper extends BaseMapperX<CustomerBusinessManagerDO> {

    /**
     * 根据客户ID查询业务负责人列表
     */
    default List<CustomerBusinessManagerDO> selectListByCustomerId(Long customerId) {
        return selectList(CustomerBusinessManagerDO::getCustomerId, customerId);
    }

    /**
     * 根据客户ID删除业务负责人
     */
    default void deleteByCustomerId(Long customerId) {
        delete(CustomerBusinessManagerDO::getCustomerId, customerId);
    }

}
