CollectionsController.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package thyyxxk.wxservice_server.controller;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.web.bind.annotation.*;
  4. import thyyxxk.wxservice_server.entity.ResultVo;
  5. import thyyxxk.wxservice_server.entity.appointment.DoctorInfo;
  6. import thyyxxk.wxservice_server.entity.collections.CollectDoctorParam;
  7. import thyyxxk.wxservice_server.service.CollectionsService;
  8. import thyyxxk.wxservice_server.utils.TokenUtil;
  9. import java.util.List;
  10. /**
  11. * @author dj
  12. */
  13. @RestController
  14. @RequestMapping("/collections")
  15. public class CollectionsController {
  16. private final CollectionsService service;
  17. @Autowired
  18. public CollectionsController(CollectionsService service) {
  19. this.service = service;
  20. }
  21. @PostMapping("/collectDoctor")
  22. public ResultVo<String> collectDoctor(@RequestBody CollectDoctorParam param) {
  23. return service.collectDoctor(param);
  24. }
  25. @PostMapping("/disCollectDoctor")
  26. public ResultVo<String> disCollectDoctor(@RequestBody CollectDoctorParam param) {
  27. return service.disCollectDoctor(param);
  28. }
  29. @GetMapping("/getMyCollections")
  30. public ResultVo<List<DoctorInfo>> getMyCollections() {
  31. return service.getMyCollections();
  32. }
  33. }