最新逻辑 (超过1小时半小时收半小时钱、多余的收一小时钱,没有宽限期) 增加篮球入场视图,显示订单记录信息。
This commit is contained in:
@@ -10,14 +10,17 @@
|
||||
<arg column="modified_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="order_start" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="order_end" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="last_enter" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="last_out" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="status" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="paying" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="pay_money" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="order_sn" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<arg column="order_add_sn" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, member_id, venue_id, created_time, modified_time, order_start, order_end, status, paying, pay_money, order_sn
|
||||
id, member_id, venue_id, created_time, modified_time, order_start, order_end, last_out, last_enter, status, paying, pay_money, order_sn,order_add_sn
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
@@ -32,10 +35,12 @@
|
||||
<insert id="insert" parameterType="com.sv.entity.BarcodeOrderTime" >
|
||||
insert into sv_barcode_order_time (id, member_id, venue_id,
|
||||
created_time, modified_time, order_start,
|
||||
order_end, status,paying ,pay_money,order_sn)
|
||||
order_end, last_enter, last_out, status,paying ,pay_money,order_sn)
|
||||
values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{venueId,jdbcType=INTEGER},
|
||||
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedTime,jdbcType=TIMESTAMP}, #{orderStart,jdbcType=TIMESTAMP},
|
||||
#{orderEnd,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{paying,jdbcType=INTEGER}, #{payMoney,jdbcType=INTEGER}, #{orderSn,jdbcType=VARCHAR})
|
||||
#{orderEnd,jdbcType=TIMESTAMP}, #{lastEnter,jdbcType=TIMESTAMP}, #{lastOut,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER},
|
||||
#{paying,jdbcType=INTEGER},#{payMoney,jdbcType=INTEGER}, #{orderSn,jdbcType=VARCHAR}
|
||||
,#{orderAddSn,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sv.entity.BarcodeOrderTime" >
|
||||
insert into sv_barcode_order_time
|
||||
@@ -61,10 +66,16 @@
|
||||
<if test="orderEnd != null" >
|
||||
order_end,
|
||||
</if>
|
||||
<if test="lastEnter != null" >
|
||||
last_enter,
|
||||
</if>
|
||||
<if test="lastOut != null" >
|
||||
last_out,
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
status,
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
<if test="paying != null" >
|
||||
paying,
|
||||
</if>
|
||||
<if test="payMoney != null" >
|
||||
@@ -73,6 +84,9 @@
|
||||
<if test="orderSn != null" >
|
||||
order_sn,
|
||||
</if>
|
||||
<if test="orderAddSn != null" >
|
||||
order_add_sn,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
@@ -96,6 +110,12 @@
|
||||
<if test="orderEnd != null" >
|
||||
#{orderEnd,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="lastEnter != null" >
|
||||
#{lastEnter,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="lastOut != null" >
|
||||
#{lastOut,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
@@ -108,6 +128,9 @@
|
||||
<if test="orderSn != null" >
|
||||
#{orderSn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderAddSn != null" >
|
||||
#{orderAddSn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sv.entity.BarcodeOrderTime" >
|
||||
@@ -131,6 +154,12 @@
|
||||
<if test="orderEnd != null" >
|
||||
order_end = #{orderEnd,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="lastEnter != null" >
|
||||
last_enter = #{lastEnter,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="lastOut != null" >
|
||||
last_out = #{lastOut,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
@@ -143,6 +172,9 @@
|
||||
<if test="orderSn != null" >
|
||||
order_sn = #{orderSn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderSn != null" >
|
||||
order_add_sn = #{orderAddSn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
@@ -154,10 +186,13 @@
|
||||
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
|
||||
order_start = #{orderStart,jdbcType=TIMESTAMP},
|
||||
order_end = #{orderEnd,jdbcType=TIMESTAMP},
|
||||
last_enter = #{lastEnter,jdbcType=TIMESTAMP},
|
||||
last_out = #{lastOut,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
paying = #{paying,jdbcType=INTEGER},
|
||||
pay_money = #{payMoney,jdbcType=INTEGER},
|
||||
order_sn = #{orderSn,jdbcType=VARCHAR}
|
||||
order_add_sn = #{orderAddSn,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
||||
@@ -180,7 +215,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from sv_barcode_order_time
|
||||
where member_id = #{memberId,jdbcType=INTEGER} and venue_id = #{venueId,jdbcType=INTEGER}
|
||||
and order_sn = #{orderSn,jdbcType=VARCHAR}
|
||||
and order_add_sn = #{orderSn,jdbcType=VARCHAR}
|
||||
order by order_end desc LIMIT 1
|
||||
</select>
|
||||
|
||||
@@ -198,4 +233,54 @@
|
||||
where paying = 1
|
||||
</select>
|
||||
|
||||
<select id="memberOrderEnterList" resultType="com.sv.dto.api.MemberEnterOrderDTO">
|
||||
select
|
||||
t.id as id,
|
||||
ue.id as lessonId,
|
||||
ue.`name` as lessonName,
|
||||
ue.list_image as lessonImage,
|
||||
t.last_enter as lastEnter,
|
||||
t.order_start as startTime,
|
||||
t.last_out as endTime,
|
||||
(select IFNULL(sum(ot.price),0) from sv_order ot
|
||||
where ot.member_id = #{memberId,jdbcType=INTEGER} and (ot.order_sn = t.order_sn or ot.order_sn = t.order_add_sn)
|
||||
) as price,
|
||||
t.paying,
|
||||
t.order_sn as orderSn,
|
||||
t.`status`,
|
||||
t.created_time as createTime,
|
||||
1 as payType,
|
||||
ue.address as address,
|
||||
ue.longitude,
|
||||
ue.latitude
|
||||
from sv_barcode_order_time t LEFT JOIN sv_venue ue on t.venue_id = ue.id
|
||||
where t.member_id = #{memberId,jdbcType=INTEGER}
|
||||
order by t.order_start desc
|
||||
</select>
|
||||
|
||||
<select id="memberOrderEnterDetail" resultType="com.sv.dto.api.MemberEnterOrderDTO">
|
||||
select
|
||||
t.id as id,
|
||||
ue.id as lessonId,
|
||||
ue.`name` as lessonName,
|
||||
ue.list_image as lessonImage,
|
||||
t.last_enter as lastEnter,
|
||||
t.order_start as startTime,
|
||||
t.last_out as endTime,
|
||||
(select IFNULL(sum(ot.price),0) from sv_order ot
|
||||
where ot.member_id = #{memberId,jdbcType=INTEGER} and (ot.order_sn = t.order_sn or ot.order_sn = t.order_add_sn)
|
||||
) as price,
|
||||
t.paying,
|
||||
t.order_sn as orderSn,
|
||||
t.`status`,
|
||||
t.created_time as createTime,
|
||||
1 as payType,
|
||||
ue.address as address,
|
||||
ue.longitude,
|
||||
ue.latitude
|
||||
from sv_barcode_order_time t LEFT JOIN sv_venue ue on t.venue_id = ue.id
|
||||
where t.member_id = #{memberId,jdbcType=INTEGER}
|
||||
and t.id = #{enterId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user