feat(notice): 新增公告优先级和未读状态功能,优化公告展示逻辑

This commit is contained in:
2025-12-30 22:49:03 +08:00
parent 76c324b0df
commit 88a4e58130
21 changed files with 1520 additions and 13 deletions

View File

@@ -34,6 +34,12 @@ public class SysNotice extends BaseEntity {
/** 发布状态0未发布 1已发布 */
private String publishStatus;
/** 优先级1高 2中 3低 */
private String priority;
/** 是否已读(前端展示用,不映射到数据库) */
private Boolean isRead;
public Long getNoticeId() {
return noticeId;
}
@@ -85,6 +91,22 @@ public class SysNotice extends BaseEntity {
this.publishStatus = publishStatus;
}
public String getPriority() {
return priority;
}
public void setPriority(String priority) {
this.priority = priority;
}
public Boolean getIsRead() {
return isRead;
}
public void setIsRead(Boolean isRead) {
this.isRead = isRead;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("noticeId", getNoticeId())

View File

@@ -11,6 +11,7 @@
<result property="noticeContent" column="notice_content"/>
<result property="status" column="status"/>
<result property="publishStatus" column="publish_status"/>
<result property="priority" column="priority"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
@@ -25,6 +26,7 @@
convert_from(notice_content, 'UTF8') as notice_content,
status,
publish_status,
priority,
create_by,
create_time,
update_by,
@@ -67,6 +69,7 @@
<if test="noticeType != null and noticeType != '' ">notice_type,</if>
<if test="noticeContent != null and noticeContent != '' ">notice_content,</if>
<if test="status != null and status != '' ">status,</if>
<if test="priority != null and priority != '' ">priority,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
@@ -76,6 +79,7 @@
<if test="noticeType != null and noticeType != ''">#{noticeType},</if>
<if test="noticeContent != null and noticeContent != ''">cast(#{noticeContent} as bytea),</if>
<if test="status != null and status != ''">#{status},</if>
<if test="priority != null and priority != ''">#{priority},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
now()
@@ -90,6 +94,7 @@
<if test="noticeContent != null">notice_content = cast(#{noticeContent} as bytea),</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="publishStatus != null and publishStatus != ''">publish_status = #{publishStatus},</if>
<if test="priority != null and priority != ''">priority = #{priority},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = now()
</set>