记得上下班打卡 | git大法好,push需谨慎

Commit 5f951715 authored by 胡佳晨's avatar 胡佳晨

订单回滚逻辑修改

parent ce6cbdb6
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</select> </select>
<select id="orderScriptDto" parameterType="java.lang.String" resultMap="orderScriptDtoResult"> <select id="orderScriptDto" parameterType="java.lang.String" resultMap="orderScriptDtoResult">
SELECT ot.mid, select s.mid,
order_tickets_id, order_tickets_id,
order_code, order_code,
status, status,
...@@ -268,12 +268,19 @@ ...@@ -268,12 +268,19 @@
number, number,
user_id, user_id,
oc.coupon_code oc.coupon_code
from (SELECT ot.mid,
order_tickets_id,
order_code,
status,
ticket_id,
number,
user_id
FROM kylin_order_tickets AS ot FROM kylin_order_tickets AS ot
inner JOIN kylin_order_ticket_status AS ots ON ots.order_id = ot.order_tickets_id inner JOIN kylin_order_ticket_status AS ots ON ots.order_id = ot.order_tickets_id
inner JOIN kylin_order_ticket_relations AS otr ON otr.order_id = ot.order_tickets_id inner JOIN kylin_order_ticket_relations AS otr ON otr.order_id = ot.order_tickets_id
inner JOIN kylin_order_coupons AS oc ON oc.order_id = ot.order_tickets_id WHERE status = 0 AND NOW() > DATE_SUB(ot.created_at,INTERVAL -(pay_countdown_minute+1) MINUTE)) as s
WHERE status = 0 AND NOW() > DATE_SUB(ot.created_at,INTERVAL -(pay_countdown_minute+1) MINUTE) AND left JOIN kylin_order_coupons AS oc ON oc.order_id = s.order_tickets_id where oc.coupon_type != 101 or
oc.coupon_type != 101 oc.coupon_code is null
<if test="userId!=''"> <if test="userId!=''">
AND user_id = #{userId} AND user_id = #{userId}
</if> </if>
...@@ -307,8 +314,8 @@ ...@@ -307,8 +314,8 @@
LEFT JOIN (SELECT * FROM kylin_order_express WHERE express_status NOT IN (1, 3)) AS oe ON oe.order_tickets_id = LEFT JOIN (SELECT * FROM kylin_order_express WHERE express_status NOT IN (1, 3)) AS oe ON oe.order_tickets_id =
kot.order_tickets_id kot.order_tickets_id
-- LEFT JOIN (SELECT * FROM kylin_order_express_route ORDER BY mid DESC LIMIT 1) AS oer ON oe.order_express_id = -- LEFT JOIN (SELECT * FROM kylin_order_express_route ORDER BY mid DESC LIMIT 1) AS oer ON oe.order_express_id =
-- oer.order_express_id -- oer.order_express_id
<where> <where>
kotr.performance_id = #{performancesId} kotr.performance_id = #{performancesId}
AND kot.get_ticket_type = 'express' AND kot.get_ticket_type = 'express'
...@@ -327,7 +334,9 @@ ...@@ -327,7 +334,9 @@
<if test="expressContacts != null and expressContacts != ''">AND kot.express_contacts LIKE concat('%', <if test="expressContacts != null and expressContacts != ''">AND kot.express_contacts LIKE concat('%',
#{expressContacts}, '%') #{expressContacts}, '%')
</if> </if>
<if test="expressStatus != '' and expressStatus != 1 and expressStatus != 70">AND oe.express_status = ${expressStatus}</if> <if test="expressStatus != '' and expressStatus != 1 and expressStatus != 70">AND oe.express_status =
${expressStatus}
</if>
<if test="expressStatus == 1">AND (oe.express_status IS NULL OR oe.express_status = ${expressStatus})</if> <if test="expressStatus == 1">AND (oe.express_status IS NULL OR oe.express_status = ${expressStatus})</if>
<if test="expressStatus == 70">AND (oe.express_status > 3 AND oe.express_status != 80)</if> <if test="expressStatus == 70">AND (oe.express_status > 3 AND oe.express_status != 80)</if>
<if test="mailno != ''">AND oe.mailno LIKE concat('%', #{mailno}, '%')</if> <if test="mailno != ''">AND oe.mailno LIKE concat('%', #{mailno}, '%')</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment