DistributeController.java 1.1 KB

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