<?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="cn.hellohao.dao.EmailConfigMapper">

    <select id="getemail" resultType="cn.hellohao.pojo.EmailConfig">
        select * from emailconfig where id = 1
    </select>

    <update id="updateemail" parameterType="cn.hellohao.pojo.EmailConfig">
        UPDATE emailconfig
        <set>
            <if test="emails != null">
                emails = #{emails},
            </if>
            <if test="emailkey != null">
                emailkey = #{emailkey},
            </if>
            <if test="emailurl != null">
                emailurl = #{emailurl},
            </if>
            <if test="port != null">
                `port` = #{port},
            </if>
            <if test="emailname != null">
                `emailname` = #{emailname},
            </if>
            <if test="using != null">
                `using` = #{using},
            </if>
        </set>
        WHERE
            id = 1
    </update>



</mapper>