diff --git a/backend/framework/provider/src/main/java/io/metersphere/dto/TestCaseProviderDTO.java b/backend/framework/provider/src/main/java/io/metersphere/dto/TestCaseProviderDTO.java index 1d0fb4f43c..549c8bb4b7 100644 --- a/backend/framework/provider/src/main/java/io/metersphere/dto/TestCaseProviderDTO.java +++ b/backend/framework/provider/src/main/java/io/metersphere/dto/TestCaseProviderDTO.java @@ -49,4 +49,15 @@ public class TestCaseProviderDTO { @Schema(description = "自定义字段集合") private List customFields; + @Schema(description = "创建人") + private String createUser; + + @Schema(description = "创建人名称") + private String createUserName; + + @Schema(description = "创建时间") + private Long createTime; + + + } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioMapper.xml index 14cae37c9e..ad2640e975 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioMapper.xml @@ -79,10 +79,14 @@ api_scenario.tags, api_scenario.pos, api_scenario.version_id, - project_version.name as versionName + project_version.name as versionName, + api_scenario.create_user, + user.name as createUserName, + api_scenario.create_time FROM api_scenario LEFT JOIN project_version ON api_scenario.version_id = project_version.id + LEFT JOIN user ON api_scenario.create_user = user.id WHERE api_scenario.deleted =#{deleted} and api_scenario.id not in ( diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml index 3b6a9f581d..e993f9d683 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml @@ -183,11 +183,15 @@ atc.priority, atc.tags, atc.version_id, - v.name as versionName + v.name as versionName, + atc.create_user, + u.name as createUserName, + atc.create_time FROM api_test_case atc LEFT JOIN project_version v ON atc.version_id = v.id INNER JOIN api_definition a ON atc.api_definition_id = a.id + LEFT JOIN user u ON atc.create_user = u.id WHERE atc.deleted =#{deleted} and atc.id not in ( diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.xml index adc315a7e1..02b91ce406 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.xml +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.xml @@ -714,8 +714,12 @@ fc.name, fc.project_id, fc.tags, - pv.name as versionName + pv.name as versionName, + fc.create_user, + u.name as createUserName, + fc.create_time from functional_case fc left join project_version pv ON fc.version_id = pv.id + left join user u ON fc.create_user = u.id where fc.deleted = #{deleted} and fc.project_id = #{request.projectId} and fc.id not in diff --git a/frontend/src/components/business/ms-case-associate/index.vue b/frontend/src/components/business/ms-case-associate/index.vue index c3be0d7f50..fbf71300a8 100644 --- a/frontend/src/components/business/ms-case-associate/index.vue +++ b/frontend/src/components/business/ms-case-associate/index.vue @@ -368,6 +368,25 @@ dataIndex: 'tags', isTag: true, }, + { + title: 'caseManagement.featureCase.tableColumnCreateUser', + slotName: 'createUserName', + dataIndex: 'createUserName', + showTooltip: true, + width: 200, + showDrag: true, + }, + { + title: 'caseManagement.featureCase.tableColumnCreateTime', + slotName: 'createTime', + dataIndex: 'createTime', + sortable: { + sortDirections: ['ascend', 'descend'], + sorter: true, + }, + width: 200, + showDrag: true, + }, ]; watchEffect(() => {