|
@@ -0,0 +1,82 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="beilv.stadium.mapper.StadiumMapper">
|
|
|
+
|
|
|
+ <resultMap type="Stadium" id="StadiumResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="userId" column="user_id"/>
|
|
|
+ <result property="contactPerple" column="contact_perple"/>
|
|
|
+ <result property="contactNumber" column="contact_number"/>
|
|
|
+ <result property="registrationTime" column="registration_time"/>
|
|
|
+ <result property="paymentTime" column="payment_time"/>
|
|
|
+ <result property="cancellationTime" column="cancellation_time"/>
|
|
|
+ <result property="refundTime" column="refund_time"/>
|
|
|
+ <result property="paymentStatus" column="payment_status"/>
|
|
|
+ <result property="orderId" column="order_id"/>
|
|
|
+ <result property="competitionId" column="competition_id"/>
|
|
|
+ <result property="orderType" column="order_type"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+
|
|
|
+ <insert id="toBeStadium" parameterType="stadium">
|
|
|
+ insert into book_a_race
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
+ <if test="contactPerple != null">contact_perple,</if>
|
|
|
+ <if test="contactNumber != null">contact_number,</if>
|
|
|
+ <if test="registrationTime != null">registration_time,</if>
|
|
|
+ <if test="paymentTime != null">payment_time,</if>
|
|
|
+ <if test="cancellationTime != null">cancellation_time,</if>
|
|
|
+ <if test="refundTime != null">refund_time,</if>
|
|
|
+ <if test="paymentStatus != null">payment_status,</if>
|
|
|
+ <if test="orderId != null">order_id,</if>
|
|
|
+ <if test="competitionId != null">competition_id,</if>
|
|
|
+ <if test="orderType != null">order_type,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="contactPerple != null">#{contactPerple},</if>
|
|
|
+ <if test="contactNumber != null">#{contactNumber},</if>
|
|
|
+ <if test="registrationTime != null">#{registrationTime},</if>
|
|
|
+ <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="orderId != null">#{orderId},</if>
|
|
|
+ <if test="competitionId != null">#{competitionId},</if>
|
|
|
+ <if test="orderType != null">#{orderType},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="cancellStadium" parameterType="stadium">
|
|
|
+ update book_a_race
|
|
|
+ <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>
|
|
|
+ </trim>
|
|
|
+ where order_id = #{orderId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="getStadimList" parameterType="stadiumBO" resultMap="StadiumResult">
|
|
|
+ select
|
|
|
+ user_id, contact_perple, contact_number, registration_time, payment_time,
|
|
|
+ cancellation_time, refund_time, payment_status, order_id, competition_id, order_type
|
|
|
+ from book_a_race
|
|
|
+ <where>
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="orderType != null and orderType != ''">
|
|
|
+ and order_type = #{orderType}
|
|
|
+ </if>
|
|
|
+ <if test="paymentStatus != null and paymentStatus != ''">
|
|
|
+ and paymen_status = #{paymentStatus}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|