refactor(测试计划): 默认测试集名称国际化显示

This commit is contained in:
WangXu10 2024-06-14 10:50:46 +08:00 committed by Craftsman
parent 92444ce347
commit b84cdf7a54
3 changed files with 6 additions and 5 deletions

View File

@ -386,7 +386,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService {
collectionExample.createCriteria().andTypeEqualTo(CaseType.API_CASE.getKey()).andParentIdNotEqualTo(ModuleConstants.ROOT_NODE_PARENT_ID).andTestPlanIdEqualTo(testPlanId);
List<TestPlanCollection> testPlanCollections = testPlanCollectionMapper.selectByExample(collectionExample);
testPlanCollections.forEach(item -> {
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), item.getName(), CaseType.API_CASE.getKey());
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), Translator.get(item.getName(), item.getName()), CaseType.API_CASE.getKey());
returnList.add(baseTreeNode);
});
return returnList;

View File

@ -490,7 +490,7 @@ public class TestPlanApiScenarioService extends TestPlanResourceService {
collectionExample.createCriteria().andTypeEqualTo(CaseType.SCENARIO_CASE.getKey()).andParentIdNotEqualTo(ModuleConstants.ROOT_NODE_PARENT_ID).andTestPlanIdEqualTo(testPlanId);
List<TestPlanCollection> testPlanCollections = testPlanCollectionMapper.selectByExample(collectionExample);
testPlanCollections.forEach(item -> {
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), item.getName(), CaseType.SCENARIO_CASE.getKey());
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), Translator.get(item.getName(), item.getName()), CaseType.SCENARIO_CASE.getKey());
returnList.add(baseTreeNode);
});
return returnList;
@ -587,12 +587,13 @@ public class TestPlanApiScenarioService extends TestPlanResourceService {
/**
* 批量移动
*
* @param request
*/
public void batchMove(BaseBatchMoveRequest request) {
List<String> ids = doSelectIds(request);
if (CollectionUtils.isNotEmpty(ids)) {
moveCaseToCollection(ids,request.getTargetCollectionId());
moveCaseToCollection(ids, request.getTargetCollectionId());
}
}

View File

@ -280,7 +280,7 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
}
/**
* 已关联接口用例规划视图树
* 已关联功能用例规划视图树
*
* @param testPlanId
* @return
@ -291,7 +291,7 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
collectionExample.createCriteria().andTypeEqualTo(CaseType.FUNCTIONAL_CASE.getKey()).andParentIdNotEqualTo(ModuleConstants.ROOT_NODE_PARENT_ID).andTestPlanIdEqualTo(testPlanId);
List<TestPlanCollection> testPlanCollections = testPlanCollectionMapper.selectByExample(collectionExample);
testPlanCollections.forEach(item -> {
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), item.getName(), CaseType.FUNCTIONAL_CASE.getKey());
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), Translator.get(item.getName(), item.getName()), CaseType.FUNCTIONAL_CASE.getKey());
returnList.add(baseTreeNode);
});
return returnList;