refactor(测试计划): 优化列表默认模块名称

This commit is contained in:
WangXu10 2024-06-19 13:45:25 +08:00 committed by Craftsman
parent 78b0948669
commit 4e28744647
2 changed files with 2 additions and 2 deletions

View File

@ -264,7 +264,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService {
item.setProjectName(projectMap.get(item.getProjectId()));
item.setCreateUserName(userMap.get(item.getCreateUser()));
item.setExecuteUserName(userMap.get(item.getExecuteUser()));
item.setModuleName(moduleNameMap.get(item.getModuleId()));
item.setModuleName(StringUtils.isNotBlank(moduleNameMap.get(item.getModuleId())) ? moduleNameMap.get(item.getModuleId()) : Translator.get("api_unplanned_request"));
if (secondEnvMap.containsKey(item.getTestPlanCollectionId())) {
TestPlanCollectionEnvDTO collectEnv = secondEnvMap.get(item.getTestPlanCollectionId());
if (collectEnv.getExtended()) {

View File

@ -252,7 +252,7 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
testPlanCasePageResponse.setCustomFields(collect.get(testPlanCasePageResponse.getCaseId()));
testPlanCasePageResponse.setCreateUserName(userMap.get(testPlanCasePageResponse.getCreateUser()));
testPlanCasePageResponse.setExecuteUserName(userMap.get(testPlanCasePageResponse.getExecuteUser()));
testPlanCasePageResponse.setModuleName(moduleNameMap.get(testPlanCasePageResponse.getModuleId()));
testPlanCasePageResponse.setModuleName(StringUtils.isNotBlank(moduleNameMap.get(testPlanCasePageResponse.getModuleId())) ? moduleNameMap.get(testPlanCasePageResponse.getModuleId()) : Translator.get("functional_case.module.default.name"));
if (bugListMap.containsKey(testPlanCasePageResponse.getCaseId())) {
List<CaseRelateBugDTO> bugDTOList = bugListMap.get(testPlanCasePageResponse.getCaseId());
testPlanCasePageResponse.setBugList(handleStatus(bugDTOList, statusMap));