package com.inspect.system.mapper;

import com.inspect.system.base.domain.SysDept;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SysDeptMapper {
    List<SysDept> selectDeptList(SysDept var1);

    List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);

    SysDept selectDeptById(Long id);

    List<SysDept> selectChildrenDeptById(Long id);

    int selectNormalChildrenDeptById(Long id);

    int hasChildByDeptId(Long deptId);

    int checkDeptExistUser(Long deptId);

    SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);

    int insertDept(SysDept sysDept);

    int updateDept(SysDept sysDept);

    void updateDeptStatusNormal(Long[] deptIds);

    int updateDeptChildren(@Param("depts") List<SysDept> sysDeptList);

    int deleteDeptById(Long id);
}
