<?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.hanserwei.hannote.user.biz.domain.mapper.RolePermissionDOMapper">
  <resultMap id="BaseResultMap" type="com.hanserwei.hannote.user.biz.domain.dataobject.RolePermissionDO">
    <!--@mbg.generated-->
    <!--@Table t_role_permission_rel-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="role_id" jdbcType="BIGINT" property="roleId" />
    <result column="permission_id" jdbcType="BIGINT" property="permissionId" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="is_deleted" jdbcType="BIT" property="isDeleted" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, role_id, permission_id, create_time, update_time, is_deleted
  </sql>

  <select id="selectByRoleIds" resultMap="BaseResultMap">
      select role_id, permission_id
      from t_role_permission_rel
      where role_id in
      <foreach collection="roleIds" item="roleId" separator="," open="(" close=")">
          #{roleId}
      </foreach>
  </select>
</mapper>