WHERE 1=1 AND (a.OrderStatus IN(2,3,4,5,6) OR (a.OrderStatus=7 AND a.PaymentTime IS NOT NULL AND a.CancelTime IS NOT NULL AND DATE_FORMAT(a.PaymentTime,'%Y-%m-%d' )<DATE_FORMAT(a.CancelTime,'%Y-%m-%d' )))
WHERE 1=1 AND (a.OrderStatus IN(2,3,4,5,6) OR (a.OrderStatus=7 AND a.PaymentTime IS NOT NULL AND a.CancelTime IS NOT NULL AND DATE_FORMAT(a.PaymentTime,'%Y-%m-%d' )<DATE_FORMAT(a.CancelTime,'%Y-%m-%d' )))
AND DATE_FORMAT(a.CreateDate,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') {1}
AND DATE_FORMAT(a.CreateDate,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') {1}
...
@@ -1107,7 +1107,7 @@ SELECT A.*
...
@@ -1107,7 +1107,7 @@ SELECT A.*
FROM rb_member_user AS A
FROM rb_member_user AS A
INNER JOIN
INNER JOIN
(
(
SELECT District UserId
SELECT DISTINCT a.UserId
FROM rb_goods_order AS a
FROM rb_goods_order AS a
WHERE 1=1 AND (a.OrderStatus IN(2,3,4,5,6) OR (a.OrderStatus=7 AND a.PaymentTime IS NOT NULL AND a.CancelTime IS NOT NULL AND DATE_FORMAT(a.PaymentTime,'%Y-%m-%d' )<DATE_FORMAT(a.CancelTime,'%Y-%m-%d' )))
WHERE 1=1 AND (a.OrderStatus IN(2,3,4,5,6) OR (a.OrderStatus=7 AND a.PaymentTime IS NOT NULL AND a.CancelTime IS NOT NULL AND DATE_FORMAT(a.PaymentTime,'%Y-%m-%d' )<DATE_FORMAT(a.CancelTime,'%Y-%m-%d' )))
AND DATE_FORMAT(a.CreateDate,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') {1}
AND DATE_FORMAT(a.CreateDate,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') {1}