<?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.yzt.airconditionersystem.mapper.OperatorMapper">

<!--    public Operator getOne(Operator operator);-->
    <select id="getOne" resultType="com.yzt.airconditionersystem.bean.Operator">
        select * from operator
        <where>
            <if test="username != null and username != ''">
                username = #{username}
            </if>
            <if test="companyName != null and companyName != ''">
                and company_name = #{companyName}
            </if>
            <if test="district != null and district != ''">
                and district = #{district}
            </if>
            <if test="detailedAddress != null and detailedAddress != ''">
                and detailed_address = #{detailedAddress}
            </if>
            <if test="contact != null and contact != ''">
                and contact = #{contact}
            </if>
            <if test="phone != null and phone != ''">
                and phone = #{phone}
            </if>
        </where>
    </select>


</mapper>