mybatis 的if else

<update id="update" parameterType="XXX">
         update XX set YY
         <choose>
                <when test="dmlItem.id != null">
                       where   XX1
                </when>
                <otherwise>
                       where   XX2
                 </otherwise>
         </choose>
</update>

原文地址:https://www.cnblogs.com/huhuixin/p/6060729.html