修复时间不考虑退货和删除

This commit is contained in:
邓皓元 2019-08-21 16:49:22 +08:00
parent 1ae0f77fbe
commit d1eadd331e

View File

@ -48,7 +48,7 @@ BEGIN
virtual_order_cards_partition.service_start_at,
virtual_order_cards_partition.service_end_at
FROM vd.virtual_order_cards_partition
WHERE virtual_order_cards_partition.sim = ANY ($1)
WHERE virtual_order_cards_partition.sim = ANY ($1) AND deleted_at IS NOT NULL AND refunded_at IS NOT NULL
ORDER BY virtual_order_cards_partition.sim ASC, virtual_order_cards_partition.created_at ASC) t;
IF orders IS NOT NULL THEN