package org.xyzh.workcase.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.xyzh.api.workcase.dto.TbCustomerServiceDTO;
import org.xyzh.api.workcase.vo.CustomerServiceVO;
import org.xyzh.common.core.page.PageParam;

/**
 * @description    客服人员配置数据访问层
 * @filename    TbCustomerServiceMapper.java
 * @author    cascade
 * @copyright xyzh
 * @since 2025-12-22
 */
@Mapper
public interface TbCustomerServiceMapper {

    /**
     * 插入客服人员配置
     */
    int insertCustomerService(TbCustomerServiceDTO customerService);

    /**
     * 更新客服人员配置（只更新非null字段）
     */
    int updateCustomerService(TbCustomerServiceDTO customerService);

    /**
     * 逻辑删除客服人员配置
     */
    int deleteCustomerService(TbCustomerServiceDTO customerService);

    /**
     * 根据ID查询客服人员配置
     */
    TbCustomerServiceDTO selectCustomerServiceById(@Param("userId") String userId);

    /**
     * 查询客服人员配置列表
     */
    List<CustomerServiceVO> selectCustomerServiceList(@Param("filter") TbCustomerServiceDTO filter);

    /**
     * 分页查询客服人员配置
     */
    List<CustomerServiceVO> selectCustomerServicePage(@Param("filter") TbCustomerServiceDTO filter, @Param("pageParam") PageParam pageParam);

    /**
     * 统计客服人员配置数量
     */
    long countCustomerServices(@Param("filter") TbCustomerServiceDTO filter);

}
