新增红山平台
This commit is contained in:
parent
d22dd9cc3c
commit
4e11f623b0
|
|
@ -13,10 +13,12 @@ public class NotificationSystemConstant {
|
||||||
//平台编码
|
//平台编码
|
||||||
public static final String PLATFORM_CODE_GITLINK = "gitlink"; //gitlink平台
|
public static final String PLATFORM_CODE_GITLINK = "gitlink"; //gitlink平台
|
||||||
public static final String PLATFORM_CODE_HEHUI = "hehui"; //hehui平台
|
public static final String PLATFORM_CODE_HEHUI = "hehui"; //hehui平台
|
||||||
|
public static final String PLATFORM_CODE_OSREDM = "osredm"; //红山开源平台
|
||||||
public static final Map<String, String> PLATFORM_CODE_MAP = new HashMap<String, String>() {
|
public static final Map<String, String> PLATFORM_CODE_MAP = new HashMap<String, String>() {
|
||||||
{
|
{
|
||||||
put("gitlink", PLATFORM_CODE_GITLINK);
|
put("gitlink", PLATFORM_CODE_GITLINK);
|
||||||
put("hehui", PLATFORM_CODE_HEHUI);
|
put("hehui", PLATFORM_CODE_HEHUI);
|
||||||
|
put("osredm", PLATFORM_CODE_OSREDM);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
USE gitlink_notification;
|
||||||
|
|
||||||
|
-- 2022-02-14 新增红山平台
|
||||||
|
INSERT INTO gns_platform_info(platform_code,platform_name,created_at,is_delete) VALUES('osredm','红山平台',NOW(),-1);
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `osredm_sys_notification`;
|
||||||
|
CREATE TABLE `osredm_sys_notification` (
|
||||||
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
|
`sender` INT(11) NOT NULL COMMENT '发送者id',
|
||||||
|
`receiver` INT(11) NOT NULL COMMENT '接受者id',
|
||||||
|
`content` TEXT NOT NULL COMMENT '消息内容:富文本',
|
||||||
|
`notification_url` VARCHAR(2000) DEFAULT NULL COMMENT '消息跳转链接',
|
||||||
|
`created_at` DATETIME NOT NULL DEFAULT NOW() COMMENT '创建时间',
|
||||||
|
`status` TINYINT(4) NOT NULL DEFAULT 1 COMMENT '已读状态: 1未读,2已读',
|
||||||
|
`is_delete` TINYINT(1) NOT NULL DEFAULT '-1' COMMENT '是否删除: -1未删除,1已删除',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `index_on_receiver_and_status` (`receiver`,`status`),
|
||||||
|
KEY `index_on_status` (`status`)
|
||||||
|
) ENGINE=INNODB DEFAULT CHARSET=utf8mb3;
|
||||||
|
|
||||||
|
-- 2021-09-10 区分系统消息类型
|
||||||
|
ALTER TABLE osredm_sys_notification ADD COLUMN (`type` TINYINT(4) NOT NULL DEFAULT 1 COMMENT '消息类型: 1系统消息,2@我');
|
||||||
|
|
||||||
|
-- 2021-09-10 新增 source 字段区分消息来源、新增 extra 字段保存额外信息
|
||||||
|
ALTER TABLE osredm_sys_notification ADD source varchar(250) NULL COMMENT '消息来源';
|
||||||
|
ALTER TABLE osredm_sys_notification ADD extra TEXT NULL COMMENT '额外信息(备用字段)';
|
||||||
|
|
@ -16,6 +16,7 @@ services:
|
||||||
- ${SQL_SCRIPT_PATH}/gns-notification.sql:/docker-entrypoint-initdb.d/0001.sql
|
- ${SQL_SCRIPT_PATH}/gns-notification.sql:/docker-entrypoint-initdb.d/0001.sql
|
||||||
- ${SQL_SCRIPT_PATH}/hehui-gns-notification.sql:/docker-entrypoint-initdb.d/0002.sql
|
- ${SQL_SCRIPT_PATH}/hehui-gns-notification.sql:/docker-entrypoint-initdb.d/0002.sql
|
||||||
- ${SQL_SCRIPT_PATH}/gns-email.sql:/docker-entrypoint-initdb.d/0003.sql
|
- ${SQL_SCRIPT_PATH}/gns-email.sql:/docker-entrypoint-initdb.d/0003.sql
|
||||||
|
- ${SQL_SCRIPT_PATH}/osredm-gns-notification.sql:/docker-entrypoint-initdb.d/0004.sql
|
||||||
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||||||
ports:
|
ports:
|
||||||
- ${MYSQL_LOCAL_PORT}:3306
|
- ${MYSQL_LOCAL_PORT}:3306
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue