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