|
|
@@ -513,6 +513,60 @@
|
|
|
LIMIT #{adapter.begin} , #{adapter.size}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="deliverListCount" resultType="integer">
|
|
|
+ SELECT count(1) FROM tz_order a
|
|
|
+ LEFT JOIN tz_user_addr_order b on a.addr_order_id=b.addr_order_id
|
|
|
+ LEFT JOIN tz_shop_detail c on a.shop_id=c.shop_id
|
|
|
+ <where>
|
|
|
+ a.dvy_type=3
|
|
|
+ <if test="orderParam.orderNumber != null and orderParam.orderNumber != ''">
|
|
|
+ and a.order_number = #{orderParam.orderNumber}
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.shopId != null">
|
|
|
+ and a.shop_id = #{orderParam.shopId}
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.startTime != null">
|
|
|
+ and a.create_time > #{orderParam.startTime}
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.endTime != null">
|
|
|
+ and a.create_time < #{orderParam.endTime}
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.refundStatus != null and orderParam.refundStatus != 0">
|
|
|
+ and a.refund_status = #{orderParam.refundStatus}
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.receiver != null">
|
|
|
+ and b.receiver LIKE concat("%",#{orderParam.receiver},"%")
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.mobile != null">
|
|
|
+ and b.mobile LIKE concat("%",#{orderParam.mobile},"%")
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="orderParam.orderStatus != null and orderParam.orderStatus != ''">
|
|
|
+ <if test="orderParam.orderStatus == 'all'">
|
|
|
+ AND a.hb_order_status in (0, 1,20,30,40,50,60,70,80)
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.orderStatus == 'paddingPay'">
|
|
|
+ AND a.hb_order_status in (0)
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="orderParam.orderStatus == 'paddingShipped'">
|
|
|
+ AND a.hb_order_status in (1)
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="orderParam.orderStatus == 'paddingReceived'">
|
|
|
+ AND a.hb_order_status in (20,30,40,50,70)
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.orderStatus == 'completed'">
|
|
|
+ AND a.hb_order_status in (80)
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.orderStatus == 'cancel'">
|
|
|
+ AND a.hb_order_status in (60)
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<select id="countOrderDetial" resultType="long">
|
|
|
SELECT count(0)
|