课程按次按时逻辑调整
This commit is contained in:
@@ -10,10 +10,11 @@
|
||||
<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="status" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, member_id, venue_id, created_time, modified_time, order_start, order_end
|
||||
id, member_id, venue_id, created_time, modified_time, order_start, order_end, status
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
@@ -28,10 +29,10 @@
|
||||
<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)
|
||||
order_end, status)
|
||||
values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{venueId,jdbcType=INTEGER},
|
||||
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedTime,jdbcType=TIMESTAMP}, #{orderStart,jdbcType=TIMESTAMP},
|
||||
#{orderEnd,jdbcType=TIMESTAMP})
|
||||
#{orderEnd,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sv.entity.BarcodeOrderTime" >
|
||||
insert into sv_barcode_order_time
|
||||
@@ -57,6 +58,9 @@
|
||||
<if test="orderEnd != null" >
|
||||
order_end,
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
status,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
@@ -80,6 +84,9 @@
|
||||
<if test="orderEnd != null" >
|
||||
#{orderEnd,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sv.entity.BarcodeOrderTime" >
|
||||
@@ -103,6 +110,9 @@
|
||||
<if test="orderEnd != null" >
|
||||
order_end = #{orderEnd,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
@@ -113,7 +123,22 @@
|
||||
created_time = #{createdTime,jdbcType=TIMESTAMP},
|
||||
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
|
||||
order_start = #{orderStart,jdbcType=TIMESTAMP},
|
||||
order_end = #{orderEnd,jdbcType=TIMESTAMP}
|
||||
order_end = #{orderEnd,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="findEffOrder" resultType="int">
|
||||
select count(1)
|
||||
from sv_barcode_order_time
|
||||
where status = 0 and order_end >= #{currentDate} and member_id = #{memberId,jdbcType=INTEGER} and venue_id = #{venueId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="endOrderList" resultMap="BaseResultMap" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sv_barcode_order_time
|
||||
where status = 0 and order_end <= #{currentDate}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user