<?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.SysRoleUserMapper">
  <resultMap id="BaseResultMap" type="com.ssm.manage.entity.SysRoleUser">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="role_id" jdbcType="BIGINT" property="roleId" />
    <id column="user_id" jdbcType="BIGINT" property="userId" />
    <result column="role_name" jdbcType="VARCHAR" property="roleName" />
    <result column="user_name" jdbcType="VARCHAR" property="userName" />
  </resultMap>


  <insert id="addRoleUser" parameterType="java.util.List">
    insert into sys_role_user (role_id,role_name,user_id,user_name) values
    <foreach collection="sysRoleUserList" item="sysRoleUser" index="index" separator=",">
      (#{sysRoleUser.roleId},#{sysRoleUser.roleName},#{sysRoleUser.userId},#{sysRoleUser.userName})
    </foreach>
  </insert>
</mapper>