<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzs.system.config.mapper.BdMenuAuthorityMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hzs.common.domain.system.config.BdMenuAuthority">
        <id column="PK_ID" property="pkId"/>
        <result column="PK_MENU" property="pkMenu"/>
        <result column="AUTHORITY_TYPE" property="authorityType"/>
        <result column="AUTHORITY_VALUE" property="authorityValue"/>
        <result column="DEL_FLAG" property="delFlag"/>
        <result column="CREATION_TIME" property="creationTime"/>
        <result column="PK_CREATOR" property="pkCreator"/>
        <result column="MODIFIED_TIME" property="modifiedTime"/>
        <result column="PK_MODIFIED" property="pkModified"/>
        <result column="PK_COUNTRY" property="pkCountry"/>
    </resultMap>

    <!-- 批量插入 -->
    <insert id="insertBatch">
        INSERT ALL
        <foreach collection="list" item="item" separator=" ">
            into BD_MENU_AUTHORITY(PK_MENU, AUTHORITY_TYPE, AUTHORITY_VALUE,
            PK_COUNTRY, PK_CREATOR, CREATION_TIME)
            VALUES (#{item.pkMenu}, #{item.authorityType}, #{item.authorityValue},
            #{item.pkCountry}, #{item.pkCreator}, #{item.creationTime}
            )
        </foreach>
        SELECT 1 FROM dual
    </insert>

</mapper>
