优化 Webhook 列表, 优化日志系统
This commit is contained in:
@@ -92,6 +92,7 @@ export async function listWebhookEvents({
|
||||
platform = '',
|
||||
platformOrderId = '',
|
||||
processed = '',
|
||||
visibility = 'important',
|
||||
relatedOrderId = '',
|
||||
dateFrom = '',
|
||||
dateTo = '',
|
||||
@@ -120,6 +121,12 @@ export async function listWebhookEvents({
|
||||
filters.push(`processed = $${params.length}`)
|
||||
}
|
||||
|
||||
if (visibility === 'ignored') {
|
||||
filters.push(`process_error LIKE 'ignored_%'`)
|
||||
} else if (visibility === 'important') {
|
||||
filters.push(`(process_error = '' OR process_error NOT LIKE 'ignored_%')`)
|
||||
}
|
||||
|
||||
if (relatedOrderId) {
|
||||
params.push(Number(relatedOrderId))
|
||||
filters.push(`related_order_id = $${params.length}`)
|
||||
|
||||
Reference in New Issue
Block a user