|
@@ -6,10 +6,7 @@ import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@Api(tags = "消息管理")
|
|
@Api(tags = "消息管理")
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -40,4 +37,21 @@ public class MessageController {
|
|
@RequestParam(name = "end_time",defaultValue = "") String end_time) {
|
|
@RequestParam(name = "end_time",defaultValue = "") String end_time) {
|
|
return messageService.search(name,type,start_time,end_time);
|
|
return messageService.search(name,type,start_time,end_time);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation("获取消息详情")
|
|
|
|
+ @GetMapping(value = "/message")
|
|
|
|
+ public ReturnMsg message(@RequestParam(name = "id",required = true) Integer id) {
|
|
|
|
+ return messageService.getMessage(id);
|
|
|
|
+ }
|
|
|
|
+ @ApiOperation("删除消息")
|
|
|
|
+ @DeleteMapping(value = "/message")
|
|
|
|
+ public ReturnMsg delMessage(@RequestParam(name = "message_id",required = true) Integer message_id) {
|
|
|
|
+ return messageService.delMessage(message_id);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("修改消息")
|
|
|
|
+ @PutMapping(value = "/message")
|
|
|
|
+ public ReturnMsg editMessage(@RequestParam(name = "message_id",required = true) Integer message_id) {
|
|
|
|
+ return messageService.delMessage(message_id);
|
|
|
|
+ }
|
|
}
|
|
}
|