diff --git a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelData.java b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelData.java index 39e0a607bf..adaa61ee12 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelData.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/domain/IssueExcelData.java @@ -48,6 +48,8 @@ public class IssueExcelData implements Serializable { @ExcelIgnore private Boolean addFlag; @ExcelIgnore + private Boolean updateFlag = true; + @ExcelIgnore private String title; @ExcelIgnore private String description; diff --git a/test-track/backend/src/main/java/io/metersphere/excel/listener/IssueExcelListener.java b/test-track/backend/src/main/java/io/metersphere/excel/listener/IssueExcelListener.java index fab5a5822b..fb8b2105d2 100644 --- a/test-track/backend/src/main/java/io/metersphere/excel/listener/IssueExcelListener.java +++ b/test-track/backend/src/main/java/io/metersphere/excel/listener/IssueExcelListener.java @@ -121,6 +121,12 @@ public class IssueExcelListener extends AnalysisEventListener issues = updateList.stream().map(this::convertToIssue).collect(Collectors.toList()); + List issues = updateList.stream().filter(IssueExcelData::getUpdateFlag).map(this::convertToIssue).collect(Collectors.toList()); issuesService.updateImportData(issues); } }