package com.hfkj.dao;

import com.hfkj.entity.SecRoleMenuRel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * mapper扩展类
 */
public interface SecRoleMenuRelMapperExt {

    @Insert({"<script>" +
            " insert into sec_role_menu_rel (role_id, menu_id) " +
            " values " +
            " <foreach collection='list' item='item' index='index' separator=','>",
            " ( #{item.roleId}, #{item.menuId} )" +
            " </foreach>" +
            " </script>"})
    void batchAdd(@Param("list") List<SecRoleMenuRel> list);
}
