feat: 完成 PRD 差距与修复,新增审核流与日志清理功能,支持出库信息与动态字段,优化 C 端用户体验

This commit is contained in:
Nixevol
2026-06-29 23:41:39 +08:00
parent d18b7c592d
commit 2fba42c9fd
39 changed files with 1247 additions and 185 deletions
@@ -98,6 +98,11 @@ export class BatchStatusDto {
@ApiProperty({ description: 'true 停用,false 启用' })
@IsBoolean()
disabled!: boolean;
@ApiPropertyOptional({ description: 'true 标记为异常(优先级高于 disabled)' })
@IsOptional()
@IsBoolean()
abnormal?: boolean;
}
export class BindArtworkDto {
@@ -101,7 +101,13 @@ export class TraceCodeService {
async batchSetStatus(dto: BatchStatusDto) {
const ids = dto.ids.map((i) => BigInt(i));
if (dto.disabled) {
if (dto.abnormal) {
// 标记异常:用于运营人为标注疑似被复制/盗用的码
await this.prisma.traceCode.updateMany({
where: { id: { in: ids } },
data: { status: TraceCodeStatus.ABNORMAL },
});
} else if (dto.disabled) {
await this.prisma.traceCode.updateMany({
where: { id: { in: ids } },
data: { status: TraceCodeStatus.DISABLED },