SpringBoot+Mybatis中注解 @Select注解使用in进行条件查询
public interface UserDao{
@Select({
"<script>",
"select",
"id, user_name,mobile",
"from sys_user",
"where id in",
"<foreach collection='ids' item='id' open='('separator=',' close=')'>",
"#{id}",
"</foreach>",
"</script>"
})
List<Map> getUserByIds(@Param("ids") String[] ids);
}