|
|
@@ -488,12 +488,15 @@
|
|
|
<if test="orderParam.orderNumber != null and orderParam.orderNumber != ''">
|
|
|
and a.order_number = #{orderParam.orderNumber}
|
|
|
</if>
|
|
|
- <if test="orderParam.channelIdList != null and orderParam.channelIdList != ''">
|
|
|
+ <if test="orderParam.channelIdList != null and !orderParam.channelIdList.isEmpty()">
|
|
|
and a.channel_id in
|
|
|
<foreach collection="orderParam.channelIdList" item="channelId" open="(" close=")" separator=",">
|
|
|
#{channelId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="orderParam.dvyType != null and orderParam.dvyType != ''">
|
|
|
+ and a.dvy_type = #{orderParam.dvyType}
|
|
|
+ </if>
|
|
|
<if test="orderParam.shopId != null">
|
|
|
and a.shop_id = #{orderParam.shopId}
|
|
|
</if>
|
|
|
@@ -512,7 +515,6 @@
|
|
|
<if test="orderParam.userMobile != null">
|
|
|
and b.mobile LIKE concat("%",#{orderParam.userMobile},"%")
|
|
|
</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)
|
|
|
@@ -548,6 +550,15 @@
|
|
|
<if test="orderParam.orderNumber != null and orderParam.orderNumber != ''">
|
|
|
and a.order_number = #{orderParam.orderNumber}
|
|
|
</if>
|
|
|
+ <if test="orderParam.channelIdList != null and !orderParam.channelIdList.isEmpty()">
|
|
|
+ and a.channel_id in
|
|
|
+ <foreach collection="orderParam.channelIdList" item="channelId" open="(" close=")" separator=",">
|
|
|
+ #{channelId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.dvyType != null and orderParam.dvyType != ''">
|
|
|
+ and a.dvy_type = #{orderParam.dvyType}
|
|
|
+ </if>
|
|
|
<if test="orderParam.shopId != null">
|
|
|
and a.shop_id = #{orderParam.shopId}
|
|
|
</if>
|
|
|
@@ -995,10 +1006,68 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="statusCount" resultType="integer">
|
|
|
- SELECT count(1) FROM `tz_order` WHERE hb_order_status in
|
|
|
- <foreach collection="status" item="status" separator="," open="(" close=")">
|
|
|
- #{status}
|
|
|
- </foreach>
|
|
|
+ SELECT count(a.order_id) 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>
|
|
|
+ hb_order_status in
|
|
|
+ <foreach collection="status" item="status" separator="," open="(" close=")">
|
|
|
+ #{status}
|
|
|
+ </foreach>
|
|
|
+ <if test="orderParam.orderNumber != null and orderParam.orderNumber != ''">
|
|
|
+ and a.order_number = #{orderParam.orderNumber}
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.channelIdList != null and !orderParam.channelIdList.isEmpty()">
|
|
|
+ and a.channel_id in
|
|
|
+ <foreach collection="orderParam.channelIdList" item="channelId" open="(" close=")" separator=",">
|
|
|
+ #{channelId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="orderParam.dvyType != null and orderParam.dvyType != ''">
|
|
|
+ and a.dvy_type = #{orderParam.dvyType}
|
|
|
+ </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.userMobile != null">
|
|
|
+ and b.mobile LIKE concat("%",#{orderParam.userMobile},"%")
|
|
|
+ </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,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 (50,60)
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
<select id="selectOrderCount" resultType="com.yami.shop.bean.param.OrderCountParam">
|
|
|
SELECT
|
|
|
@@ -1104,12 +1173,15 @@
|
|
|
<if test="orderParam.orderNumber != null and orderParam.orderNumber != ''">
|
|
|
and a.order_number = #{orderParam.orderNumber}
|
|
|
</if>
|
|
|
- <if test="orderParam.channelIdList != null and orderParam.channelIdList != ''">
|
|
|
+ <if test="orderParam.channelIdList != null and !orderParam.channelIdList.isEmpty()">
|
|
|
and a.channel_id in
|
|
|
<foreach collection="orderParam.channelIdList" item="channelId" open="(" close=")" separator=",">
|
|
|
#{channelId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="orderParam.dvyType != null and orderParam.dvyType != ''">
|
|
|
+ and a.dvy_type = #{orderParam.dvyType}
|
|
|
+ </if>
|
|
|
<if test="orderParam.shopId != null">
|
|
|
and a.shop_id = #{orderParam.shopId}
|
|
|
</if>
|