<?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.RlRoleMapper">

    <resultMap id="BaseResultMap" type="com.ssm.manage.entity.RlRole">
        <result property="roleId" column="role_id"/>
        <result property="roleName" column="role_name"/>
        <result property="state" column="state"/>
        <result property="founder" column="Founder"/>
        <result property="founderDatetime" column="Founder_datetime"/>
        <result property="modifyBy" column="modify_by"/>
        <result property="modifyDatetime" column="modify_datetime"/>
        <result property="industry" column="industry"/>
    </resultMap>

    <sql id="Base_Column_List">
        role_id
        , role_name, state, Founder, Founder_datetime, modify_by, modify_datetime, industry
    </sql>

    <select id="queryAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"></include>
        from rl_role
        <where>
            <if test="roleId != null">
                and role_id = #{roleId}
            </if>
            <if test="roleName != null and roleName != ''">
                and role_name = #{roleName}
            </if>
            <if test="state != null">
                and state = #{state}
            </if>
            <if test="founder != null and founder != ''">
                and Founder = #{founder}
            </if>
            <if test="founderDatetime != null">
                and Founder_datetime = #{founderDatetime}
            </if>
            <if test="modifyBy != null and modifyBy != ''">
                and modify_by = #{modifyBy}
            </if>
            <if test="modifyDatetime != null">
                and modify_datetime = #{modifyDatetime}
            </if>
            <if test="industry != null">
                and industry = #{industry}
            </if>
        </where>
    </select>


</mapper>
