fix(测试计划): 修复测试计划模块树名称唯一性校验的问题
--bug=1040713 --user=宋天阳 【测试计划】模块树-当前项目与其他项目重名-创建模块树失败了 https://www.tapd.cn/55049933/s/1518669
This commit is contained in:
parent
b089aa0a5f
commit
9a97825ea8
|
@ -104,7 +104,7 @@ public class TestPlanModuleService extends ModuleTreeService {
|
|||
example.clear();
|
||||
}
|
||||
}
|
||||
example.createCriteria().andParentIdEqualTo(module.getParentId()).andNameEqualTo(module.getName()).andIdNotEqualTo(module.getId());
|
||||
example.createCriteria().andParentIdEqualTo(module.getParentId()).andProjectIdEqualTo(module.getProjectId()).andNameEqualTo(module.getName()).andIdNotEqualTo(module.getId());
|
||||
if (testPlanModuleMapper.countByExample(example) > 0) {
|
||||
throw new MSException(Translator.get("node.name.repeat"));
|
||||
}
|
||||
|
@ -117,6 +117,7 @@ public class TestPlanModuleService extends ModuleTreeService {
|
|||
updateModule.setId(request.getId());
|
||||
updateModule.setName(request.getName().trim());
|
||||
updateModule.setParentId(module.getParentId());
|
||||
updateModule.setProjectId(module.getProjectId());
|
||||
this.checkDataValidity(updateModule);
|
||||
updateModule.setUpdateTime(System.currentTimeMillis());
|
||||
updateModule.setUpdateUser(userId);
|
||||
|
|
|
@ -562,12 +562,12 @@ public class TestPlanTests extends BaseTest {
|
|||
groupTestPlanId7 = returnId;
|
||||
} else if (i == 15) {
|
||||
groupTestPlanId15 = returnId;
|
||||
} else if (i > 700) {
|
||||
} else if (i > 700 && i < 750) {
|
||||
|
||||
|
||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||
TestPlanReportMapper batchInsert = sqlSession.getMapper(TestPlanReportMapper.class);
|
||||
//大于600要创建测试计划报告 每个测试计划创建250个报告
|
||||
// 701-749 要创建测试计划报告 每个测试计划创建250个报告
|
||||
for (int reportCount = 0; reportCount < 250; reportCount++) {
|
||||
TestPlanReport testPlanReport = new TestPlanReport();
|
||||
testPlanReport.setId(IDGenerator.nextStr());
|
||||
|
|
Loading…
Reference in New Issue