| | |
| | | and o.transfer_id is null |
| | | and o.status in ('COLLECTION','SEND') |
| | | ) |
| | | -- AND exists( |
| | | -- select 1 from t_order_item oi |
| | | -- where oi.order_id = q.id |
| | | -- and oi.status in ('abnormal','reduce','lack','back') |
| | | -- ) |
| | | -- and q.transfer_id is null |
| | | -- and q.status in ('COLLECTION', 'SEND') |
| | | </if> |
| | | |
| | | <if test="condition.abnormalOrderStatus != null and condition.abnormalOrderStatus != '' and condition.abnormalOrderStatus == 'PROCESSED'"> |
| | |
| | | and o.transfer_id is null |
| | | and o.status in ('COLLECTION','SEND') |
| | | ) |
| | | -- AND exists( |
| | | -- select 1 from t_order_item oi |
| | | -- where oi.order_id = q.id |
| | | -- and oi.status in ('abnormal','reduce','lack','back') |
| | | -- ) |
| | | -- AND not exists( |
| | | -- select 1 from t_order_item oi |
| | | -- where oi.order_id = q.id |
| | | -- and oi.status in ('abnormal','reduce','lack','back') |
| | | -- and q.transfer_id is null |
| | | -- and q.status in ('COLLECTION', 'SEND') |
| | | -- ) |
| | | |
| | | |
| | | </if> |
| | | |
| | | ORDER BY q.create_time desc, q.payment_time desc |