@Select(
"<script>"+
"select a,b from table where c in" +
"<foreach> item =\"one\" index=\"index\" collection=\"list\" open=\"(\" separator=\",\" close=\")\">#{one}
</foreach>"
+"</script>"
)
List<Map<String,Object>> getLsitByList (@Param("list") String[] list);mybatis in 拼接动态sql
原文:https://blog.51cto.com/u_15084467/2721295