🎨 我的草稿功能完善
This commit is contained in:
parent
33d7856bd5
commit
4cd5f99898
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user