mybatis修改中<trim>用法

来源:互联网 发布:网络控制开关 编辑:程序博客网 时间:2024/06/14 22:31
<update id="updateOrderById" parameterType="OrderEntity">update p_order<trim prefix="SET" suffixOverrides=","><if test="if_pay !=null and if_pay !='' ">               if_pay =#{if_pay},        </if>           <if test="if_use != null and if_use !='' ">               if_use =#{if_use},        </if>        <if test="if_sall != null and if_sall !='' ">               if_sall =#{if_sall},        </if>        <if test="type_sysdic_id != null and type_sysdic_id !='' ">               type_sysdic_id =#{type_sysdic_id},        </if>        <if test="quantity != null and quantity !='' ">               quantity =#{quantity},        </if>        <if test="sale_price != null and sale_price !='' ">               sale_price =#{sale_price},        </if>        <if test="updatetime != null and updatetime!='' ">               updatetime = #{updatetime}        </if></trim>  where id=#{id}</update>


0 0
原创粉丝点击