EmployeeMapper.xml SELECT id,NAME,gender,idcard,nationid FROM employee WHERE 1=1
EmployeeMapper.xml
SELECT id,NAME,gender,idcard,nationid FROM employee WHERE 1=1 and NAME LIKE #{p_name}
调用数据层
public interface EmployeeMapper { // 姓名查询员工信息 public List findByName(String name); // 多条件组合查询查询员工信息 public List findByCondition(@Param("id") int id, @Param("name")String name, @Param("idcard")String idcard, @Param("nationid")int nationid); public List findByCondition(Employee employee);}
工程目录:
来源地址:https://blog.csdn.net/qq_45947664/article/details/129403276
--结束END--
本文标题: mybatis实现多条件模糊查询
本文链接: https://www.lsjlt.com/news/388887.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0