测试: 补齐上传文件删除校验与失败保护

This commit is contained in:
wkc
2026-03-16 14:38:26 +08:00
parent 9179e15682
commit 275fc7a264
2 changed files with 42 additions and 0 deletions

View File

@@ -890,6 +890,18 @@ public class CcdiFileUploadServiceImpl implements ICcdiFileUploadService {
if (record == null) {
throw new RuntimeException("上传记录不存在");
}
if (!"parsed_success".equals(record.getFileStatus())) {
if ("deleted".equals(record.getFileStatus())) {
throw new RuntimeException("文件已删除,请勿重复操作");
}
throw new RuntimeException("仅支持删除解析成功文件");
}
if (record.getLsfxProjectId() == null) {
throw new RuntimeException("缺少流水分析项目ID");
}
if (record.getLogId() == null) {
throw new RuntimeException("缺少文件logId");
}
}
private Integer toUploadUserId(Long userId) {