Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add Sqlsessiontemplate function in Spring Batch #488

Open
pixy032 opened this issue Jun 27, 2020 · 1 comment
Open

Is it possible to add Sqlsessiontemplate function in Spring Batch #488

pixy032 opened this issue Jun 27, 2020 · 1 comment

Comments

@pixy032
Copy link

pixy032 commented Jun 27, 2020

Now only this way:
MyBatisCursorItemReader reader = new MyBatisCursorItemReader();
reader.setSqlSessionFactory(sqlSessionFactory);
reader.setQueryId("xxx.xxx.xxxx.xxxxxxx.mapper.BatchMstEmployeesEntityMapper.exmapleSelect");
reader.setParameterValues(map);
return reader;

Can it be used like in Spring Boot:
BatchTaskEntityExample selectExample = new BatchTaskEntityExample();
BatchTaskEntityExample.Criteria selectCriteria = selectExample1.createCriteria();
selectCriteria.andTaskStatusEqualTo("processing");
selectCriteria.andStartTimeLessThan(maxTime);
List batchs = batchTaskEntityMapper.selectByExample(selectExample);

Thanks

@kazuki43zoo
Copy link
Member

@pixy032

Sorry, I cannot understand a your question. Could you explain more details?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants