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

    <resultMap type="LightingCombination" id="LightingCombinationResult">
        <result property="id"    column="id"    />
        <result property="titile"    column="titile"    />
        <result property="operation"    column="operation"    />
        <result property="icon"    column="icon"    />
        <result property="itemId"    column="item_id"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>

    <sql id="selectLightingCombinationVo">
        select * from lighting_combination
    </sql>

    <select id="selectLightingCombinationList" parameterType="LightingCombination" resultMap="LightingCombinationResult">
        <include refid="selectLightingCombinationVo"/>
        <where>
            <if test="titile != null  and titile != ''"> and titile = #{titile}</if>
            <if test="operation != null  and operation != ''"> and operation = #{operation}</if>
            <if test="icon != null  and icon != ''"> and icon = #{icon}</if>
            <if test="itemId != null  and itemId != ''"> and item_id = #{itemId}</if>
        </where>
    </select>

</mapper>
