我的站内信根据阅读状态过滤
This commit is contained in:
parent
425f6d30a6
commit
d3acb25a6c
|
@ -75,6 +75,7 @@ public class SysNoticeController {
|
|||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "readStatus", value = "阅读状态 0:未读 1:已读", paramType = "query", dataType = "Integer")
|
||||
})
|
||||
public Result<PageData<SysNoticeDTO>> myNoticePage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
PageData<SysNoticeDTO> page = sysNoticeService.getMyNoticePage(params);
|
||||
|
@ -91,7 +92,7 @@ public class SysNoticeController {
|
|||
}
|
||||
|
||||
@GetMapping("mynotice/unread")
|
||||
@ApiOperation("我的通知未读读")
|
||||
@ApiOperation("我的通知未读数")
|
||||
public Result<Integer> unRead() {
|
||||
int count = sysNoticeUserService.getUnReadNoticeCount(SecurityUser.getUserId());
|
||||
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
<!-- 获取我的通知列表 -->
|
||||
<select id="getMyNoticeList" resultType="io.renren.modules.notice.entity.SysNoticeEntity">
|
||||
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status from sys_notice_user t1, sys_notice t2
|
||||
where t1.notice_id = t2.id and t1.receiver_id = #{receiverId} order by t2.create_date desc
|
||||
where t1.notice_id = t2.id and t1.receiver_id = #{receiverId}
|
||||
<if test="readStatus != null">
|
||||
AND read_status = #{readStatus}
|
||||
</if>
|
||||
order by t2.create_date desc
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue