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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user