1. notice module
This commit is contained in:
2026-02-12 15:29:24 +08:00
parent a6782b4fa1
commit 28f13a5db3
2 changed files with 21 additions and 20 deletions

View File

@@ -2,7 +2,7 @@ DROP TABLE IF EXISTS user_notice;
CREATE TABLE user_notice CREATE TABLE user_notice
( (
id int8 NOT NULL PRIMARY KEY, -- 主键 id int8 NOT NULL PRIMARY KEY, -- 主键
user_id int8 NOT NULL, -- 用户id user_id int8 DEFAULT 0 NOT NULL, -- 用户id
notice_type int4 DEFAULT 0 NOT NULL, -- 通知类型 0-系统通知 1-app通知 2-market通知 notice_type int4 DEFAULT 0 NOT NULL, -- 通知类型 0-系统通知 1-app通知 2-market通知
module_type int4 NULL, -- 业务模块 module_type int4 NULL, -- 业务模块
has_read int4 DEFAULT 0 NOT NULL, -- 是否已读 0-否 1-是 has_read int4 DEFAULT 0 NOT NULL, -- 是否已读 0-否 1-是
@@ -42,11 +42,13 @@ CREATE INDEX CONCURRENTLY idx_user_notice_count ON user_notice (user_id, notice_
---- 后台页面菜单 ---- 后台页面菜单
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component,
remark, is_deleted) remark, is_deleted)
VALUES (2020763647899787265, 1123598815738675201, 'userNotice', '用户通知', 'menu', '/common/commonUserNotice', null, 1, 1, VALUES (2020763647899787265, 1123598815738675201, 'userNotice', '用户通知', 'menu', '/common/commonUserNotice', null, 1,
1,
0, 1, null, null, 0); 0, 1, null, null, 0);
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component,
remark, is_deleted) remark, is_deleted)
VALUES (2020763647899787266, 2020763647899787265, 'userNotice_add', '新增', 'add', '/common/commonUserNotice/add', 'plus', VALUES (2020763647899787266, 2020763647899787265, 'userNotice_add', '新增', 'add', '/common/commonUserNotice/add',
'plus',
1, 2, 1, 1, null, null, 0); 1, 2, 1, 1, null, null, 0);
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component,
remark, is_deleted) remark, is_deleted)

View File

@@ -63,11 +63,10 @@ public class CommonUserNoticeServiceImpl extends BaseServiceImpl<CommonUserNotic
return page.setRecords(baseMapper.selectUserNoticePage(page, userNotice)); return page.setRecords(baseMapper.selectUserNoticePage(page, userNotice));
} }
@Transactional(rollbackFor = RuntimeException.class)
@Override @Override
public boolean saveUserNotice(CommonUserNoticeVO userNotice) { public boolean saveUserNotice(CommonUserNoticeVO userNotice) {
Assert.isTrue(userNotice.getNoticeType() != NoticeType.MARKET_USER.getCode() && userNotice.getNoticeType() != NoticeType.APP_USER.getCode(), "无效消息类型");
return Boolean.TRUE; return save(userNotice);
} }
@Override @Override