DistributeController.java 1.0 KB

123456789101112131415161718192021222324252627282930
  1. package com.ym.controller;
  2. import com.ym.service.ChatroomService;
  3. import io.rong.models.chatroom.ChatroomModel;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.web.bind.annotation.RequestBody;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestMethod;
  8. import org.springframework.web.bind.annotation.RestController;
  9. /**
  10. * Created by weiqinxiao on 2019/2/25.
  11. */
  12. @RestController
  13. @RequestMapping("/distribute")
  14. public class DistributeController{
  15. @Autowired
  16. ChatroomService chatroomService;
  17. @RequestMapping(value = "/stop", method = RequestMethod.POST)
  18. public Object stop(@RequestBody ChatroomModel chatroomModel) throws Exception {
  19. return chatroomService.distributeStop(chatroomModel);
  20. }
  21. @RequestMapping(value = "/resume", method = RequestMethod.POST)
  22. public Object resume(@RequestBody ChatroomModel chatroomModel) throws Exception {
  23. return chatroomService.distributeResume(chatroomModel);
  24. }
  25. }