package com.bonus.canteen.core.auth.role.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenTreeVO;
import com.bonus.canteen.core.auth.po.MgrUserAuthPO;
import com.bonus.canteen.core.auth.role.dto.MgrRoleCanteenDTO;
import com.bonus.canteen.core.auth.role.entity.MgrRole;
import com.bonus.canteen.core.auth.role.entity.MgrRoleCanteen;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MgrRoleCanteenMapper extends BaseMapper<MgrRoleCanteen> {
   int insertBatch(@Param("roleId") Long roleId, @Param("canteenList") List<MgrRoleCanteenDTO> canteenList);

   List<AllocCanteenTreeVO> getTenantCanteen(@Param("excludeMiddle") Integer excludeMiddle, @Param("merchantId") Long merchantId, @Param("authPO") MgrUserAuthPO mgrUserAuthPO, @Param("delFlag") Integer delFlag);

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