From 867886860febfb77cd081c278b49b975b57205a4 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Tue, 27 Feb 2024 17:21:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=96=87=E4=BB=B6=E6=97=B6=E7=9A=84=E4=B8=80=E6=8F=BD?= =?UTF-8?q?=E5=AD=90=E7=BC=BA=E9=99=B7=EF=BC=9A=E5=88=87=E6=8D=A2=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E6=A8=A1=E5=BC=8F=E6=97=B6=E6=95=B0=E6=8D=AE=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E9=97=AE=E9=A2=98=E3=80=81=E5=90=84=E7=A7=8D=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E9=97=AE=E9=A2=98=E3=80=81=E8=A1=A8=E6=A0=BC=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=B2=A1=E6=9C=89=E6=94=AF=E6=8C=81=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sdk/constants/ModuleConstants.java | 2 + .../response/FileInformationResponse.java | 4 +- .../project/mapper/ExtFileMetadataMapper.xml | 2 +- .../project/service/FileMetadataService.java | 6 +++ .../ms-link-file/associatedFileDrawer.vue | 47 ++++++++----------- .../business/ms-link-file/linkFileTable.vue | 25 ++++++++-- 6 files changed, 51 insertions(+), 35 deletions(-) diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/ModuleConstants.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/ModuleConstants.java index de4489e906..5ec52018b9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/ModuleConstants.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/ModuleConstants.java @@ -23,5 +23,7 @@ public class ModuleConstants { /* 模块数量统计相关key */ public static final String MODULE_COUNT_ALL = "all"; public static final String MODULE_COUNT_MY = "my"; + public static final String MODULE_COUNT_GIT = "git"; + public static final String MODULE_COUNT_MINIO = "minio"; /* 模块数量统计相关key end*/ } diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/dto/filemanagement/response/FileInformationResponse.java b/backend/services/project-management/src/main/java/io/metersphere/project/dto/filemanagement/response/FileInformationResponse.java index c984d62b5c..8e2c52ff31 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/dto/filemanagement/response/FileInformationResponse.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/dto/filemanagement/response/FileInformationResponse.java @@ -40,10 +40,10 @@ public class FileInformationResponse { @Schema(description = "模块ID") private String moduleId; - @Schema(description = "更新人") + @Schema(description = "创建人") private String createUser; - @Schema(description = "更新时间") + @Schema(description = "创建时间") private long createTime; @Schema(description = "更新人") diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtFileMetadataMapper.xml b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtFileMetadataMapper.xml index 20e69be28c..785c82452d 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtFileMetadataMapper.xml +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtFileMetadataMapper.xml @@ -30,7 +30,7 @@ SELECT f.id, updateUser.name as update_user, - createUser.name AS create_uUser, + createUser.name AS create_user, f.module_id, f.name, f.type, diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/FileMetadataService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/FileMetadataService.java index e8ed0dc3b7..f598ad4d44 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/FileMetadataService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/FileMetadataService.java @@ -459,10 +459,16 @@ public class FileMetadataService { myFileCountDTO.setStorage(null); myFileCountDTO.setHiddenIds(pageDTO.getHiddenIds()); long allCount = extFileMetadataMapper.fileCount(myFileCountDTO); + //查找git文件数量 + myFileCountDTO.setStorage(StorageType.GIT.name()); + long gitAllCount = extFileMetadataMapper.fileCount(myFileCountDTO); + myFileCountDTO.setStorage(null); myFileCountDTO.setOperator(operator); long myFileCount = extFileMetadataMapper.fileCount(myFileCountDTO); moduleCountMap.put(ModuleConstants.MODULE_COUNT_MY, myFileCount); moduleCountMap.put(ModuleConstants.MODULE_COUNT_ALL, allCount); + moduleCountMap.put(ModuleConstants.MODULE_COUNT_GIT, gitAllCount); + moduleCountMap.put(ModuleConstants.MODULE_COUNT_MINIO, allCount - gitAllCount); return moduleCountMap; } diff --git a/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue b/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue index 827a66a7b1..83a61074e9 100644 --- a/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue +++ b/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue @@ -72,6 +72,7 @@ :get-list-request="props.getListRequest" :get-list-fun-params="props.getListFunParams" :selector-type="props.selectorType" + :file-all-count-by-storage="fileAllCountByStorage" @init="handleModuleTableInit" /> @@ -80,22 +81,22 @@