<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>
mybatis修改中<trim>用法
最新推荐文章于 2023-10-06 22:44:46 发布