From a5a2b0b473cf0753c681b721f80c003e33286fda Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 27 May 2021 18:01:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=A7=92=E8=89=B2=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/service/NoticeService.java | 4 +- .../io/metersphere/service/UserService.java | 8 +- backend/src/main/java/io/metersphere/xpack | 2 +- .../environment/EnvironmentEdit.vue | 2 +- .../common/components/MsAsideItem.vue | 110 +++++++++--------- .../settings/operatinglog/LogDetail.vue | 22 +++- frontend/src/business/components/xpack | 2 +- 7 files changed, 86 insertions(+), 64 deletions(-) diff --git a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java index 411a083772..fe775e475c 100644 --- a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java +++ b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java @@ -14,6 +14,7 @@ import io.metersphere.i18n.Translator; import io.metersphere.log.utils.ReflexObjectUtil; import io.metersphere.log.vo.DetailColumn; import io.metersphere.log.vo.OperatingLogDetails; +import io.metersphere.log.vo.StatusReference; import io.metersphere.log.vo.system.SystemReference; import io.metersphere.notice.domain.MessageDetail; import org.apache.commons.collections.CollectionUtils; @@ -224,7 +225,8 @@ public class NoticeService { } if (task != null) { List columns = ReflexObjectUtil.getColumns(task, SystemReference.messageColumns); - OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(task.getId()), null, task.getTaskType(), task.getUserId(), columns); + OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(task.getId()), null, + StatusReference.statusMap.containsKey(task.getTaskType()) ? StatusReference.statusMap.get(task.getTaskType()) : task.getTaskType(), task.getUserId(), columns); return JSON.toJSONString(details); } return null; diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index e46bbbf2af..294055eb60 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -1202,6 +1202,12 @@ public class UserService { if (CollectionUtils.isNotEmpty(workspaces)) { names = workspaces.stream().map(Workspace::getName).collect(Collectors.toList()); } + ProjectExample projectExample = new ProjectExample(); + projectExample.createCriteria().andIdIn((List) map.get("ids")); + List projects = projectMapper.selectByExample(projectExample); + if (CollectionUtils.isNotEmpty(projects)) { + names = projects.stream().map(Project::getName).collect(Collectors.toList()); + } StringBuilder nameBuff = new StringBuilder(); Group group = groupMapper.selectByPrimaryKey(id); if (group != null && CollectionUtils.isNotEmpty(names)) { @@ -1210,7 +1216,7 @@ public class UserService { colNames.add(nameBuff.toString()); } } - return String.join("\n", colNames); + return String.join(",", colNames); } public String getLogDetails(UserBatchProcessRequest request) { diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 8c27caa18d..87b900d9c5 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 8c27caa18dd0ce5e5d81c0efdbc5ab0b16e923e7 +Subproject commit 87b900d9c55591b1a3a6044172ef02c0bf5b145c diff --git a/frontend/src/business/components/api/test/components/environment/EnvironmentEdit.vue b/frontend/src/business/components/api/test/components/environment/EnvironmentEdit.vue index 353de14958..6e2c4d5d65 100644 --- a/frontend/src/business/components/api/test/components/environment/EnvironmentEdit.vue +++ b/frontend/src/business/components/api/test/components/environment/EnvironmentEdit.vue @@ -1,5 +1,5 @@