使用tk.mybatis的注意事项
当遇到这种错误的时候,
java.lang.NoSuchMethodException: tk.mybatis.mapper.provider.base.BaseSelectProvider.<init>()
证明springboot扫描注解引用错误

2、在做单体多条件组合查询的时候,一定要使用高版本的依赖包,否则会提示orEqualto无法识别等程序错误,我引用的是4.0版本的


Example e = new Example(clientinfos.class);
Example.Criteria c = e.createCriteria();
if(!StringUtils.isBlank(clientinfos.getClientid()))
{
c.orEqualTo("clientid",clientinfos.getClientid()).orEqualTo("connected",1);
}
Example.Criteria criteria = e.createCriteria();
criteria.andLessThan("lastconnecteddate", new Date());
e.and(c);
List<clientinfos> lists=mapper.selectByExample(e);
return lists;
posted on 2019-09-06 10:35 lijinchang 阅读(509) 评论(0) 收藏 举报
浙公网安备 33010602011771号