123456789101112131415161718192021222324252627282930313233343536 |
- package com.ym.controller;
- import com.ym.service.ChatroomService;
- import io.rong.models.response.ListWordfilterResult;
- import io.rong.models.response.ResponseResult;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * Created by weiqinxiao on 2019/2/25.
- */
- @RestController
- @RequestMapping("/sensitive")
- public class SensitiveController {
- @Autowired
- ChatroomService chatroomService;
- @RequestMapping(value = "/add", method = RequestMethod.POST)
- public ResponseResult add(@RequestBody String word) throws Exception {
- return chatroomService.sensitiveAdd(word);
- }
- @RequestMapping(value = "/remove", method = RequestMethod.POST)
- public ResponseResult remove(@RequestBody String word) throws Exception {
- return chatroomService.sensitiveRemove(word);
- }
- @RequestMapping(value = "/getList", method = RequestMethod.POST)
- public ListWordfilterResult getList() throws Exception {
- return chatroomService.sensitiveGetList();
- }
- }
|