MuteChatroomsController.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package com.ym.controller;
  2. import com.ym.service.UserService;
  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("/muteChatrooms")
  14. public class MuteChatroomsController {
  15. @Autowired
  16. UserService userService;
  17. @RequestMapping(value = "/add", method = RequestMethod.POST)
  18. public Object add(@RequestBody ChatroomModel chatroomModel) throws Exception {
  19. return userService.muteChatroomsAdd(chatroomModel);
  20. }
  21. @RequestMapping(value = "/remove", method = RequestMethod.POST)
  22. public Object remove(@RequestBody ChatroomModel chatroomModel) throws Exception {
  23. return userService.muteChatroomsRemove(chatroomModel);
  24. }
  25. @RequestMapping(value = "/getList", method = RequestMethod.POST)
  26. public Object getList() throws Exception {
  27. return userService.muteChatroomsGetList();
  28. }
  29. }