fix(contracts): Prisma JSON 字段使用 undefined 替代 null

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-05 23:02:02 -08:00
parent 05e2c29f37
commit 0e058caa28
1 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@ export class ContractBatchDownloadJob implements OnModuleInit {
failedCount, failedCount,
progress, progress,
lastProcessedOrderNo: contract.orderNo, lastProcessedOrderNo: contract.orderNo,
errors: errors.length > 0 ? errors : null, errors: errors.length > 0 ? errors : undefined,
}, },
}); });
this.logger.log(`进度: ${progress}% (${downloadedCount}/${totalContracts})`); this.logger.log(`进度: ${progress}% (${downloadedCount}/${totalContracts})`);
@ -245,7 +245,7 @@ export class ContractBatchDownloadJob implements OnModuleInit {
progress: 100, progress: 100,
resultFileUrl, resultFileUrl,
resultFileSize: BigInt(zipStats.size), resultFileSize: BigInt(zipStats.size),
errors: errors.length > 0 ? errors : null, errors: errors.length > 0 ? errors : undefined,
completedAt: new Date(), completedAt: new Date(),
expiresAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), // 7天后过期 expiresAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), // 7天后过期
}, },