[add] 消息通知
This commit is contained in:
@ -1914,3 +1914,83 @@ values(1951230902137835526, '物资-材料设备删除', 1951230902137835522, '4
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1951230902137835527, '物资-材料设备导出', 1951230902137835522, '5', '#', '', 1, 0, 'F', '0', '0', 'cailiaoshebei:cailiaoshebei:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577325643083777, '消息通知', '1952576561528975362', '1', 'notification', 'message/notification/index', 1, 0, 'C', '0', '0', 'message:notification:list', '#', 103, 1, sysdate(), null, null, '消息通知菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577325643083778, '消息通知查询', 1952577325643083777, '1', '#', '', 1, 0, 'F', '0', '0', 'message:notification:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577325643083779, '消息通知新增', 1952577325643083777, '2', '#', '', 1, 0, 'F', '0', '0', 'message:notification:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577325643083780, '消息通知修改', 1952577325643083777, '3', '#', '', 1, 0, 'F', '0', '0', 'message:notification:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577325643083781, '消息通知删除', 1952577325643083777, '4', '#', '', 1, 0, 'F', '0', '0', 'message:notification:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577325643083782, '消息通知导出', 1952577325643083777, '5', '#', '', 1, 0, 'F', '0', '0', 'message:notification:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327337582594, '通知人员配置', '1952576561528975362', '1', 'notifyTarget', 'message/notifyTarget/index', 1, 0, 'C', '0', '0', 'message:notifyTarget:list', '#', 103, 1, sysdate(), null, null, '通知人员配置菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327337582595, '通知人员配置查询', 1952577327337582594, '1', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTarget:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327337582596, '通知人员配置新增', 1952577327337582594, '2', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTarget:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327337582597, '通知人员配置修改', 1952577327337582594, '3', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTarget:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327337582598, '通知人员配置删除', 1952577327337582594, '4', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTarget:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327337582599, '通知人员配置导出', 1952577327337582594, '5', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTarget:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327597629441, '消息类型配置', '1952576561528975362', '1', 'typeConfig', 'message/typeConfig/index', 1, 0, 'C', '0', '0', 'message:typeConfig:list', '#', 103, 1, sysdate(), null, null, '消息类型配置菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327597629442, '消息类型配置查询', 1952577327597629441, '1', '#', '', 1, 0, 'F', '0', '0', 'message:typeConfig:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327597629443, '消息类型配置新增', 1952577327597629441, '2', '#', '', 1, 0, 'F', '0', '0', 'message:typeConfig:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327597629444, '消息类型配置修改', 1952577327597629441, '3', '#', '', 1, 0, 'F', '0', '0', 'message:typeConfig:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327597629445, '消息类型配置删除', 1952577327597629441, '4', '#', '', 1, 0, 'F', '0', '0', 'message:typeConfig:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952577327597629446, '消息类型配置导出', 1952577327597629441, '5', '#', '', 1, 0, 'F', '0', '0', 'message:typeConfig:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952650149079576578, '通知人员配置详情', '1952577327337582594', '1', 'notifyTargetDetail', 'message/notifyTargetDetail/index', 1, 0, 'C', '0', '0', 'message:notifyTargetDetail:list', '#', 103, 1, sysdate(), null, null, '通知人员配置详情菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952650149079576579, '通知人员配置详情查询', 1952650149079576578, '1', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTargetDetail:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952650149079576580, '通知人员配置详情新增', 1952650149079576578, '2', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTargetDetail:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952650149079576581, '通知人员配置详情修改', 1952650149079576578, '3', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTargetDetail:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952650149079576582, '通知人员配置详情删除', 1952650149079576578, '4', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTargetDetail:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1952650149079576583, '通知人员配置详情导出', 1952650149079576578, '5', '#', '', 1, 0, 'F', '0', '0', 'message:notifyTargetDetail:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
@ -1718,3 +1718,76 @@ create table pgs_construction_schedule_plan
|
||||
primary key (`id`) using btree,
|
||||
index `idx_project_id` (`project_id` asc) using btree comment '项目ID'
|
||||
) comment '施工进度计划' collate = utf8mb4_unicode_ci;
|
||||
|
||||
drop table if exists msg_type_config;
|
||||
create table msg_type_config
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键ID',
|
||||
`project_id` bigint default 0 not null comment '项目ID',
|
||||
`parent_id` bigint default 0 not null comment '父ID',
|
||||
`type_code` varchar(64) not null comment '消息类型编码',
|
||||
`type_name` varchar(128) not null comment '消息类型名称',
|
||||
`type_desc` varchar(512) null comment '消息类型描述',
|
||||
`status` char(1) default '0' null comment '是否启用(0正常 1禁用)',
|
||||
`remark` varchar(255) null comment '备注',
|
||||
`create_by` bigint null comment '创建者',
|
||||
`update_by` bigint null comment '更新者',
|
||||
`create_dept` bigint null comment '创建部门',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
primary key (`id`) using btree,
|
||||
index `idx_project_id` (`project_id` asc) using btree comment '项目ID'
|
||||
) comment '消息类型配置' collate = utf8mb4_unicode_ci;
|
||||
|
||||
drop table if exists msg_notify_target;
|
||||
create table msg_notify_target
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键ID',
|
||||
`project_id` bigint default 0 not null comment '项目ID',
|
||||
`type_id` bigint not null comment '消息类型ID',
|
||||
`status` char(1) default '0' null comment '是否启用(0正常 1禁用)',
|
||||
`remark` varchar(255) null comment '备注',
|
||||
`create_by` bigint null comment '创建者',
|
||||
`update_by` bigint null comment '更新者',
|
||||
`create_dept` bigint null comment '创建部门',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
primary key (`id`) using btree,
|
||||
index `idx_project_id` (`project_id` asc) using btree comment '项目ID',
|
||||
index `idx_type_id` (`type_id` asc) using btree comment '消息类型ID'
|
||||
) comment '通知人员配置' collate = utf8mb4_unicode_ci;
|
||||
|
||||
drop table if exists msg_notification;
|
||||
create table msg_notification
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键ID',
|
||||
`project_id` bigint default 0 not null comment '项目ID',
|
||||
`recipient_id` bigint not null comment '接收通知的用户ID',
|
||||
`sender_id` bigint default 0 not null comment '发送通知的用户ID(系统通知 0)',
|
||||
`type_id` bigint not null comment '通知类型ID',
|
||||
`title` varchar(255) default '' not null comment '通知标题',
|
||||
`content` text not null comment '通知的主要内容',
|
||||
`view_status` char(1) default '0' not null comment '查看状态(0未读 1已读)',
|
||||
`view_time` datetime null comment '查看时间',
|
||||
`action_url` varchar(1024) default '' not null comment '点击通知后跳转的目标URL',
|
||||
`file` varchar(1024) null comment '通知附件',
|
||||
`remark` varchar(255) null comment '备注',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
primary key (`id`) using btree,
|
||||
index `idx_project_id` (`project_id` asc) using btree comment '项目ID',
|
||||
index `idx_type_id` (`type_id` asc) using btree comment '消息类型ID',
|
||||
index `idx_sender_id` (`sender_id` asc) using btree comment '发送通知的用户ID',
|
||||
index `idx_recipient_view` (`recipient_id` asc, `view_status` asc) comment '接收通知的用户ID,查看状态'
|
||||
) comment '消息通知' collate = utf8mb4_unicode_ci;
|
||||
|
||||
drop table if exists msg_notify_target_detail;
|
||||
create table msg_notify_target_detail
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键ID',
|
||||
`config_id` bigint not null comment '消息类型配置ID',
|
||||
`target_type` char(1) not null comment '接收类型',
|
||||
`target_id` bigint not null comment '接收ID',
|
||||
primary key (`id`) using btree,
|
||||
unique index `un_idx_config_target` (`config_id`, `target_type`, `target_id`)
|
||||
) comment '通知人员配置详情' collate = utf8mb4_unicode_ci;
|
||||
|
||||
Reference in New Issue
Block a user