<?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.roadm.admin.mapper.SmsSpUserInfoMapper">

    <update id="updateSpUserPassword">
         update sms_sp_user_info s
        <trim prefix="set" suffixOverrides=",">
            <if test="username!=null">s.username=#{username}</if>
            <if test="password!=null">,s.password=#{password},s.pawd=#{pawd}</if>
            <if test="webPassword != null">,s.web_password=#{webPassword},s.web_pawd=#{webPawd}</if>
            <if test="spContactName != null and spContactName != ''">
                ,name = #{spContactName}
            </if>
            <if test="spContactMdn != null and spContactMdn != ''">
                ,mdn = #{spContactMdn}
            </if>
        </trim>
        where s.sp_id= #{id}
        and s.role_id=0
    </update>
</mapper>
