mybatis多个参数查询
- 作者: Duang你爹车祸前
- 来源: 51数据库
- 2020-09-28
将多个参数封装成一个map或者对象,mybatis不支持多参数
第一种方案 dao层的函数方法 public user selectuser(string name,string area); 对应的mapper.xml select * from user_user_t where user_name = #{0} and user_area=#{1} 其中,#{0}代表接收的是dao层中的第一个参数,
第一种方案 dao层的函数方法 public user selectuser(string name,string area); 对应的mapper.xml select * from user_user_t where user_name = #{0} and user_area=#{1} 其中,#{0}代表接收的是dao层中的第一个参数,
推荐阅读
