package com.gkhy.hazmat.system.mapper;
import com.gkhy.hazmat.system.domain.SysDept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* 部门表 Mapper 接口
*
*
* @author kzy
* @since 2024-08-05 14:41:40
*/
@Mapper
public interface SysDeptMapper extends BaseMapper {
/**
* 获取部门列表
* @param dept
* @return
*/
List selectDeptList(SysDept dept);
List selectChildrenDeptById(Long deptId);
void updateDeptStatusNormal(Long[] deptIds);
/**
* 查询子部门数量
* @param deptId
* @return
*/
int hasChildByDeptId(Long deptId);
/**
* 检测部门下是否存在用户
* @param deptId
* @return
*/
int checkDeptExistUser(Long deptId);
int selectNormalChildrenDeptById(Long deptId);
/**
* 校验部门名称是否唯一
* @param name
* @param parentId
* @param companyId
* @return
*/
SysDept checkNameUnique(@Param("name") String name, @Param("parentId") Long parentId, @Param("companyId") Long companyId);
/**
* 批量更新部门
* @param children
*/
void updateDeptChildren(List children);
}