package com.ruoyi.ibs.grid.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ibs.grid.domain.entity.RegionCustUser;
import com.ruoyi.ibs.grid.domain.vo.CustVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 吴凯程
 * @Date 2025/2/8
 **/
@Mapper
public interface RegionCustUserMapper extends BaseMapper<RegionCustUser> {
    List<CustVO> selectCustByCode(@Param("codeList") List<String> codeList, @Param("dept") String dept);

    List<CustVO> selectPrivateCustByCode(@Param("codeList") List<String> codeList, @Param("dept") String dept);

    List<CustVO> selectPublicCustByCode(@Param("codeList") List<String> codeList, @Param("dept") String dept);


    int batchInsert(@Param("custList") List<RegionCustUser> custList, @Param("dept") String dept);

    int batchUpdate(@Param("dept") String dept, @Param("codeList") List<String> codeList, @Param("topGridId") Long topGridId ,
                    @Param("secGridId") Long secGridId, @Param("secGridName") String secGridName,
                    @Param("outletIds")String outletIds, @Param("outletNames")String outletNames,
                    @Param("userNames") String userNames, @Param("nickNames") String nickNames);

    int batchDeleteTopGrid(@Param("gridId") Long gridId, @Param("dept") String dept);

    int batchDeleteSecGrid(@Param("gridId") Long gridId, @Param("dept") String dept);

}
