这是哪里出现了错误
@GetMapping("/illustration/{id}")
public ModelAndView showIllustration(@PathVariable("id") Long id) {
Illustration illustration = illustrationService.selectIllustration(id);
List<Evaluation> evaluationList = evaluationService.selectByIllustrationId(id);
ModelAndView mav = new ModelAndView("/illustration");
mav.addObject("illustration", illustration);
mav.addObject("evaluationList", evaluationList);
return mav;
}
@Override
@Transactional(propagation = Propagation.NOT_SUPPORTED,readOnly = true)
public Illustration selectIllustration(Long illustrationId) {
Illustration illustration = illustrationMapper.selectById(illustrationId);
return illustration;
}
@Override
public List<Evaluation> selectByIllustrationId(Long illustrationId) {
Illustration illustration = illustrationMapper.selectById(illustrationId);
QueryWrapper<Evaluation> queryWrapper = new QueryWrapper<Evaluation>();
queryWrapper.eq("illustration_id", illustrationId);
queryWrapper.orderByDesc("create_time");
List<Evaluation> evaluationList = evaluationMapper.selectList(queryWrapper);
for (Evaluation eva : evaluationList) {
User user = userMapper.selectById(eva.getUserId());
eva.setUser(user);
eva.setIllustration(illustration);
}
return evaluationList;
}
19
收起
正在回答 回答被采纳积分+1
1回答
java工程师2020版
- 参与学习 人
- 提交作业 9393 份
- 解答问题 16556 个
综合就业常年第一,编程排行常年霸榜,无需脱产即可学习,北上广深月薪过万 无论你是未就业的学生还是想转行的在职人员,不需要基础,只要你有梦想,想高薪
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星