Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
8cd9a3be
Commit
8cd9a3be
authored
Dec 06, 2022
by
limei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息列表全部已读
parent
4d80683a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
MsgNoticeDto.java
...om/yeejoin/amos/boot/module/ugp/api/dto/MsgNoticeDto.java
+4
-0
RectifyMsgController.java
.../boot/module/ugp/biz/controller/RectifyMsgController.java
+30
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/MsgNoticeDto.java
View file @
8cd9a3be
...
@@ -31,6 +31,10 @@ public class MsgNoticeDto {
...
@@ -31,6 +31,10 @@ public class MsgNoticeDto {
*/
*/
private
Long
sequenceNbr
;
private
Long
sequenceNbr
;
/**
* 消息状态
*/
private
String
status
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/RectifyMsgController.java
View file @
8cd9a3be
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.RectifyMsgServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.RectifyMsgServiceImpl
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -128,6 +129,35 @@ public class RectifyMsgController extends BaseController {
...
@@ -128,6 +129,35 @@ public class RectifyMsgController extends BaseController {
Page
page
=
new
Page
(
current
,
size
);
Page
page
=
new
Page
(
current
,
size
);
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
msgNoticeDtoList
.
addAll
(
rectifyMsgServiceImpl
.
msgNotice
(
isRead
));
msgNoticeDtoList
.
addAll
(
rectifyMsgServiceImpl
.
msgNotice
(
isRead
));
if
(
isRead
){
for
(
MsgNoticeDto
msgNoticeDto:
msgNoticeDtoList
){
msgNoticeDto
.
setStatus
(
"已读"
);
}
}
else
{
for
(
MsgNoticeDto
msgNoticeDto:
msgNoticeDtoList
){
msgNoticeDto
.
setStatus
(
"未读"
);
}
}
page
.
setRecords
(
msgNoticeDtoList
);
page
.
setTotal
(
msgNoticeDtoList
.
size
());
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息已读"
,
notes
=
"消息已读"
)
@GetMapping
(
value
=
"/allRead"
)
public
ResponseModel
<
Page
<
MsgNoticeDto
>>
allRead
(
@RequestParam
(
value
=
"isRead"
,
required
=
false
)
Boolean
isRead
,
Long
current
,
Long
size
){
Page
page
=
new
Page
(
current
,
size
);
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
msgNoticeDtoList
.
addAll
(
rectifyMsgServiceImpl
.
msgNotice
(
isRead
));
if
(!
ValidationUtil
.
isEmpty
(
msgNoticeDtoList
))
{
for
(
MsgNoticeDto
msgNoticeDto:
msgNoticeDtoList
){
msgNoticeDto
.
setStatus
(
"已读"
);
}
if
(!
isRead
)
{
isRead
=
true
;
}
}
page
.
setRecords
(
msgNoticeDtoList
);
page
.
setRecords
(
msgNoticeDtoList
);
page
.
setTotal
(
msgNoticeDtoList
.
size
());
page
.
setTotal
(
msgNoticeDtoList
.
size
());
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
...
...
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