feat:
1. notice module
This commit is contained in:
@@ -1,21 +1,21 @@
|
|||||||
DROP TABLE IF EXISTS user_notice;
|
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-是
|
||||||
title VARCHAR(100) NULL, -- 标题
|
title VARCHAR(100) NULL, -- 标题
|
||||||
content TEXT NULL, -- 内容
|
content TEXT NULL, -- 内容
|
||||||
remarks varchar(200) NULL, -- 备注
|
remarks varchar(200) NULL, -- 备注
|
||||||
create_user int8 NULL, -- 创建人
|
create_user int8 NULL, -- 创建人
|
||||||
create_dept int8 NULL, -- 创建部门
|
create_dept int8 NULL, -- 创建部门
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
create_time timestamp(6) NULL, -- 创建时间
|
||||||
update_user int8 NULL, -- 修改人
|
update_user int8 NULL, -- 修改人
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
update_time timestamp(6) NULL, -- 修改时间
|
||||||
status int4 NULL, -- 状态
|
status int4 NULL, -- 状态
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
||||||
);
|
);
|
||||||
|
|
||||||
COMMENT ON TABLE user_notice IS '用户通知';
|
COMMENT ON TABLE user_notice IS '用户通知';
|
||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user