<?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.controller.mapper.ControllerInfoMapper">

    <resultMap type="ControllerInfo" id="ControllerInfoResult">
        <result property="id"    column="id"    />
        <result property="brand"    column="brand"    />
        <result property="controllerModel"    column="controller_model"    />
        <result property="controllerPrice"    column="controller_price"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
    </resultMap>

    <sql id="selectControllerInfoVo">
        select * from controller_info
    </sql>

    <select id="selectControllerInfoList" parameterType="ControllerInfo" resultMap="ControllerInfoResult">
        <include refid="selectControllerInfoVo"/>
        <where>
            <if test="brand != null  and brand != ''"> and brand = #{brand}</if>
            <if test="controllerModel != null  and controllerModel != ''"> and controller_model = #{controllerModel}</if>
            <if test="controllerPrice != null "> and controller_price = #{controllerPrice}</if>
        </where>
    </select>

</mapper>
