update 与 trim合并使用
1、首先我们打开逆向工程生成mapper的xml文件,如图所示,利用CTRL+F进行搜索trim用法。

3、对update中,与trim进行结合使用。如: <update id="updateExample" parameterType="com.entity.Entity"> <trim prefix="set" suffixOverrides=","> <if test="enddate!=null"> enddate= #{enddate}, </if> </trim> WHERE xxid = #{xxid}</update> update 与 trim合并使用格式就是这样的了。
