mybatis 查询

Posted zhoudingzhao

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mybatis 查询相关的知识,希望对你有一定的参考价值。

List<CustomerService> customerlist = customerService.selectByExample(customerexample); 
//如果在customer_service 表有用户的信息,则返回提示
System.out.println("cus:" + (null == customerlist));                      // 如果没有查出数据,customerlist 也不是 null, 可用 isEmpty() 函数判断,输出: cus:false
if (!customerlist.isEmpty()) {
return new JsonResult(false,"该手机号已经是客服号");
}






以上是关于mybatis 查询的主要内容,如果未能解决你的问题,请参考以下文章

MySQL.MyBatis怎么将查询的两个字段作为Map的key和value

MySQL.MyBatis怎么将查询的两个字段作为Map的key和value

MySQL.MyBatis怎么将查询的两个字段作为Map的key和value

MySQL.MyBatis怎么将查询的两个字段作为Map的key和value

MyBatis关联查询,一对多关联查询

mybatis的sql语句导致索引失效,使得查询超时