//用题目的id集合查询所有题目对象
public List<Topic> findByIds(List<Long> topicIdList) {
List<Topic> topicList = new ArrayList<>();
for (Long topicId : topicIdList) {
QueryWrapper qw = new QueryWrapper();
qw.eq("question_id",topicId);
Topic topic = topicMapper.selectById(qw);
topicList.add(topic);
}
return topicList;
}
}
的时候进行转化成实体类中Integer的时候好是不行,我该怎么解决啊?
topicIdList里存放的并不是long类型,是NairTopic,for循环就带用NairTopic来循环 不能用long
你应该用的对象来接你的List啊,怎么用Long