废话少说,上代码,接口原来写成了:
List<BugCcDO> getBugCcs(Long[] workIds);
mapper文件配置:
<select id="getBugCcs" resultType="com.changhong.cloud.tmplatform.entity.bug.BugCcDO">
SELECT
<include refid="All_CcLog_Column_Values"/>
FROM
pms_cc_log
WHERE
<if test="workIds != null">
work_id IN
<foreach item="workId" index="index" collection="workIds" open="(" separator="," close=")">
#{workId}
</foreach>
</if>
</select>
然后一直报错:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'workIds' not found. Available parameters are [array]
找到的解决方法是:
修改接口传参为:
List<BugCcDO> getBugCcs(@Param("workIds") Long[] workIds);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)