feat:更新点赞评论功能
This commit is contained in:
@@ -91,6 +91,25 @@ public class FoodController {
|
||||
return foodService.queryRecord(startDate, endDate);
|
||||
}
|
||||
|
||||
@Operation(summary = "新增评论")
|
||||
@PostMapping("/recipe/{id}/comment")
|
||||
public Boolean addComment(@PathVariable("id") long id,
|
||||
@RequestParam String content) {
|
||||
return foodService.addComment(id, content);
|
||||
}
|
||||
|
||||
@Operation(summary = "增加点赞")
|
||||
@PostMapping("/recipe/{id}/like")
|
||||
public Boolean addLike(@PathVariable("id") long id) {
|
||||
return foodService.addLike(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "取消点赞")
|
||||
@DeleteMapping("/recipe/{id}/like")
|
||||
public Boolean deleteLike(@PathVariable("id") long id) {
|
||||
return foodService.deleteLike(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询美食类别")
|
||||
@GetMapping("/category")
|
||||
public List<String> queryCategory() {
|
||||
|
||||
Reference in New Issue
Block a user