From 5f1fb4b4168b9e5a3ddce9804397abe9dcc97c8d Mon Sep 17 00:00:00 2001 From: sdjdd Date: Wed, 7 Feb 2024 12:21:50 +0800 Subject: [PATCH] feat(next/api): process PRE_FULFILLED tickets by time triggers --- next/api/src/ticket/automation/time-trigger/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/next/api/src/ticket/automation/time-trigger/index.ts b/next/api/src/ticket/automation/time-trigger/index.ts index 65118635e..5cf9fc8ed 100644 --- a/next/api/src/ticket/automation/time-trigger/index.ts +++ b/next/api/src/ticket/automation/time-trigger/index.ts @@ -36,7 +36,12 @@ export class TimeTrigger { function getOpenTickets(cursor?: string): Promise { const query = Ticket.queryBuilder() - .where('status', '<', Ticket.Status.PRE_FULFILLED) + .where('status', 'in', [ + Ticket.Status.NEW, + Ticket.Status.WAITING_CUSTOMER, + Ticket.Status.WAITING_CUSTOMER_SERVICE, + Ticket.Status.PRE_FULFILLED, + ]) .orderBy('objectId', 'asc') .limit(1000); if (cursor) {