Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
aserver
Project
Project
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
15所TongWeb
aserver
Commits
41e597be
Commit
41e597be
authored
Apr 09, 2021
by
刘可心
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标记所有消息为已读
parent
5188c795
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
MessageService.java
...main/java/com/archser/aserver/service/MessageService.java
+4
-5
No files found.
src/main/java/com/archser/aserver/service/MessageService.java
View file @
41e597be
...
...
@@ -184,14 +184,13 @@ public class MessageService {
Integer
userId
=
Db
.
queryInt
(
Db
.
getSql
(
"getUserId"
),
username
);
List
<
Record
>
getUnReadMsg
=
Db
.
find
(
Db
.
getSqlPara
(
"message.getMessageInUnread"
,
Kv
.
by
(
"send_to_id"
,
userId
)));
if
(
getUnReadMsg
.
size
()
==
0
)
{
return
Ret
.
fail
(
"msg"
,
"暂
没有
未读消息"
);
return
Ret
.
fail
(
"msg"
,
"暂
无
未读消息"
);
}
for
(
Record
readMsg
:
getUnReadMsg
)
{
if
(
readMsg
.
getStr
(
"path"
)
==
null
||
""
.
equals
(
readMsg
.
getStr
(
"path"
)))
{
Db
.
update
(
Db
.
getSqlPara
(
"message.markRead"
,
Kv
.
by
(
"id"
,
readMsg
.
getStr
(
"id"
))));
}
//LiuKexin 20210409 标记全部为已读
Db
.
update
(
Db
.
getSqlPara
(
"message.markRead"
,
Kv
.
by
(
"id"
,
readMsg
.
getStr
(
"id"
))));
}
return
Ret
.
ok
(
"msg"
,
"已
将通知性消息全部标记
为已读"
);
return
Ret
.
ok
(
"msg"
,
"已
标记全部消息
为已读"
);
}
catch
(
Exception
e
)
{
return
Ret
.
fail
(
"msg"
,
"批量标为已读失败"
);
}
...
...
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