完成获取消息通知的 list 方法
This commit is contained in:
parent
a3b78f9d96
commit
6e2d9a0079
|
@ -2,6 +2,9 @@ package cn.org.gitlink.notification.model.dao.entity;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -15,14 +18,18 @@ public class SysNotification {
|
|||
|
||||
private String content;
|
||||
|
||||
@JsonProperty("notification_url")
|
||||
private String notificationUrl;
|
||||
|
||||
@JsonProperty("created_at")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:dd:ss")
|
||||
private Date createdAt;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer type;
|
||||
|
||||
@JsonIgnore
|
||||
private Integer isDelete;
|
||||
|
||||
public Integer getId() {
|
||||
|
|
|
@ -17,6 +17,7 @@ public class ReceiverNotificationListVo {
|
|||
@JsonProperty("unread_atme")
|
||||
private Integer unreadAtMeCount;
|
||||
|
||||
@JsonProperty("notification_list")
|
||||
private List<SysNotification> list;
|
||||
|
||||
public ReceiverNotificationListVo() {
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
</select>
|
||||
<select id="getUnreadSysNotificationsList" resultMap="BaseResultMap">
|
||||
select * FROM ${platform}_sys_notification
|
||||
where receiver = #{receiver} AND status = #{status} AND `type` = #{type} AND is_delete = 1
|
||||
where receiver = #{receiver} AND status = #{status} AND `type` = #{type} AND is_delete = -1
|
||||
ORDER BY id DESC limit #{notificationNumber}
|
||||
</select>
|
||||
<select id="getSysNotificationPageList" parameterType="cn.org.gitlink.notification.model.dao.entity.SysNotification" resultMap="BaseResultMap">
|
||||
|
|
Loading…
Reference in New Issue