@Select("<script>" +
"select \n" +
"email \n" +
"from sys_user\n" +
"where id in \n" +
" <foreach item='item' index='index' collection='ids' open='(' separator=',' close=')'>" +
" #{item}" +
" </foreach>" +
"</script>"
)
List<String> listEmailByIdBatch(@Param("ids") List<String> ids);
比葫芦画瓢就成,注意ids的集合为String类型。