<update id="updateOption" parameterType="com.model.Option"> update system_option set <if test="url != null and url !=''"> url = #{url}, </if> <if test="description != null and description !=''"> description = #{description}, </if> <if test="name != null and name !=''"> name = #{name }, </if> <if test="parentID != null and parentID !=''"> parentID = #{parentID }, </if> <if test="sequence != null and sequence !=''"> sequence = #{sequence }, </if> uuid=#{uuid} where uuid = #{uuid} </update>
update if判断进行动态sql拼接
最新推荐文章于 2025-05-21 08:34:48 发布