package com.ruoyi.ibs.draw.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ibs.draw.domain.dto.grid.DrawGridCustListDTO;
import com.ruoyi.ibs.draw.domain.entity.DrawGridCustUserUnbind;
import com.ruoyi.ibs.draw.domain.vo.DrawGridCustVO;
import com.ruoyi.ibs.grid.domain.entity.RegionCustUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 吴凯程
 * @Date 2024/12/27
 **/
@Mapper
public interface DrawGridCustUserUnbindMapper extends BaseMapper<DrawGridCustUserUnbind> {
    List<DrawGridCustVO> getCustList(DrawGridCustListDTO drawGridCustListDTO);

    List<DrawGridCustVO> getCustListByManager(DrawGridCustListDTO drawGridCustListDTO);

    /**
     * 根据绘制网格ID查询所有客户（用于客群导入，拼接headId绕过拦截器）
     * @param gridId 绘制网格ID
     * @param headId 总行机构号前三位（用于拼接动态表名）
     * @return 客户列表
     */
    List<RegionCustUser> selectCustByDrawGridId(@Param("gridId") Long gridId, @Param("headId") String headId);


}
