派生自 projectDept/qhighschool

EricsHu
2023-04-10 5196a1d1e00ced009a2d4e8ea0aa5f3bb7cefe33
src/main/java/com/qxueyou/scc/stucontroller/StuNoticeController.java
@@ -26,7 +26,7 @@
import java.util.Map;
import java.util.Set;
@Api(tags = "公告接口-学员端")
@Api(tags = "公告接口-学员端")
@RestController
@RequestMapping(value = "/stu/notice")
public class StuNoticeController {
@@ -46,14 +46,14 @@
     * @param classId
     * @return
     */
    @ApiOperation(value = "公告列表", notes = "获取班级列表及班级所在公告列表")
    @ApiOperation(value = "公告列表", notes = "获取班级列表及班级所在公告列表")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "classId", value = "班级id", required = false, paramType="query", dataType = "String")
        @ApiImplicitParam(name = "classId", value = "班级id", required = false, paramType="query", dataType = "String")
    })
    @GetMapping(value = "list")
    public Result list(Integer pageNum, Integer pageSize, String classId) {
        //获取班级列表及班级所在通知列表
        //获取班级列表及班级所在通知列表
        List<String> noticeIds = dao.getClassNotices(StringUtils.isEmpty(classId)?ClientUtils.getClassId():classId);
        List<Notice> notices = noticeService.readByStatus(noticeIds, Notice.STATUS_ISSUED);
@@ -76,15 +76,15 @@
    }
    /**
     * 获取未读消息总数
     * 获取未读消息总数
     *
     * @return
     */
    @ApiOperation(value = "获取未读消息总数")
    @ApiOperation(value = "获取未读消息总数")
    @GetMapping(value = "getCountToView")
    public Result getCountToView() {
        //获取班级列表及班级所在通知列表
        //获取班级列表及班级所在通知列表
        List<ClsClass> clsLst = classService.listMyClass();
        Set<String> noticeIdLst = new HashSet<String>(10);
@@ -102,19 +102,19 @@
    }
    /**
     * 获取通知详情
     * 获取通知详情
     *
     * @param noticeId
     * @return
     */
    @ApiOperation(value = "获取公告详情")
    @ApiOperation(value = "获取公告详情")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "noticeId", value = "公告id", required = true, paramType="query", dataType = "String")
        @ApiImplicitParam(name = "noticeId", value = "公告id", required = true, paramType="query", dataType = "String")
    })
    @GetMapping(value = "detail")
    public Result detail(String noticeId) {
        Notice notice = noticeService.read(noticeId);
        dao.addReadCount(noticeId, ClientUtils.getUserId());//记录学员已读通知的人数;
        dao.addReadCount(noticeId, ClientUtils.getUserId());//记录学员已读通知的人数;
        return new Result(true, "success",
                CollectionUtils.newObjectMap(
                        "noticeName", notice.getTitle(),
@@ -126,9 +126,9 @@
                ));
    }
    @ApiOperation(value = "更新公告查看次数", notes = "")
    @ApiOperation(value = "更新公告查看次数", notes = "")
   @ApiImplicitParams({
         @ApiImplicitParam(name = "noticeId", value = "公告id", required = true, paramType = "query", dataType = "String")
         @ApiImplicitParam(name = "noticeId", value = "公告id", required = true, paramType = "query", dataType = "String")
   })
    @GetMapping(value = "view")
    public Result view(String noticeId) {