From 4cdc6561dc174a2e0572c84773eb8496c4185600 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Thu, 9 Feb 2023 17:56:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/new-ui/MsTable.vue | 8 +- .../src/components/table/MsNewUiTable.vue | 642 ------------------ .../io/metersphere/service/IssuesService.java | 12 +- .../TestCaseReviewTestCaseUsersService.java | 2 +- 4 files changed, 14 insertions(+), 650 deletions(-) delete mode 100644 framework/sdk-parent/frontend/src/components/table/MsNewUiTable.vue diff --git a/framework/sdk-parent/frontend/src/components/new-ui/MsTable.vue b/framework/sdk-parent/frontend/src/components/new-ui/MsTable.vue index db79d9ae3b..5ccf6feb25 100644 --- a/framework/sdk-parent/frontend/src/components/new-ui/MsTable.vue +++ b/framework/sdk-parent/frontend/src/components/new-ui/MsTable.vue @@ -384,7 +384,13 @@ export default { }); }, handleSelect(selection, row) { - _handleSelect(this, selection, row, this.selectRows); + let selectRowMap = new Map(); + for (let selectRow of this.selectRows) { + selectRowMap.set(selectRow.id, selectRow); + } + _handleSelect(this, selection, row, selectRowMap); + let selectRow = Array.from(selectRowMap.values()); + this.selectRows = new Set(selectRow); setUnSelectIds(this.data, this.condition, this.selectRows); this.selectDataCounts = getSelectDataCounts(this.condition, this.total, this.selectRows); this.selectIds = Array.from(this.selectRows).map(o => o.id); diff --git a/framework/sdk-parent/frontend/src/components/table/MsNewUiTable.vue b/framework/sdk-parent/frontend/src/components/table/MsNewUiTable.vue deleted file mode 100644 index 155b31a0c7..0000000000 --- a/framework/sdk-parent/frontend/src/components/table/MsNewUiTable.vue +++ /dev/null @@ -1,642 +0,0 @@ - - - - - diff --git a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java index 65ca38e77e..35b75439bd 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java @@ -443,10 +443,11 @@ public class IssuesService { List issueIds = issues.stream().map(Issues::getId).collect(Collectors.toList()); String projectId = issues.get(0).getProjectId(); Project project = projectMapper.selectByPrimaryKey(projectId); - if (project == null) { + IssueTemplateDao issueTemplate = getIssueTemplateByProjectId(project.getId()); + if (issueTemplate == null) { return; } - String templateId = project.getIssueTemplateId(); + String templateId = issueTemplate.getId(); if (StringUtils.isBlank(templateId)) { return; } @@ -1286,12 +1287,11 @@ public class IssuesService { return; } IssuesWithBLOBs issue = issuesMapper.selectByPrimaryKey(issuesId); - Project project = projectMapper.selectByPrimaryKey(issue.getProjectId()); - if (project == null) { + IssueTemplateDao issueTemplate = getIssueTemplateByProjectId(issue.getProjectId()); + if (issueTemplate == null) { return; } - String templateId = project.getIssueTemplateId(); - if (StringUtils.isNotBlank(templateId)) { + if (StringUtils.isNotBlank(issueTemplate.getId())) { // 模版对于同一个系统字段应该只关联一次 CustomField customField = baseCustomFieldService.getCustomFieldByName(issue.getProjectId(), SystemCustomField.ISSUE_STATUS); if (customField != null) { diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewTestCaseUsersService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewTestCaseUsersService.java index 8317728eb7..25d98edbc5 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewTestCaseUsersService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewTestCaseUsersService.java @@ -4,10 +4,10 @@ package io.metersphere.service; import io.metersphere.base.domain.TestCaseReviewTestCaseUsers; import io.metersphere.base.domain.TestCaseReviewTestCaseUsersExample; import io.metersphere.base.mapper.TestCaseReviewTestCaseUsersMapper; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; import java.util.List; import java.util.stream.Collectors;