/**
 * @filename:CustomerAssignDao 2024-06-03
 * @project trade-admin V1.0 Copyright(c) 2024 wanglang Co. Ltd. All right reserved.
 */
package com.trade.admin.enterprise.customer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.trade.admin.enterprise.customer.domain.CustomerAssign;
import com.trade.admin.enterprise.customer.domain.SearchCustomerAssign;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description:客户分配Mapper
 * @version: V1.0
 * @author: wanglang
 */
@Mapper
public interface CustomerAssignMapper extends BaseMapper<CustomerAssign> {

    /**
     * 查询官网客户分配信息
     *
     * @param search 查询类
     * @return List<CustomerAssign>官网客户分配集合
     */
    List<CustomerAssign> findBySearch(SearchCustomerAssign search);

    /**
     * 根据用户ID查询被占用的记录数量
     *
     * @param userId B端用户ID
     * @return
     */
    Long countByUserId(@Param("userId") Long userId);
}
