package com.bonus.core.autth.role.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.core.autth.po.MgrUserAuthPO;
import com.bonus.core.autth.role.dto.MgrRoleOrgDTO;
import com.bonus.core.autth.role.entity.MgrRole;
import com.bonus.core.autth.role.entity.MgrRoleOrg;
import com.bonus.core.customer.dto.CustOrgTreeDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MgrRoleOrgMapper extends BaseMapper<MgrRoleOrg> {
   int insertBatch(@Param("roleId") Long roleId, @Param("orgList") List<MgrRoleOrgDTO> orgList);

   List<CustOrgTreeDTO> getTenantOrg(@Param("excludeMiddle") Integer excludeMiddle, @Param("authPO") MgrUserAuthPO mgrUserAuthPO, @Param("delFlag") Integer delFlag);

   List<MgrRole> getRoleListByOrgId(@Param("orgId") Long orgId, @Param("roleId") Long roleId, @Param("excludeMiddle") Integer excludeMiddle);
}
