|
@@ -142,15 +142,17 @@
|
|
|
s.shopType AS shopType,
|
|
|
IFNULL(cso.realPay, cso.needPayAmount)AS readPay,
|
|
|
ifnull(cso.receiptStatus, 1) as receiptStatus,
|
|
|
+ ifnull(cso.orderStatusFlag, 1) as orderStatusFlag,
|
|
|
+ ifnull(cso.refundStatus, 1) as refundStatus,
|
|
|
cso.shopStatus as status
|
|
|
<if test="orderSubmitType == 3">
|
|
|
- ,s.linkMan as serviceName
|
|
|
+ ,ser.linkMan as serviceName
|
|
|
</if>
|
|
|
FROM cm_shop_order cso
|
|
|
LEFT JOIN shop s ON cso.shopID = s.shopID
|
|
|
<if test="orderSubmitType == 3">
|
|
|
LEFT JOIN club c ON cso.userId=c.userId
|
|
|
- LEFT JOIN serviceprovider s ON c.spId=s.serviceProviderID
|
|
|
+ LEFT JOIN serviceprovider ser ON c.spId=ser.serviceProviderID
|
|
|
</if>
|
|
|
<where>
|
|
|
cso.delFlag = 0 AND cso.userID IN
|
|
@@ -161,16 +163,16 @@
|
|
|
AND cso.shopStatus = 0
|
|
|
</if>
|
|
|
<if test="listType == 2 ">
|
|
|
- AND cso.payStatus = 1
|
|
|
+ AND receiptStatus = 1 AND shopStatus not in (0, 4,5) AND cso.orderStatusFlag = 1 AND cso.refundStatus = 1
|
|
|
</if>
|
|
|
<if test="listType == 3 ">
|
|
|
- AND cso.sendOutStatus = 1
|
|
|
+ AND cso.sendOutStatus = 1 AND cso.shopStatus not in (0,4,5) AND cso.orderStatusFlag = 1 AND cso.refundStatus = 1
|
|
|
</if>
|
|
|
<if test="listType == 4 ">
|
|
|
- AND cso.sendOutStatus = 3
|
|
|
+ AND cso.sendOutStatus = 3 AND cso.shopStatus not in (0,4,5) AND cso.orderStatusFlag = 1 AND cso.refundStatus = 1
|
|
|
</if>
|
|
|
<if test="listType == 5 ">
|
|
|
- AND (cso.orderStatusFlag in (2, 3) or cso.refundStatus = 2)
|
|
|
+ AND (cso.orderStatusFlag in (2, 3) or cso.refundStatus in (2, 3)) AND cso.shopStatus not in (0,4,5)
|
|
|
</if>
|
|
|
<if test="shopOrderNo != null and shopOrderNo != '' ">
|
|
|
AND cso.shopOrderNo = #{shopOrderNo}
|
|
@@ -306,6 +308,8 @@
|
|
|
s.shopType AS shopType,
|
|
|
IFNULL(cso.realPay, cso.needPayAmount)AS readPay,
|
|
|
ifnull(cso.receiptStatus, 1) as receiptStatus,
|
|
|
+ ifnull(cso.orderStatusFlag, 1) as orderStatusFlag,
|
|
|
+ ifnull(cso.refundStatus, 1) as refundStatus,
|
|
|
cso.shopStatus as status
|
|
|
FROM cm_shop_order cso
|
|
|
LEFT JOIN shop s ON cso.shopID = s.shopID
|
|
@@ -314,16 +318,16 @@
|
|
|
AND cso.shopStatus = 0
|
|
|
</if>
|
|
|
<if test="listType == 2 ">
|
|
|
- AND cso.payStatus = 1
|
|
|
+ AND cso.receiptStatus = 1 AND cso.shopStatus not in (0, 4,5)
|
|
|
</if>
|
|
|
<if test="listType == 3 ">
|
|
|
- AND cso.sendOutStatus = 1
|
|
|
+ AND cso.sendOutStatus = 1 AND cso.shopStatus not in (0, 4,5)
|
|
|
</if>
|
|
|
<if test="listType == 4 ">
|
|
|
- AND cso.sendOutStatus = 3
|
|
|
+ AND cso.sendOutStatus = 3 AND cso.shopStatus not in (0, 4,5)
|
|
|
</if>
|
|
|
<if test="listType == 5 ">
|
|
|
- AND (cso.orderStatusFlag in (2, 3) or cso.refundStatus = 2)
|
|
|
+ AND (cso.orderStatusFlag in (2, 3) or cso.refundStatus in( 2, 3 )) AND cso.shopStatus not in (0, 4,5)
|
|
|
</if>
|
|
|
<if test="orderSubmitType == 1">
|
|
|
AND cso.orderSubmitType IN (0,1,2)
|
|
@@ -440,6 +444,8 @@
|
|
|
s.shopType AS shopType,
|
|
|
IFNULL(cso.realPay, cso.needPayAmount)AS readPay,
|
|
|
ifnull(cso.receiptStatus, 1) as receiptStatus,
|
|
|
+ ifnull(cso.orderStatusFlag, 1) as orderStatusFlag,
|
|
|
+ ifnull(cso.refundStatus, 1) as refundStatus,
|
|
|
cso.shopStatus as status
|
|
|
FROM cm_shop_order cso
|
|
|
LEFT JOIN cm_order_product cop ON cso.shopOrderId = cop.shopOrderId
|
|
@@ -467,16 +473,16 @@
|
|
|
AND shopStatus = 0
|
|
|
</if>
|
|
|
<if test="orderState == 2 ">
|
|
|
- AND receiptStatus = 1 AND shopStatus not in (4,5)
|
|
|
+ AND receiptStatus = 1 AND shopStatus not in (0, 4, 5)
|
|
|
</if>
|
|
|
<if test="orderState == 3 ">
|
|
|
- AND sendOutStatus = 1 AND shopStatus not in (4,5)
|
|
|
+ AND sendOutStatus = 1 AND shopStatus not in (0, 4, 5)
|
|
|
</if>
|
|
|
<if test="orderState == 4 ">
|
|
|
- AND sendOutStatus = 3 AND shopStatus not in (4,5)
|
|
|
+ AND sendOutStatus = 3 AND shopStatus not in (0, 4, 5)
|
|
|
</if>
|
|
|
<if test="orderState == 5 ">
|
|
|
- AND (orderStatusFlag in (2, 3) or refundStatus = 3) AND shopStatus not in (4,5)
|
|
|
+ AND (orderStatusFlag in (2, 3) or refundStatus in (2, 3)) AND shopStatus not in (0, 4, 5)
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="getLastCheckOrderDate" resultType="java.util.Date">
|