package com.zcloud.basic.info.persistence.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jjb.saas.framework.datascope.annotation.DataScope;
import com.jjb.saas.framework.datascope.annotation.DataScopes;
import com.zcloud.basic.info.persistence.dataobject.CorpInfoDO;
import com.zcloud.basic.info.persistence.dataobject.DepartmentDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * web-infrastructure
 *
 * @Author zhaokai
 * @Date 2025-10-29 16:03:20
 */
@Mapper
@DataScopes({
        @DataScope(method = "selectDeptPage", menuPerms = ""),
})
public interface DepartmentMapper extends BaseMapper<DepartmentDO> {

    List<DepartmentDO> listAllTree();
    IPage<DepartmentDO> selectDeptPage(IPage<DepartmentDO> iPage, @Param("ew") QueryWrapper<DepartmentDO> queryWrapper, String menuPerms);

    List<DepartmentDO> listAllTreeByCorpType(Map<String, Object> parmas);
}

