|
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import shop.alien.entity.result.R;
|
|
import shop.alien.entity.result.R;
|
|
|
import shop.alien.entity.store.vo.LifeNoticeVo;
|
|
import shop.alien.entity.store.vo.LifeNoticeVo;
|
|
|
|
|
+import shop.alien.storeplatform.dto.MarkAllNoticesReadDTO;
|
|
|
import shop.alien.storeplatform.service.NoticeService;
|
|
import shop.alien.storeplatform.service.NoticeService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -90,16 +91,12 @@ public class NoticeController {
|
|
|
|
|
|
|
|
@ApiOperation("批量标记通知为已读(一键已读)")
|
|
@ApiOperation("批量标记通知为已读(一键已读)")
|
|
|
@ApiOperationSupport(order = 4)
|
|
@ApiOperationSupport(order = 4)
|
|
|
- @ApiImplicitParams({
|
|
|
|
|
- @ApiImplicitParam(name = "receiverId", value = "接收人ID(商户ID)", dataType = "String", paramType = "query", required = true),
|
|
|
|
|
- @ApiImplicitParam(name = "noticeType", value = "通知类型(0-系统通知和订单提醒之外的类型,1-系统通知,2-订单提醒)。不传则标记所有类型", dataType = "Integer", paramType = "query", required = false)
|
|
|
|
|
- })
|
|
|
|
|
@PostMapping("/markAllNoticesAsRead")
|
|
@PostMapping("/markAllNoticesAsRead")
|
|
|
- public R<Integer> markAllNoticesAsRead(@RequestParam("receiverId") String receiverId,
|
|
|
|
|
- @RequestParam(value = "noticeType", required = false) Integer noticeType) {
|
|
|
|
|
- log.info("NoticeController.markAllNoticesAsRead?receiverId={}, noticeType={}", receiverId, noticeType);
|
|
|
|
|
|
|
+ public R<Integer> markAllNoticesAsRead(@RequestBody MarkAllNoticesReadDTO dto) {
|
|
|
|
|
+ log.info("NoticeController.markAllNoticesAsRead?receiverId={}, noticeType={}",
|
|
|
|
|
+ dto.getReceiverId(), dto.getNoticeType());
|
|
|
try {
|
|
try {
|
|
|
- int result = noticeService.markAllNoticesAsRead(receiverId, noticeType);
|
|
|
|
|
|
|
+ int result = noticeService.markAllNoticesAsRead(dto.getReceiverId(), dto.getNoticeType());
|
|
|
if (result > 0) {
|
|
if (result > 0) {
|
|
|
return R.data(result, "批量标记已读成功,共标记 " + result + " 条通知");
|
|
return R.data(result, "批量标记已读成功,共标记 " + result + " 条通知");
|
|
|
}
|
|
}
|