package thyyxxk.webserver.controller.outpatient.comments; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import thyyxxk.webserver.entity.ResultVo; import thyyxxk.webserver.entity.outpatient.comments.request.CommentInquiry; import thyyxxk.webserver.entity.outpatient.comments.response.CommentsResponse; import thyyxxk.webserver.service.outpatient.comments.CommentsService; @RestController @RequestMapping("/comments") public class CommentsController { private final CommentsService service; @Autowired public CommentsController(CommentsService service) { this.service = service; } @PostMapping("/getComments") public ResultVo getComments(@RequestBody CommentInquiry inquiry) { return service.getComments(inquiry); } @GetMapping("/updateCommentStatus") public ResultVo updateCommentStatus(@RequestParam("id") int id, @RequestParam("deleted") int deleted) { return service.updateCommentStatus(id, deleted); } }