<?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.yinlihupo.enlish.service.domain.mapper.RoleDOMapper">
    <resultMap id="BaseResultMap" type="com.yinlihupo.enlish.service.domain.dataobject.RoleDO">
        <id column="id" jdbcType="BIGINT" property="id" />
        <result column="role_name" jdbcType="VARCHAR" property="roleName" />
        <result column="role_key" jdbcType="VARCHAR" property="roleKey" />
        <result column="status" jdbcType="INTEGER" property="status" />
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
        <result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
    </resultMap>

    <select id="selectAll" resultMap="BaseResultMap">
        select * from role
    </select>

    <select id="selectByIds" resultMap="BaseResultMap">
        select * from role where id in
        <foreach item="item" collection="ids" separator="," open="(" close=")">
            #{item}
        </foreach>
    </select>

</mapper>