package com.qmth.sop.business.mapper;

import com.qmth.sop.business.bean.result.ServiceRegionDetailResult;
import com.qmth.sop.business.entity.TBServiceRegionDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 服务区域规划明细表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2023-08-01
 */
public interface TBServiceRegionDetailMapper extends BaseMapper<TBServiceRegionDetail> {

    /**
     * 根据服务单元id和派单号查询所对应的服务区域规划明细信息（大区经理，明细id等）
     *
     * @param serviceUnitId 服务单元id
     * @param crmNo         派单号
     * @return 大区经理id集合
     */
    List<ServiceRegionDetailResult> findRegionDetailByServiceUnitIdAndCrmNo(@Param("serviceUnitId") Long serviceUnitId,
                                                                            @Param("crmNo") String crmNo);

}