//Mapper类
List<Tag> findTagsByTagIds(List<Long> hotTagIds);
<select id="findTagsByTagIds" parameterType="list" resultType="com.yxc.dao.pojo.Tag">
<!-- 注意数据库的属性和实体类属性名称是否一致
不一样就采用别名的形式-->
select id,tag_name as tagName from ms_tag
<where>
id in <!-- 这边的collection要跟类中参数名称一致 -->
<foreach collection="hotTagIds" item="tagId" separator="," open="(" close=")">
#{tagId}
</foreach>
</where>
</select>
一开始colleation写成了tagIds
所以就一直报找不到tagIds这个参数的异常