获取文章分类详情(2024-3-22)
| 所花时间(包括上课): | 1 h左右 |
| 代码量(行): | 50 左右 |
| 搏客量(篇): | 1 |
| 了解到的知识点: | getMapping |
| 备注(其他): |
@GetMapping("/detail")
public Result<Category> detail(Integer id){
Category c = categoryService.findById(id);
return Result.success(c);
}
Category findById(Integer id);
@Override
public Category findById(Integer id) {
Category c = categoryMapper.findById(id);
return c;
}
@Select("select * from category where id = #{id}")
Category findById(Integer id);
浙公网安备 33010602011771号