diff --git a/db/mysql/module/fast-boot-message.sql b/db/mysql/module/fast-boot-message.sql index cafbef8..5a63fed 100644 --- a/db/mysql/module/fast-boot-message.sql +++ b/db/mysql/module/fast-boot-message.sql @@ -1,22 +1,29 @@ -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '短信服务', 'message/sms/index', NULL, 0, 0, 'icon-reloadtime', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (33, '消息管理', '', '', 0, 0, 'icon-message', 2, 0, 0, 10000, now(), 10000, now()); -SET @menuId = @@identity; -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '查看', '', 'schedule:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '新增', '', 'schedule:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '修改', '', 'schedule:update,schedule:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '删除', '', 'schedule:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '立即运行', '', 'schedule:run', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '日志', '', 'schedule:log', 1, 0, '', 4, 0, 0, 10000, now(), 10000, now()); +set @menuId = @@identity; +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '短信日志', 'message/sms/log/index', 'sms:log', 0, 0, 'icon-detail', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '短信平台', 'message/sms/platform/index', NULL, 0, 0, 'icon-whatsapp', 0, 0, 0, 10000, now(), 10000, now()); +set @menuId = @@identity; +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '查看', '', 'sms:platform:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '新增', '', 'sms:platform:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '修改', '', 'sms:platform:update,sms:platform:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '删除', '', 'sms:platform:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); + + +DROP TABLE IF EXISTS sms_platform; +DROP TABLE IF EXISTS sms_log; CREATE TABLE sms_platform ( id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', platform tinyint COMMENT '平台类型 0:阿里云 1:腾讯云', - sign_name varchar(50) NOT NULL COMMENT '短信签名', - template_id varchar(50) NOT NULL COMMENT '短信模板', - access_key varchar(100) COMMENT '密码', - secret_key varchar(100) COMMENT '密码', + sign_name varchar(100) NOT NULL COMMENT '短信签名', + template_id varchar(100) NOT NULL COMMENT '短信模板', + app_id varchar(100) NOT NULL COMMENT '短信应用的ID,如:腾讯云等', + sender_id varchar(100) NOT NULL COMMENT '腾讯云国际短信、华为云等需要', + access_key varchar(100) COMMENT 'AccessKey', + secret_key varchar(100) COMMENT 'SecretKey', status tinyint COMMENT '状态 0:禁用 1:启用', version int COMMENT '版本号', deleted tinyint COMMENT '删除标识 0:正常 1:已删除', @@ -27,15 +34,15 @@ CREATE TABLE sms_platform primary key (id) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='短信平台'; - CREATE TABLE sms_log ( id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', platform_id bigint COMMENT '平台ID', platform tinyint COMMENT '平台类型', mobile varchar(20) NOT NULL COMMENT '手机号', - status tinyint COMMENT '状态 0:失败 1:成功', params varchar(200) COMMENT '参数', + status tinyint COMMENT '状态 0:失败 1:成功', + error varchar(2000) COMMENT '异常信息', create_time datetime COMMENT '创建时间', primary key (id) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='短信日志'; \ No newline at end of file