获取文章详情2024-4-2
所花时间(包括上课): | 0.5 h左右 |
代码量(行): | 20 左右 |
搏客量(篇): | 1 |
了解到的知识点: | |
备注(其他): |
//controller
@GetMapping("/detail")
public Result detail(Integer id){
Article a = articleService.detail(id);
return Result.success(a);
}
//service
Article detail(Integer id);
//serviceImpl
@Override
public Article detail(Integer id) {
Article a = articleMapper.detail(id);
return a;
}
//mapper
@Select("select * from article where id = #{id}")
Article detail(Integer id);