|
@@ -17,6 +17,7 @@
|
|
<result property="orderId" column="order_id"/>
|
|
<result property="orderId" column="order_id"/>
|
|
<result property="competitionId" column="competition_id"/>
|
|
<result property="competitionId" column="competition_id"/>
|
|
<result property="orderType" column="order_type"/>
|
|
<result property="orderType" column="order_type"/>
|
|
|
|
+ <result property="refundInstructions" column="refund_instructions"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
@@ -34,6 +35,7 @@
|
|
<if test="orderId != null">order_id,</if>
|
|
<if test="orderId != null">order_id,</if>
|
|
<if test="competitionId != null">competition_id,</if>
|
|
<if test="competitionId != null">competition_id,</if>
|
|
<if test="orderType != null">order_type,</if>
|
|
<if test="orderType != null">order_type,</if>
|
|
|
|
+ <if test="refundInstructions != null">refund_instructions,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
@@ -47,24 +49,33 @@
|
|
<if test="orderId != null">#{orderId},</if>
|
|
<if test="orderId != null">#{orderId},</if>
|
|
<if test="competitionId != null">#{competitionId},</if>
|
|
<if test="competitionId != null">#{competitionId},</if>
|
|
<if test="orderType != null">#{orderType},</if>
|
|
<if test="orderType != null">#{orderType},</if>
|
|
|
|
+ <if test="refundInstructions != null">#{refundInstructions},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="cancellStadium" parameterType="stadium">
|
|
<update id="cancellStadium" parameterType="stadium">
|
|
update beilv_book_a_race
|
|
update beilv_book_a_race
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
- <if test="paymentTime != null">#{paymentTime},</if>
|
|
|
|
- <if test="cancellationTime != null">#{cancellationTime},</if>
|
|
|
|
- <if test="refundTime != null">#{refundTime},</if>
|
|
|
|
- <if test="paymentStatus != null">#{paymentStatus},</if>
|
|
|
|
|
|
+ <if test="paymentTime != null">payment_time = #{paymentTime},</if>
|
|
|
|
+ <if test="cancellationTime != null">cancellation_time = #{cancellationTime},</if>
|
|
|
|
+ <if test="refundTime != null">refund_time = #{refundTime},</if>
|
|
|
|
+ <if test="paymentStatus != null">payment_status = #{paymentStatus},</if>
|
|
|
|
+ <if test="refundInstructions != null">refund_instructions = #{refundInstructions},</if>
|
|
</trim>
|
|
</trim>
|
|
- where order_id = #{orderId}
|
|
|
|
|
|
+ <where>
|
|
|
|
+ <if test="orderId != null and orderId != ''">
|
|
|
|
+ and order_id = #{orderId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="id != null and id != ''">
|
|
|
|
+ and id = #{id}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<select id="getStadimList" parameterType="stadiumBO" resultMap="StadiumResult">
|
|
<select id="getStadimList" parameterType="stadiumBO" resultMap="StadiumResult">
|
|
select
|
|
select
|
|
user_id, contact_perple, contact_number, registration_time, payment_time,
|
|
user_id, contact_perple, contact_number, registration_time, payment_time,
|
|
- cancellation_time, refund_time, payment_status, order_id, competition_id, order_type
|
|
|
|
|
|
+ cancellation_time, refund_time, payment_status, order_id, competition_id, order_type, refund_instructions
|
|
from beilv_book_a_race
|
|
from beilv_book_a_race
|
|
<where>
|
|
<where>
|
|
<if test="userId != null and userId != ''">
|
|
<if test="userId != null and userId != ''">
|
|
@@ -90,10 +101,16 @@
|
|
(SELECT COUNT(id) AS isPay FROM beilv_book_a_race WHERE competition_id = #{competitionId} AND (payment_status = 'payment_status_have_paid' OR payment_status = 'payment_status_to_be_paid ') and order_type = '1') b;
|
|
(SELECT COUNT(id) AS isPay FROM beilv_book_a_race WHERE competition_id = #{competitionId} AND (payment_status = 'payment_status_have_paid' OR payment_status = 'payment_status_to_be_paid ') and order_type = '1') b;
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getTakePartList" parameterType="integer" resultMap="StadiumResult">
|
|
|
|
|
|
+ <select id="getTakePartList" parameterType="stadium" resultMap="StadiumResult">
|
|
select * from beilv_book_a_race
|
|
select * from beilv_book_a_race
|
|
- where competition_id = #{competitionId}
|
|
|
|
|
|
+ <where>
|
|
|
|
+ <if test="competitionId != null and competitionId != ''">
|
|
|
|
+ and competition_id = #{competitionId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderType != null and orderType != ''">
|
|
|
|
+ and order_type = #{orderType}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
order by registration_time desc
|
|
order by registration_time desc
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
</mapper>
|
|
</mapper>
|