fix;合并修复问题

This commit is contained in:
ljy
2026-07-09 21:42:36 +08:00
parent 3d3588babb
commit 336116fbf2
18 changed files with 341 additions and 190 deletions
@@ -0,0 +1,13 @@
import { BadRequestException } from '@nestjs/common';
export function parseBigIntParam(value: unknown, label = 'ID'): bigint {
const text = String(value ?? '').trim();
if (!/^\d+$/.test(text)) {
throw new BadRequestException(`${label}格式无效`);
}
try {
return BigInt(text);
} catch {
throw new BadRequestException(`${label}格式无效`);
}
}