Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangkb
indicators
Commits
b4ff3c79
Commit
b4ff3c79
authored
Sep 22, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加未读消息过滤
parent
e2a20241
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
NoticeInfoCtrl.java
...om/keymobile/indicators/api/hytobacco/NoticeInfoCtrl.java
+3
-2
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/NoticeInfoCtrl.java
View file @
b4ff3c79
...
...
@@ -28,15 +28,16 @@ public class NoticeInfoCtrl {
@ApiOperation
(
"根据条件搜索我的通知信息"
)
@GetMapping
(
"find"
)
public
Page
<
NoticeInfo
>
find
(
@ApiParam
(
"关键字搜索(标题)"
)
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@ApiParam
(
"是否已读"
)
@RequestParam
(
value
=
"isRead"
,
required
=
false
)
Boolean
isRead
,
@ApiParam
(
"页码,从1开始"
)
@RequestParam
(
"pageNo"
)
int
pageNo
,
@ApiParam
(
"每页条数"
)
@RequestParam
(
"pageSize"
)
int
pageSize
)
{
PageRequest
request
=
PageRequest
.
of
(
pageNo
-
1
,
pageSize
);
List
<
NoticeInfo
>
list
=
new
ArrayList
<>();
// String currentUserId = SystemUserUtil.getCurrentUserId();
// System.out.println(currentUserId);
long
total
=
noticeInfoService
.
findByPageCount
(
keyword
,
null
,
SystemUserUtil
.
getCurrentUserId
());
long
total
=
noticeInfoService
.
findByPageCount
(
keyword
,
isRead
,
SystemUserUtil
.
getCurrentUserId
());
if
(
total
>
0
)
{
list
=
noticeInfoService
.
findByPage
(
keyword
,
null
,
SystemUserUtil
.
getCurrentUserId
(),
request
.
getOffset
(),
pageSize
);
list
=
noticeInfoService
.
findByPage
(
keyword
,
isRead
,
SystemUserUtil
.
getCurrentUserId
(),
request
.
getOffset
(),
pageSize
);
}
return
new
PageImpl
<>(
list
,
request
,
total
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment