修复无法兑换bug

This commit is contained in:
yml2213
2026-05-29 17:28:19 +08:00
parent e8ba48d74f
commit bd0368f91e
4 changed files with 62 additions and 2 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import { query, withTransaction } from '../db/client.js'
import type { PoolClient } from 'pg'
import { syncKuaishouCloudTaskStateForTask } from './kuaishou-cloud-task-state-repo.js'
import { normalizeTimestampIso } from '../utils/time.js'
import type {
TaskCreateInput,
TaskListQueryInput,
@@ -245,7 +246,7 @@ export async function updateTaskStatusIfCurrent(
currentStatus: string,
patch: TaskUpdatePatch,
): Promise<TaskRow | null> {
const now = String(patch.updated_at || '').trim()
const now = normalizeTimestampIso(patch.updated_at, '')
return withTransaction(async (client) => {
const result = await client.query<{
id: number