123456789101112131415161718192021222324252627282930 |
- 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<CommentsResponse> getComments(@RequestBody CommentInquiry inquiry) {
- return service.getComments(inquiry);
- }
- @GetMapping("/updateCommentStatus")
- public ResultVo<String> updateCommentStatus(@RequestParam("id") int id,
- @RequestParam("deleted") int deleted) {
- return service.updateCommentStatus(id, deleted);
- }
- }
|