fix: 修复后端竞态/安全/数据处理问题并移除冗余 outImage 列

首次激活改条件更新消除并发竞态;备份恢复补模型全集与版本校验防清库;
审核列表分页总数、操作日志未捕获 Promise、出库导入重复码、加密密钥可编辑、
溯源码盐以 env 为准、证书按 originKey reconcile、env 加载去重等修复;
新增 parseBigId 防非法入参 500、全局安全响应头、去除 SVG 上传、接入 throttler 限流、
入队失败补偿、hashData 稳定序列化、无效码负缓存、看板已激活口径调整;
移除冗余 TraceCode.outImage 列统一 outImages(迁移 drop_trace_code_out_image)。
This commit is contained in:
Nixevol
2026-07-09 13:14:26 +08:00
parent c39974e72d
commit f712b16c1f
29 changed files with 328 additions and 170 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import dayjs from 'dayjs';
import { QueryResult, TraceCodeStatus } from '@artveris/shared';
import { QueryResult } from '@artveris/shared';
import { PrismaService } from '../prisma/prisma.service';
export interface DashboardOverviewQuery {
@@ -37,7 +37,8 @@ export class DashboardService {
] = await this.prisma.$transaction([
this.prisma.artwork.count({ where: { deletedAt: null } }),
this.prisma.traceCode.count(),
this.prisma.traceCode.count({ where: { status: TraceCodeStatus.ACTIVE } }),
// 已激活口径:累计激活过(firstActivatedAt 非空),激活后又被停用/异常的仍计入
this.prisma.traceCode.count({ where: { firstActivatedAt: { not: null } } }),
this.prisma.queryLog.count(),
this.prisma.queryLog.count({ where: { queriedAt: { gte: todayStart } } }),
this.prisma.queryLog.count({