![Mybatis使用generator自动生成的Example类使用OR条件查询 Mybatis使用generator自动生成的Example类使用OR条件查询](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
参考:https://blog.csdn.net/qq_36614559/article/details/80354511
public List<AssetsDevicetypeRefactor> fetchDevicetypeByInfosysid(Integer infosysid){
AssetsDevicetypeRefactorExample example = new AssetsDevicetypeRefactorExample();
example.or().andIscustomizeEqualTo("N");
example.or().andInfosysidEqualTo(infosysid);
return assetsDevicetypeRefactorMapper.selectByExample(example);
}
下面是 and or 连用的example教程: