🎨 我的草稿功能完善

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