refactor(用例管理): 更改默认模块名称
This commit is contained in:
parent
8778a78db9
commit
5564ee8ed7
|
@ -7,6 +7,8 @@ permission.case_review.name=用例评审
|
||||||
permission.case_review.review=评审
|
permission.case_review.review=评审
|
||||||
permission.case_review.relevance=关联/取消关联
|
permission.case_review.relevance=关联/取消关联
|
||||||
#module:FunctionalCase
|
#module:FunctionalCase
|
||||||
|
functional_case.module.default.name=未规划用例
|
||||||
|
review.module.default.name=未规划评审
|
||||||
functional_case.id.not_blank=ID不能为空
|
functional_case.id.not_blank=ID不能为空
|
||||||
functional_case.num.not_blank=业务ID不能为空
|
functional_case.num.not_blank=业务ID不能为空
|
||||||
functional_case.custom_num.length_range=自定义业务ID长度必须在1-64之间
|
functional_case.custom_num.length_range=自定义业务ID长度必须在1-64之间
|
||||||
|
|
|
@ -8,6 +8,8 @@ permission.case_review.review=Review
|
||||||
permission.case_review.relevance=Associate/Disassociate
|
permission.case_review.relevance=Associate/Disassociate
|
||||||
|
|
||||||
#module:FunctionalCase
|
#module:FunctionalCase
|
||||||
|
functional_case.module.default.name=Unplanned case
|
||||||
|
review.module.default.name=Unplanned review
|
||||||
functional_case.id.not_blank=ID cannot be empty
|
functional_case.id.not_blank=ID cannot be empty
|
||||||
functional_case.num.not_blank=Business ID cannot be empty
|
functional_case.num.not_blank=Business ID cannot be empty
|
||||||
functional_case.custom_num.length_range=The length of the custom business ID must be between 1 and 64
|
functional_case.custom_num.length_range=The length of the custom business ID must be between 1 and 64
|
||||||
|
|
|
@ -7,6 +7,8 @@ permission.case_review.name=用例评审
|
||||||
permission.case_review.review=评审
|
permission.case_review.review=评审
|
||||||
permission.case_review.relevance=关联/取消关联
|
permission.case_review.relevance=关联/取消关联
|
||||||
#module:FunctionalCase
|
#module:FunctionalCase
|
||||||
|
functional_case.module.default.name=未规划用例
|
||||||
|
review.module.default.name=未规划评审
|
||||||
functional_case.id.not_blank=ID不能为空
|
functional_case.id.not_blank=ID不能为空
|
||||||
functional_case.num.not_blank=业务ID不能为空
|
functional_case.num.not_blank=业务ID不能为空
|
||||||
functional_case.custom_num.length_range=自定义业务ID长度必须在1-64之间
|
functional_case.custom_num.length_range=自定义业务ID长度必须在1-64之间
|
||||||
|
|
|
@ -8,6 +8,8 @@ permission.case_review.review=評審
|
||||||
permission.case_review.relevance=關聯/取消關聯
|
permission.case_review.relevance=關聯/取消關聯
|
||||||
|
|
||||||
#module:FunctionalCase
|
#module:FunctionalCase
|
||||||
|
functional_case.module.default.name=未規劃用例
|
||||||
|
review.module.default.name=未規劃評審
|
||||||
functional_case.id.not_blank=ID不能為空
|
functional_case.id.not_blank=ID不能為空
|
||||||
functional_case.num.not_blank=业务ID不能為空
|
functional_case.num.not_blank=业务ID不能為空
|
||||||
functional_case.custom_num.length_range=自定義業務ID長度必須在1-64之間
|
functional_case.custom_num.length_range=自定義業務ID長度必須在1-64之間
|
||||||
|
|
|
@ -642,7 +642,7 @@ public class CaseReviewFunctionalCaseService {
|
||||||
projectRootMap.forEach((projectId,projectOptionDTOList)->{
|
projectRootMap.forEach((projectId,projectOptionDTOList)->{
|
||||||
BaseTreeNode projectNode = new BaseTreeNode(projectId, projectOptionDTOList.get(0).getProjectName(), Project.class.getName());
|
BaseTreeNode projectNode = new BaseTreeNode(projectId, projectOptionDTOList.get(0).getProjectName(), Project.class.getName());
|
||||||
returnList.add(projectNode);
|
returnList.add(projectNode);
|
||||||
BaseTreeNode defaultNode = functionalCaseModuleService.getDefaultModule(Translator.get("default.module"));
|
BaseTreeNode defaultNode = functionalCaseModuleService.getDefaultModule(Translator.get("functional_case.module.default.name"));
|
||||||
projectNode.addChild(defaultNode);
|
projectNode.addChild(defaultNode);
|
||||||
});
|
});
|
||||||
return returnList;
|
return returnList;
|
||||||
|
@ -653,7 +653,7 @@ public class CaseReviewFunctionalCaseService {
|
||||||
List<String> projectModuleIds = moduleList.stream().map(FunctionalCaseModule::getId).toList();
|
List<String> projectModuleIds = moduleList.stream().map(FunctionalCaseModule::getId).toList();
|
||||||
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(projectModuleIds);
|
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(projectModuleIds);
|
||||||
boolean haveVirtualRootNode = CollectionUtils.isEmpty(projectRootMap.get(projectId));
|
boolean haveVirtualRootNode = CollectionUtils.isEmpty(projectRootMap.get(projectId));
|
||||||
List<BaseTreeNode> baseTreeNodes = functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, !haveVirtualRootNode, Translator.get("default.module"));
|
List<BaseTreeNode> baseTreeNodes = functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, !haveVirtualRootNode, Translator.get("functional_case.module.default.name"));
|
||||||
for (BaseTreeNode baseTreeNode : baseTreeNodes) {
|
for (BaseTreeNode baseTreeNode : baseTreeNodes) {
|
||||||
projectNode.addChild(baseTreeNode);
|
projectNode.addChild(baseTreeNode);
|
||||||
}
|
}
|
||||||
|
@ -704,7 +704,7 @@ public class CaseReviewFunctionalCaseService {
|
||||||
//节点内容只有Id和parentId
|
//节点内容只有Id和parentId
|
||||||
List<String> moduleIds = extFunctionalCaseModuleMapper.selectIdByProjectIdAndReviewId(projectId, reviewId);
|
List<String> moduleIds = extFunctionalCaseModuleMapper.selectIdByProjectIdAndReviewId(projectId, reviewId);
|
||||||
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(moduleIds);
|
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(moduleIds);
|
||||||
return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, moduleCountDTOList, true, Translator.get("default.module"));
|
return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, moduleCountDTOList, true, Translator.get("functional_case.module.default.name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OptionDTO> getUserStatus(String reviewId, String caseId) {
|
public List<OptionDTO> getUserStatus(String reviewId, String caseId) {
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class CaseReviewModuleService extends ModuleTreeService {
|
||||||
|
|
||||||
public List<BaseTreeNode> getTree(String projectId) {
|
public List<BaseTreeNode> getTree(String projectId) {
|
||||||
List<BaseTreeNode> fileModuleList = extCaseReviewModuleMapper.selectBaseByProjectId(projectId);
|
List<BaseTreeNode> fileModuleList = extCaseReviewModuleMapper.selectBaseByProjectId(projectId);
|
||||||
return super.buildTreeAndCountResource(fileModuleList, true, Translator.get("default.module"));
|
return super.buildTreeAndCountResource(fileModuleList, true, Translator.get("review.module.default.name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String add(CaseReviewModuleCreateRequest request, String userId) {
|
public String add(CaseReviewModuleCreateRequest request, String userId) {
|
||||||
|
@ -188,7 +188,7 @@ public class CaseReviewModuleService extends ModuleTreeService {
|
||||||
public List<BaseTreeNode> getTreeOnlyIdsAndResourceCount(String projectId, List<ModuleCountDTO> moduleCountDTOList) {
|
public List<BaseTreeNode> getTreeOnlyIdsAndResourceCount(String projectId, List<ModuleCountDTO> moduleCountDTOList) {
|
||||||
//节点内容只有Id和parentId
|
//节点内容只有Id和parentId
|
||||||
List<BaseTreeNode> fileModuleList = extCaseReviewModuleMapper.selectIdAndParentIdByProjectId(projectId);
|
List<BaseTreeNode> fileModuleList = extCaseReviewModuleMapper.selectIdAndParentIdByProjectId(projectId);
|
||||||
return super.buildTreeAndCountResource(fileModuleList, moduleCountDTOList, true, Translator.get("default.module"));
|
return super.buildTreeAndCountResource(fileModuleList, moduleCountDTOList, true, Translator.get("review.module.default.name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class FunctionalCaseMinderService {
|
||||||
private List<BaseTreeNode> getBaseTreeNodes(List<String> moduleIds) {
|
private List<BaseTreeNode> getBaseTreeNodes(List<String> moduleIds) {
|
||||||
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(moduleIds);
|
List<BaseTreeNode> nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(moduleIds);
|
||||||
//根据模块节点构造模块树
|
//根据模块节点构造模块树
|
||||||
return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, true, Translator.get("default.module"));
|
return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, true, Translator.get("functional_case.module.default.name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void buildCaseTree(List<BaseTreeNode> baseTreeNodes, Map<String, List<FunctionalCasePageDTO>> moduleCaseMap, List<FunctionalMinderTreeDTO> functionalMinderTreeNodeDTOs) {
|
private static void buildCaseTree(List<BaseTreeNode> baseTreeNodes, Map<String, List<FunctionalCasePageDTO>> moduleCaseMap, List<FunctionalMinderTreeDTO> functionalMinderTreeNodeDTOs) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService {
|
||||||
|
|
||||||
public List<BaseTreeNode> getTree(String projectId) {
|
public List<BaseTreeNode> getTree(String projectId) {
|
||||||
List<BaseTreeNode> functionalModuleList = extFunctionalCaseModuleMapper.selectBaseByProjectId(projectId);
|
List<BaseTreeNode> functionalModuleList = extFunctionalCaseModuleMapper.selectBaseByProjectId(projectId);
|
||||||
return super.buildTreeAndCountResource(functionalModuleList, true, Translator.get("default.module"));
|
return super.buildTreeAndCountResource(functionalModuleList, true, Translator.get("functional_case.module.default.name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String add(FunctionalCaseModuleCreateRequest request, String userId) {
|
public String add(FunctionalCaseModuleCreateRequest request, String userId) {
|
||||||
|
@ -186,7 +186,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService {
|
||||||
public List<BaseTreeNode> getTreeOnlyIdsAndResourceCount(String projectId, List<ModuleCountDTO> moduleCountDTOList) {
|
public List<BaseTreeNode> getTreeOnlyIdsAndResourceCount(String projectId, List<ModuleCountDTO> moduleCountDTOList) {
|
||||||
//节点内容只有Id和parentId
|
//节点内容只有Id和parentId
|
||||||
List<BaseTreeNode> fileModuleList = extFunctionalCaseModuleMapper.selectIdAndParentIdByProjectId(projectId);
|
List<BaseTreeNode> fileModuleList = extFunctionalCaseModuleMapper.selectIdAndParentIdByProjectId(projectId);
|
||||||
return super.buildTreeAndCountResource(fileModuleList, moduleCountDTOList, true, Translator.get("default.module"));
|
return super.buildTreeAndCountResource(fileModuleList, moduleCountDTOList, true, Translator.get("functional_case.module.default.name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -250,7 +250,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService {
|
||||||
}
|
}
|
||||||
List<String> moduleIds = functionalCases.stream().map(FunctionalCase::getModuleId).distinct().toList();
|
List<String> moduleIds = functionalCases.stream().map(FunctionalCase::getModuleId).distinct().toList();
|
||||||
List<BaseTreeNode> nodeByNodeIds = getNodeByNodeIds(moduleIds);
|
List<BaseTreeNode> nodeByNodeIds = getNodeByNodeIds(moduleIds);
|
||||||
return super.buildTreeAndCountResource(nodeByNodeIds, true, Translator.get("default.module"));
|
return super.buildTreeAndCountResource(nodeByNodeIds, true, Translator.get("functional_case.module.default.name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BaseTreeNode> getNodeByNodeIds(List<String> moduleIds) {
|
public List<BaseTreeNode> getNodeByNodeIds(List<String> moduleIds) {
|
||||||
|
@ -400,7 +400,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService {
|
||||||
|
|
||||||
public String getModuleName(String id) {
|
public String getModuleName(String id) {
|
||||||
if (ModuleConstants.DEFAULT_NODE_ID.equals(id)) {
|
if (ModuleConstants.DEFAULT_NODE_ID.equals(id)) {
|
||||||
return Translator.get("default.module");
|
return Translator.get("functional_case.module.default.name");
|
||||||
}
|
}
|
||||||
return functionalCaseModuleMapper.selectByPrimaryKey(id).getName();
|
return functionalCaseModuleMapper.selectByPrimaryKey(id).getName();
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class FileMetadataService {
|
||||||
Map<String, String> moduleNameMap = fileModuleService.getModuleNameMapByIds(moduleIds);
|
Map<String, String> moduleNameMap = fileModuleService.getModuleNameMapByIds(moduleIds);
|
||||||
for (FileInformationResponse dto : returnList) {
|
for (FileInformationResponse dto : returnList) {
|
||||||
if (StringUtils.equals(dto.getModuleId(), ModuleConstants.DEFAULT_NODE_ID)) {
|
if (StringUtils.equals(dto.getModuleId(), ModuleConstants.DEFAULT_NODE_ID)) {
|
||||||
dto.setModuleName(Translator.get("default.module"));
|
dto.setModuleName(Translator.get("file.module.default.name"));
|
||||||
} else {
|
} else {
|
||||||
dto.setModuleName(moduleNameMap.get(dto.getModuleId()));
|
dto.setModuleName(moduleNameMap.get(dto.getModuleId()));
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ public class FileMetadataService {
|
||||||
|
|
||||||
private void initModuleName(FileInformationResponse dto) {
|
private void initModuleName(FileInformationResponse dto) {
|
||||||
if (StringUtils.equals(dto.getModuleId(), ModuleConstants.DEFAULT_NODE_ID)) {
|
if (StringUtils.equals(dto.getModuleId(), ModuleConstants.DEFAULT_NODE_ID)) {
|
||||||
dto.setModuleName(Translator.get("default.module"));
|
dto.setModuleName(Translator.get("file.module.default.name"));
|
||||||
} else {
|
} else {
|
||||||
dto.setModuleName(fileModuleService.getModuleName(dto.getModuleId()));
|
dto.setModuleName(fileModuleService.getModuleName(dto.getModuleId()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue