2021
10-20
10-20
Mybatis用注解写in查询的实现
Mybatis注解写in查询@Select("<script>"+"SELECT*FROMtableWHEREOrderNoIN"+"<foreachitem='item'index='index'collection='list'open='('separator=','close=')'>"+"#{item}"+"</foreach>"+"</script>")List<Map<String,Object>>selectdemo(@Param("list")List<String>list);这里foreach里面的collection值写@Param值。Mybatis中IN语句查询、Mybatis中的forea...
继续阅读 >