|
|
|
|
@ -10,7 +10,6 @@ import org.springblade.modules.business.pojo.vo.MessageVO; |
|
|
|
|
import org.springblade.modules.business.service.IMessageService; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import javax.swing.plaf.SeparatorUI; |
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
@ -33,18 +32,18 @@ public class MessageController extends BladeController { |
|
|
|
|
* @param status |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/list") |
|
|
|
|
@GetMapping("/list") |
|
|
|
|
@Operation(summary = "消息列表获取", description = "消息列表获取") |
|
|
|
|
public R getMessageList(Integer current, Integer size, LocalDateTime start, LocalDateTime end, Integer status) { |
|
|
|
|
List<MessageVO> messageList = messageService.getMessageList(current, size, start, end, status); |
|
|
|
|
return R.data(messageList); |
|
|
|
|
return R.data(messageService.getMessageList(current, size, start, end, status)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取消息总数接口 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/total") |
|
|
|
|
@GetMapping("/total") |
|
|
|
|
@Operation(summary = "获取消息总数", description = "获取消息总数") |
|
|
|
|
public R getMessageTotal() { |
|
|
|
|
Long messageTotal = messageService.getMessageTotal(); |
|
|
|
|
@ -53,11 +52,12 @@ public class MessageController extends BladeController { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 更新已读接口 |
|
|
|
|
* |
|
|
|
|
* @param id |
|
|
|
|
* @param status |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/updateStatus") |
|
|
|
|
@PutMapping("/updateStatus") |
|
|
|
|
@Operation(summary = "更新已读", description = "更新已读") |
|
|
|
|
public void updateMessageStatus(Integer id, Integer status) { |
|
|
|
|
messageService.updateMessageStatus(id, status); |
|
|
|
|
@ -66,7 +66,7 @@ public class MessageController extends BladeController { |
|
|
|
|
/** |
|
|
|
|
* 一键已读全部接口 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/updateStatusAll") |
|
|
|
|
@PutMapping("/updateStatusAll") |
|
|
|
|
@Operation(summary = "一键全部已读", description = "一键全部已读") |
|
|
|
|
public void updateMessageStatusAll() { |
|
|
|
|
messageService.updateMessageStatusAll(); |
|
|
|
|
|