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

add the post of selectLimitByUserId

This commit is contained in:
cccccyb
2023-05-30 23:15:00 +08:00
parent 55126b913f
commit 2f5b1e4fbc
5 changed files with 49 additions and 0 deletions

View File

@@ -156,4 +156,11 @@ public class NoticeController {
return ResponseResult.build(code, msg, noticePageList.getRecords());
}
@GetMapping("/limit")
public ResponseResult<List<Notice>> selectLimitByUserId(){
List<Notice> selectLimitByUserId = noticeReceiveService.selectLimitByUserId();
String msg = (null!=selectLimitByUserId) ? "" : "数据查询失败,请重试!";
return ResponseResult.build((null!=selectLimitByUserId) ? ResponseCode.DATABASE_DELETE_OK : ResponseCode.DATABASE_DELETE_ERROR, msg, selectLimitByUserId);
}
}

View File

@@ -18,5 +18,6 @@ import java.util.List;
@Mapper
public interface NoticeReceiveMapper extends BaseMapper<NoticeReceive> {
List<Notice> selectByUserId(Long userId,Integer readStatus);
List<Notice> selectLimitByUserId(Long userId);
}

View File

@@ -17,5 +17,8 @@ import java.util.List;
public interface INoticeReceiveService extends IService<NoticeReceive> {
List<Notice> selectByUserId(Integer readStatus);
List<Notice> selectLimitByUserId();
Boolean modifyNoticeIsRead(Notice notice);
}

View File

@@ -30,6 +30,12 @@ public class NoticeReceiveServiceImpl extends ServiceImpl<NoticeReceiveMapper, N
return noticeReceiveMapper.selectByUserId(userId,readStatus);
}
@Override
public List<Notice> selectLimitByUserId() {
Long userId = WebUtil.getLoginUser().getUser().getId();
return noticeReceiveMapper.selectLimitByUserId(userId);
}
@Override
public Boolean modifyNoticeIsRead(Notice notice) {
Integer readStatus = null;