mybatis 查询

时间:2018-03-30 12:55:43   收藏:0   阅读:181

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,"该手机号已经是客服号");
}

原文:https://www.cnblogs.com/z360519549/p/8675562.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!