Dao:
List<QuestionOrderExportVo> quertExportByIds(Integer[] ids);
------------------------------------------------------------------------------
Mapper.xml:
<select id="quertExportByIds" resultMap="questionOrderExportVo">
select DISTINCT
<include refid="ExportCloumn"/>
from v_order_question
<where>
<if test="array!=null and array.length > 0">
id in
<foreach collection="array" item="id" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</where>
</select>
1.要么if的test属性和foreach的collection属性写dao方法的参数类型(如:list,array,map)
2.要么在dao方法的参数前加@Param注解,然后if的test属性和foreach的collection属性写@Param里面的值
3.不然,你就跳坑了