<?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.ssm.manage.mapper.SysRolePowerMapper">
  <resultMap id="BaseResultMap" type="com.ssm.manage.entity.SysRolePower">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="role_id" jdbcType="BIGINT" property="roleId" />
    <id column="power_id" jdbcType="INTEGER" property="powerId" />
  </resultMap>


<insert id="addRolePower" parameterType="java.util.List">
  insert into sys_role_power(role_id,power_id) values
  <foreach collection="rolePowerList" item="rolePower" index="index" separator=",">
    (#{rolePower.roleId},#{rolePower.powerId})
  </foreach>

</insert>

</mapper>