|
@@ -0,0 +1,60 @@
|
|
|
+package com.migao.controller;
|
|
|
+
|
|
|
+import com.migao.config.response.BasePageRequest;
|
|
|
+import com.migao.config.response.PageBeanOne;
|
|
|
+import com.migao.config.response.ResponseBean;
|
|
|
+import com.migao.entity.vo.req.MessageQueryReq;
|
|
|
+import com.migao.entity.vo.res.MessageQueryRes;
|
|
|
+import com.migao.service.MessageService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author dingsong
|
|
|
+ */
|
|
|
+@Api(tags = "009.消息模快")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/Message")
|
|
|
+public class MessageController {
|
|
|
+ @Resource
|
|
|
+ MessageService messageService;
|
|
|
+
|
|
|
+ @ApiOperation("分页查询所有消息")
|
|
|
+ @PostMapping(value = "/pageQuery")
|
|
|
+ public ResponseBean<PageBeanOne<MessageQueryRes>> pageQuery(@RequestBody BasePageRequest basePageRequest) {
|
|
|
+ return messageService.pageQuery(basePageRequest);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("分页查询当前用户消息")
|
|
|
+ @PostMapping(value = "/pageQueryById")
|
|
|
+ public ResponseBean<PageBeanOne<MessageQueryRes>> pageQueryById(@RequestBody BasePageRequest basePageRequest) {
|
|
|
+ return messageService.pageQueryById(basePageRequest);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("通过id查询单个消息")
|
|
|
+ @PostMapping(value = "/pageQueryOne")
|
|
|
+ public ResponseBean<MessageQueryRes> pageQueryOne(@RequestParam String id) {
|
|
|
+ return messageService.pageQueryOne(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("通过id更新读取状态")
|
|
|
+ @PostMapping(value = "/updateById")
|
|
|
+ public ResponseBean<?> updateById(@RequestParam String id) {
|
|
|
+ return messageService.updateById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("分页模糊查询所有数据")
|
|
|
+ @PostMapping(value = "/pageQueryTwo")
|
|
|
+ public ResponseBean<PageBeanOne<MessageQueryRes>> pageQueryTwo(@RequestBody MessageQueryReq messageQueryReq) {
|
|
|
+ return messageService.pageQueryTwo(messageQueryReq);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("分页模糊查询当前用户数据")
|
|
|
+ @PostMapping(value = "/pageQueryTwoById")
|
|
|
+ public ResponseBean<PageBeanOne<MessageQueryRes>> pageQueryTwoById(@RequestBody MessageQueryReq messageQueryReq) {
|
|
|
+ return messageService.pageQueryTwoById(messageQueryReq);
|
|
|
+ }
|
|
|
+}
|