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

Commit 7d2c8e46 authored by anjiabin's avatar anjiabin

优化订单列表加载性能

parent 339d5dd1
...@@ -156,15 +156,74 @@ ...@@ -156,15 +156,74 @@
<if test="orderStatus!=null and orderStatus!=''"> <if test="orderStatus!=null and orderStatus!=''">
AND kots.status = #{orderStatus} AND kots.status = #{orderStatus}
</if> </if>
<if test="sponsor!=null and sponsor!=''">
AND kp.sponsor = #{sponsor}
</if>
</where> </where>
<!-- <if test="orderItem!=''">--> <!-- <if test="orderItem!=''">-->
<!-- ORDER BY ${orderItem} ${orderSc}--> <!-- ORDER BY ${orderItem} ${orderSc}-->
<!-- </if>--> <!-- </if>-->
</select> </select>
<select id="orderList_COUNT" resultType="Long">
<choose>
<when test="(sponsor!=null and sponsor!='') or (orderStatus!=null and orderStatus!='')">
SELECT count(1)
FROM kylin_order_tickets kot
inner join kylin_order_ticket_status kots on kot.order_tickets_id = kots.order_id
inner join kylin_order_ticket_relations kotr on kot.order_tickets_id = kotr.order_id
inner join kylin_performances kp on kotr.performance_id = kp.performances_id
</when>
<otherwise>
SELECT
count(1)
FROM kylin_order_tickets kot
</otherwise>
</choose>
<where>
<if test="userId != null and userId != ''">and kot.user_id = #{userId}</if>
<if test="userName != null and userName != ''">and kot.user_name like concat('%', #{userName}, '%')</if>
<if test="userMobile != null and userMobile != ''">and kot.user_mobile = #{userMobile}</if>
<if test="performanceTitle != null and performanceTitle != ''">
and kot.performance_title like concat('%', #{performanceTitle}, '%')
</if>
<if test="orderCode != null and orderCode != ''">and kot.order_code = #{orderCode}</if>
<if test="orderType != null and orderType != ''">and kot.order_type = #{orderType}</if>
<if test="orderVersion != null and orderVersion != ''">and kot.order_version = #{orderVersion}</if>
<if test="number != null ">and kot.number = #{number}</if>
<if test="price != null ">and kot.price = #{price}</if>
<if test="priceMember != null ">and kot.price_member = #{priceMember}</if>
<if test="priceTotal != null ">and kot.price_total = #{priceTotal}</if>
<if test="priceVoucher != null ">and kot.price_voucher = #{priceVoucher}</if>
<if test="priceActual != null ">and kot.price_actual = #{priceActual}</if>
<if test="priceExpress != null ">and kot.price_express = #{priceExpress}</if>
<if test="priceRefund != null ">and kot.price_refund = #{priceRefund}</if>
<if test="refundNumber != null ">and kot.refund_number = #{refundNumber}</if>
<if test="payType != null and payType != ''">and kot.pay_type = #{payType}</if>
<if test="paymentType != null and paymentType != ''">and kot.payment_type = #{paymentType}</if>
<if test="timePay != null and timePay != ''">and kot.time_pay = #{timePay}</if>
<if test="expressContacts != null and expressContacts != ''">and kot.express_contacts =
#{expressContacts}
</if>
<if test="expressAddress != null and expressAddress != ''">and kot.express_address = #{expressAddress}</if>
<if test="expressPhone != null and expressPhone != ''">and kot.express_phone = #{expressPhone}</if>
<if test="couponType != null and couponType != ''">and kot.coupon_type = #{couponType}</if>
<if test="getTicketType != null and getTicketType != ''">and kot.get_ticket_type = #{getTicketType}</if>
<if test="getTicketDescribe != null and getTicketDescribe != ''">and kot.get_ticket_describe =
#{getTicketDescribe}
</if>
<if test="payCountdownMinute != null ">and kot.pay_countdown_minute = #{payCountdownMinute}</if>
<if test="comment != null and comment != ''">and kot.comment = #{comment}</if>
<if test="createdAt != null ">and kot.created_at = #{createdAt}</if>
<if test="updatedAt != null ">and kot.updated_at = #{updatedAt}</if>
<if test="orderSource != null and orderSource != ''">and kot.order_source = #{orderSource}</if>
<if test="orderType != null and orderType != ''">and kot.order_type = #{orderType}</if>
<if test="sponsor!=null and sponsor!=''">
AND kp.sponsor = #{sponsor}
</if>
<if test="orderStatus!=null and orderStatus!=''">
AND kots.status = #{orderStatus}
</if>
</where>
</select>
<select id="pushDamaiDetailsList" parameterType="java.lang.String" resultMap="orderPushDamaiDto"> <select id="pushDamaiDetailsList" parameterType="java.lang.String" resultMap="orderPushDamaiDto">
SELECT ote.mid, SELECT ote.mid,
order_tickets_id, order_tickets_id,
......
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