本来是一个String字符串 “1001,1002,1003” 然后我用split分割逗号 得到了articleIDArray 数组
String[] articleIDArray = zt.getZtContentID().split(",");
public List<Article> getArticleZTbyArticleIDArray(String[] articleIDArray) {
return articleDao.getArticleZTbyArticleIDArray(articleIDArray);
}
我传递的是一个数组 articleIDArray 我参考着网上的写法写的 为什么有错误
<select id="findArticleZTbyArticleIDArray" resultType="article" >
select articleID, articleTitle,date_format(createtime,'%Y-%m-%d %H:%i:%s') as createtime, tag from T_article
where flag='1' and articleID in
<foreach item="articleIDArray" index="index" collection="array"
open="(" separator="," close=")">
#{articleIDArray}
</foreach>
</select>
这是为什么 应该怎样改
RISEBY
拉莫斯之舞