🎨 我的草稿功能完善

This commit is contained in:
x ronger 2020-03-24 01:07:05 +08:00
parent 33d7856bd5
commit 4cd5f99898

View File

@ -31,11 +31,9 @@ public class ArticleController {
@Resource
private CommentService commentService;
@GetMapping("/detail/{id}")
public GlobalResult<Map<String, Object>> detail(@PathVariable Integer id){
ArticleDTO articleDTO = articleService.findArticleDTOById(id,2);
public GlobalResult<Map<String, Object>> detail(@PathVariable Integer id, @RequestParam(defaultValue = "2") Integer type){
ArticleDTO articleDTO = articleService.findArticleDTOById(id,type);
Map map = new HashMap<>(1);
map.put("article", articleDTO);
return GlobalResultGenerator.genSuccessResult(map);