1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-06 07:21:24 +08:00

AlRead and ToRead function have been compeled,another add rightClick menu

This commit is contained in:
cccccyb
2023-05-19 03:14:32 +08:00
parent f7c9e71fe3
commit d1c3389efa
20 changed files with 358 additions and 250 deletions

View File

@@ -1,5 +1,6 @@
package com.cfive.pinnacle.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.cfive.pinnacle.entity.Notice;
import com.cfive.pinnacle.entity.NoticeReceive;
import com.cfive.pinnacle.mapper.NoticeReceiveMapper;
@@ -28,4 +29,12 @@ public class NoticeReceiveServiceImpl extends ServiceImpl<NoticeReceiveMapper, N
Long userId = WebUtil.getLoginUser().getUser().getId();
return noticeReceiveMapper.selectByUserId(userId,readStatus);
}
@Override
public Boolean modifyNoticeIsRead(Long noticeId,Integer readStatus) {
LambdaUpdateWrapper<NoticeReceive> luw = new LambdaUpdateWrapper<>();
Long userId = WebUtil.getLoginUser().getUser().getId();
luw.eq(NoticeReceive::getNoticeId, noticeId).eq(NoticeReceive::getUserId, userId).set(null!=readStatus,NoticeReceive::getAlreadyRead, readStatus);
return noticeReceiveMapper.update(null,luw)>0;
}
}