fix(测试跟踪): 复制测试计划性能用例修改配置资源池没显示

--bug=1024599 --user=李玉号 【测试跟踪】复制测试计划-性能用例-点击修改配置-资源池没显示
https://www.tapd.cn/55049933/s/1352457
This commit is contained in:
shiziyuan9527 2023-03-17 18:23:07 +08:00 committed by lyh
parent e29d3572db
commit df01da7af9
1 changed files with 5 additions and 2 deletions

View File

@ -479,11 +479,11 @@ public class TestPlanLoadCaseService {
try (SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH)) {
TestPlanLoadCaseExample example = new TestPlanLoadCaseExample();
example.createCriteria().andTestPlanIdEqualTo(sourcePlanId);
List<TestPlanLoadCase> loadCases = testPlanLoadCaseMapper.selectByExample(example);
List<TestPlanLoadCaseWithBLOBs> loadCases = testPlanLoadCaseMapper.selectByExampleWithBLOBs(example);
TestPlanLoadCaseMapper mapper = sqlSession.getMapper(TestPlanLoadCaseMapper.class);
if (!org.apache.commons.collections.CollectionUtils.isEmpty(loadCases)) {
Long nextLoadOrder = ServiceUtils.getNextOrder(targetPlanId, extTestPlanLoadCaseMapper::getLastOrder);
for (TestPlanLoadCase loadCase : loadCases) {
for (TestPlanLoadCaseWithBLOBs loadCase : loadCases) {
TestPlanLoadCaseWithBLOBs load = new TestPlanLoadCaseWithBLOBs();
load.setId(UUID.randomUUID().toString());
load.setTestPlanId(targetPlanId);
@ -492,6 +492,9 @@ public class TestPlanLoadCaseService {
load.setUpdateTime(System.currentTimeMillis());
load.setCreateUser(SessionUtils.getUserId());
load.setOrder(nextLoadOrder);
load.setTestResourcePoolId(loadCase.getTestResourcePoolId());
load.setLoadConfiguration(loadCase.getLoadConfiguration());
load.setAdvancedConfiguration(loadCase.getAdvancedConfiguration());
mapper.insert(load);
nextLoadOrder += 5000;
}