|
|
@@ -122,7 +122,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
</trim>
|
|
|
- where id = #{id}
|
|
|
+ <where>
|
|
|
+ <choose>
|
|
|
+ <when test="orderId != null and orderId != ''">
|
|
|
+ order_id = #{orderId}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ id = #{id}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </where>
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteCardPurchaseRecordById" parameterType="Long">
|
|
|
@@ -135,26 +144,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-
|
|
|
- <update id="updateRecord" parameterType="CardPurchaseRecord">
|
|
|
- update card_purchase_record
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="userId != null">user_id = #{userId},</if>
|
|
|
- <if test="cardId != null">card_id = #{cardId},</if>
|
|
|
- <if test="cardName != null">card_name = #{cardName},</if>
|
|
|
- <if test="cardType != null">card_type = #{cardType},</if>
|
|
|
- <if test="totalNumber != null">total_number = #{totalNumber},</if>
|
|
|
- <if test="memberPrice != null">member_price = #{memberPrice},</if>
|
|
|
- <if test="time != null">time = #{time},</if>
|
|
|
- <if test="paymentWay != null">payment_way = #{paymentWay},</if>
|
|
|
- <if test="type != null">type = #{type},</if>
|
|
|
- <if test="notes != null">notes = #{notes},</if>
|
|
|
- <if test="version != null">version = #{version},</if>
|
|
|
- <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
- <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
- </trim>
|
|
|
- where order_id = #{orderId}
|
|
|
- </update>
|
|
|
</mapper>
|