1. 报错
@Select("select count(*) from manage_file where del_flag = 0 and file_id in " +
"<foreach item='fileId' index='index' collection='fileIds' open='(' separator=',' close=')'>" +
"#{fileId}" +
"</foreach>"
)
int CountUpdateManageFile(@Param("fileIds") Long[] fileIds);
nested exception is org.apache.ibatis.binding.BindingException: Parameter 'fileId' not found. Available parameters are [fileIds, param1]
2. 使用注解@Param需要加<script></script>
@Select("<script>select count(*) from manage_file where del_flag = 0 and file_id in " +
"<foreach item='fileId' index='index' collection='fileIds' open='(' separator=',' close=')'>" +
"#{fileId}" +
"</foreach>" +
"</script>"
)
int CountUpdateManageFile(@Param("fileIds") Long[] fileIds);