fix(manual-executor): 人工派单准备后电子凭证核销补充告警日志
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { logWarn } from '../../../utils/logger.js'
|
||||||
import { TASK_STATUS } from '../../../domain/task-status.js'
|
import { TASK_STATUS } from '../../../domain/task-status.js'
|
||||||
import { autoConsumeKuaishouIndustryVouchersForTask } from '../../platforms/kuaishou-industry/voucher-auto-consume-service.js'
|
import { autoConsumeKuaishouIndustryVouchersForTask } from '../../platforms/kuaishou-industry/voucher-auto-consume-service.js'
|
||||||
import {
|
import {
|
||||||
@@ -33,8 +34,12 @@ async function preparePaidTask(
|
|||||||
const effectiveTask = updatedTask || task
|
const effectiveTask = updatedTask || task
|
||||||
await autoConsumeKuaishouIndustryVouchersForTask(effectiveTask, {
|
await autoConsumeKuaishouIndustryVouchersForTask(effectiveTask, {
|
||||||
source: 'manual_dispatch_prepared',
|
source: 'manual_dispatch_prepared',
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
// 忽略异常,发码回调完成后仍会自动补核销
|
logWarn('[manual-executor]', '人工派单准备后自动推进电子凭证核销失败', {
|
||||||
|
taskId: effectiveTask.id,
|
||||||
|
platformOrderId: effectiveTask.platform_order_id,
|
||||||
|
error: error instanceof Error ? error.message : String(error),
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
return updatedTask
|
return updatedTask
|
||||||
|
|||||||
Reference in New Issue
Block a user