|
@@ -7,16 +7,15 @@ import org.fouram.dto.input.MessageUserQueryListDTO;
|
|
|
import org.fouram.dto.input.MessageUserSaveDTO;
|
|
|
import org.fouram.service.SapMessageUserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
-@Controller
|
|
|
+@RestController
|
|
|
@Api(value = "消息用户相关接口")
|
|
|
@RequestMapping(value = "/messageUser")
|
|
|
public class MessageUserController extends BaseController {
|
|
@@ -25,22 +24,19 @@ public class MessageUserController extends BaseController {
|
|
|
private SapMessageUserService service;
|
|
|
|
|
|
@ApiOperation(value = "查询发送消息用户列表")
|
|
|
- @PostMapping(value = "/selectList", produces = "application/json;charset=utf-8")
|
|
|
- @ResponseBody
|
|
|
+ @PostMapping(value = "/selectList")
|
|
|
public Object selectList(@RequestBody MessageUserQueryListDTO dto) throws Exception {
|
|
|
return ResultUtil.success(service.selectList(), "操作成功");
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "新增消息用户")
|
|
|
- @PostMapping(value = "/saveUser", produces = "application/json;charset=utf-8")
|
|
|
- @ResponseBody
|
|
|
+ @PostMapping(value = "/saveUser")
|
|
|
public Object saveUser(@RequestBody MessageUserSaveDTO dto) throws Exception {
|
|
|
return service.saveOne(dto.getUserId());
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除消息用户")
|
|
|
- @PostMapping(value = "/deleteUser", produces = "application/json;charset=utf-8")
|
|
|
- @ResponseBody
|
|
|
+ @PostMapping(value = "/deleteUser")
|
|
|
public Object deleteUser(@RequestBody MessageUserDeleteDTO dto) throws Exception {
|
|
|
service.deleteById(dto.getId());
|
|
|
return ResultUtil.success(null, "操作成功");
|