fix: 编辑模块报错

This commit is contained in:
chenjianxing 2021-09-24 10:43:14 +08:00 committed by jianxing
parent 3f6a0e41c7
commit 6b3340f20b
3 changed files with 3 additions and 3 deletions

View File

@ -342,7 +342,7 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
ApiDefinitionMapper apiDefinitionMapper = sqlSession.getMapper(ApiDefinitionMapper.class);
apiModule.forEach((value) -> {
apiDefinitionMapper.updateByPrimaryKey(value);
apiDefinitionMapper.updateByPrimaryKeySelective(value);
});
sqlSession.flushStatements();
}

View File

@ -287,7 +287,7 @@ public class ApiScenarioModuleService extends NodeTreeService<ApiScenarioModuleD
private void batchUpdateApiScenario(List<ApiScenarioDTO> apiScenarios) {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
ApiScenarioMapper apiScenarioMapper = sqlSession.getMapper(ApiScenarioMapper.class);
apiScenarios.forEach(apiScenarioMapper::updateByPrimaryKey);
apiScenarios.forEach(apiScenarioMapper::updateByPrimaryKeySelective);
sqlSession.flushStatements();
}

View File

@ -576,7 +576,7 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
TestCaseMapper testCaseMapper = sqlSession.getMapper(TestCaseMapper.class);
testCases.forEach((value) -> {
testCaseMapper.updateByPrimaryKey(value);
testCaseMapper.updateByPrimaryKeySelective(value);
});
sqlSession.flushStatements();
}