doum
2025-12-12 dce1e83ec27a066ebc6c17a4ac6d03c9ad6ff703
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.doumee.api.web;
 
import com.doumee.config.annotation.LoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.Notice;
import com.doumee.dao.web.dto.NoticeCardDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
 
@Api(tags = "消息通知信业务")
@Trace(exclude = true)
@LoginRequired
@RestController
@RequestMapping("/web/notice")
@Slf4j
public class NoticeApi extends ApiController{
 
 
    /**
     * 查询用户通知
     * @param pageWrap
     * @return
     */
    @ApiOperation(value = "查询用户通知", notes = "小程序端")
    @GetMapping("/findNoticeCardDTOPage")
    public ApiResponse<PageData<NoticeCardDTO>> findNoticeCardDTOPage(@RequestBody PageWrap<Notice> pageWrap){
 
        return ApiResponse.success(noticeService.findNoticeCardDTOPage(pageWrap));
    }
 
    /**
     * 用户更新阅读状态
     * @param id
     * @return
     */
    @ApiOperation(value = "用户更新阅读状态", notes = "小程序端")
    @GetMapping("/getMemberDTO")
    public ApiResponse hasRead(@RequestParam Integer id){
        Notice notice = new Notice();
        notice.setId(id);
        notice.setStatus(Constants.ONE);
        noticeService.updateById(notice);
        return ApiResponse.success(null);
    }
 
}