<?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.yifu.cloud.plus.v1.business.mapper.system.SysBusDictMapper">
    <resultMap id="sysBusDictMap" type="com.yifu.cloud.plus.v1.business.entity.system.SysBusDict">
        <id property="id" column="id"/>
        <result property="label" column="label"/>
        <result property="value" column="value"/>
        <result property="itemType" column="item_type"/>
        <result property="status" column="status"/>
    </resultMap>
    <sql id="Base_Column_List">
             a.id,
                  a.label,
                  a.value,
                  a.item_type,
                  a.status
         </sql>
    <sql id="sysBusDict_where">
        <if test="sysBusDict != null">
            <if test="sysBusDict.id != null and sysBusDict.id.trim() != ''">
                AND a.id = #{sysBusDict.id}
            </if>
            <if test="sysBusDict.label != null and sysBusDict.label.trim() != ''">
                AND a.label = #{sysBusDict.label}
            </if>
            <if test="sysBusDict.value != null and sysBusDict.value.trim() != ''">
                AND a.value = #{sysBusDict.value}
            </if>
            <if test="sysBusDict.itemType != null and sysBusDict.itemType.trim() != ''">
                AND a.item_type = #{sysBusDict.itemType}
            </if>
            <if test="sysBusDict.status != null and sysBusDict.status.trim() != ''">
                AND a.status = #{sysBusDict.status}
            </if>
        </if>
    </sql>
    <!--sysBusDict简单分页查询-->
    <select id="getSysBusDictPage" resultMap="sysBusDictMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM sys_bus_dict a
        <where>
            1=1
            <include refid="sysBusDict_where"/>
        </where>
    </select>
</mapper>
