<?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.miaxis.lighting.mapper.LightingItemMapper">

    <resultMap type="LightingItem" id="LightingItemResult">
        <result property="id"    column="id"    />
        <result property="title"    column="title"    />
        <result property="operation"    column="operation"    />
        <result property="icon"    column="icon"    />
        <result property="voice"    column="voice"    />
        <result property="process"    column="process"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>

    <sql id="selectLightingItemVo">
        select * from lighting_item
    </sql>

    <select id="selectLightingItemList" parameterType="LightingItem" resultMap="LightingItemResult">
        <include refid="selectLightingItemVo"/>
        <where>
            <if test="title != null  and title != ''"> and title = #{title}</if>
            <if test="operation != null  and operation != ''"> and operation = #{operation}</if>
            <if test="icon != null  and icon != ''"> and icon = #{icon}</if>
            <if test="voice != null  and voice != ''"> and voice = #{voice}</if>
            <if test="process != null "> and process = #{process}</if>
        </where>
    </select>

</mapper>
