mybatis中根据多条件list查询
程序员文章站
2024-03-02 09:02:04
...
mapper文件
<select id="selectWhere" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from table
<where>
table.a = a and table.b in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
'${item}'
</foreach>
</where>
</select>
DAO片段
List<T> selectWhere(@Param("list")List<String> list ,@Param("a") String a);
推荐阅读
-
mybatis中根据多条件list查询
-
Mybatis中的Criteria条件查询
-
关于MyBatis 查询数据时属性中多对一的问题(多条数据对应一条数据)
-
Mybatis中的多表查询 —— 多对多
-
mybatis中怎么通过外键查询_Mybatis【8】 Mybatis返回List或者Map以及模糊查询怎么搞?...
-
mybatis中的count()按条件查询方式
-
关于MyBatis 查询数据时属性中多对一的问题(多条数据对应一条数据)
-
Mybatis中的多表连接查询(包括一对一、多对一)
-
MyBatis生成的实体条件,并在页面根据一些字段进行模糊查询
-
不同条件查询-mysql 根据不同的条件查询出想要的结果,以List或Bean等形式返回。在线等,谢谢啦!!