package com.qmth.sop.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.sop.business.entity.TBCrmDetail;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 派单明细表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2024-05-14
 */
public interface TBCrmDetailMapper extends BaseMapper<TBCrmDetail> {

    /**
     * 查询派单明细sop信息列表
     *
     * @param iPage
     * @param crmNo
     * @return
     */
    IPage<TBCrmDetail> list(IPage<Map> iPage, @Param("crmNo") String crmNo);

    /**
     * 根据服务单元和客户id查询派单详情
     *
     * @param serviceId 服务单元id
     * @param customId  客户id
     * @return 结果
     */
    List<TBCrmDetail> findByServiceIdAndCustomId(@Param("serviceId") Long serviceId, @Param("customId") Long customId);
}
