set标签可以自动生成set语句,并且可以去除尾部的逗号
<update id="editTransport" parameterType="java.util.Map"> update hl_transport_info <set> <if test="transportNo != null and transportNo != ''">transport_no = #{transportNo},</if> <if test="upChain != null and upChain != ''">up_Chain = #{upChain},</if> <if test="outTime != null and outTime != ''"> <!--out_Time = #{outTime,jdbcType=DATE},--> and DATE_FORMAT(out_Time, '%Y-%m-%d') = DATE_FORMAT(#{outTime}, '%Y-%m-%d'), </if> </set> where id = #{id} </update>