KeepAliveController.java 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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("/keepAlive")
  15. public class KeepAliveController extends BaseController {
  16. @Autowired
  17. ChatroomService chatroomService;
  18. @RequestMapping(value = "/add", method = RequestMethod.POST)
  19. public Object add(@RequestBody ChatroomModel chatroomModel) throws Exception {
  20. return succeed(chatroomService.keepAliveAdd(chatroomModel));
  21. }
  22. @RequestMapping(value = "/remove", method = RequestMethod.POST)
  23. public Object remove(@RequestBody ChatroomModel chatroomModel) throws Exception {
  24. return succeed(chatroomService.keepAliveRemove(chatroomModel));
  25. }
  26. @RequestMapping(value = "/getList", method = RequestMethod.POST)
  27. public Object getList() throws Exception {
  28. return succeed(chatroomService.keepAliveGetList());
  29. }
  30. }