package com.retdata.yaoyibi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.retdata.yaoyibi.domain.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Collection;
import java.util.List;

public interface CsoSysDeptMapper extends BaseMapper<CsoSysDept> {
    List<CsoSysDeptSummary> selectSummariesByIds(@Param("ids") Collection<Integer> ids);

    List<CsoSysDeptSummary> selectRootScorePackageSenders(@Param("keyword") String keyword);

    List<CsoSysDeptSummary> selectSubjectTypeAndAgentType(@Param("ids") Collection<Integer> ids);

    Page<CsoSysDeptSearchDto> selectPage(Page<CsoSysDeptSearchDto> page,
                                         @Param("searchParams") CsoSysDeptSearchParams searchParams);

    List<CsoSysDeptChildrenDto> selectChildrenCount(@Param("ids") Collection<Integer> ids);

    List<CsoSysDeptSearchDto> selectAll(@Param("searchParams") CsoSysDeptSearchParams searchParams);

    List<CsoSysDeptSearchDto> selectByIds(@Param("ids") Collection<Integer> ids);

    List<CsoSysDeptParentDto> selectParents();

    @Select("select dept_id,name from sys_dept where dept_id!=1")
    List<CsoSysDeptSummary> selectAllSummaries();

    List<SysDeptSignProduct> selectAllSignProducts();
    
}
