فهرست منبع

update msgType list and update interface

陈文强 2 سال پیش
والد
کامیت
f8b3eabbac
5فایلهای تغییر یافته به همراه50 افزوده شده و 43 حذف شده
  1. 0 8
      doc/sql/alter.sql
  2. 0 6
      doc/sql/insert.sql
  3. 14 16
      doc/sql/message.sql
  4. 0 13
      doc/sql/msg_push.sql
  5. 36 0
      doc/sql/msg_type.sql

+ 0 - 8
doc/sql/alter.sql

@@ -1,8 +0,0 @@
--- alter table msg_type 
--- modify column `remind_type_id` int(11) unsigned not null default '0' FIRST remind_type;
--- modify column `remind_type_id` int(11)  FIRST remind_type
--- drop index u_msg_type on message_type
-
-alter table message
--- add push_count int(11) unsigned not null default '0' AFTER `status`;
-add remind_type_id int(11) unsigned not null default '0' AFTER `status`;

+ 0 - 6
doc/sql/insert.sql

@@ -1,6 +0,0 @@
-insert into message_type
-     (sys_name,type_name,remind_type_id,remind_type,push_date,push_time,interval_time,notice_count,template_id)
-values  
-    ('tmrwatch','合同审批',1,'立即','0','0','2','0','BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo'),
-    ('tmrwatch','客户回访未完成',2,'延时','48','9:30','24',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo'),
-    ('tmrwatch','合同金额超期未收',3,'指定周期','w1,w3,w5','9:30','0',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo')

+ 14 - 16
doc/sql/notice_init.sql → doc/sql/message.sql

@@ -1,20 +1,4 @@
-create database if not exists `notice` default character set utf8 collate utf8_general_ci;
-DROP TABLE IF EXISTS `notice`.`msg_type`;
-create table `notice`.`message_type`(
-    `id` int(11) unsigned not null auto_increment,
-    `sys_name` varchar(64) not null default '',
-    `type_name` varchar(64) not null default '',
-    `remind_type_id` int(11) unsigned not null default 0,
-    `remind_type` varchar(64) not null default '',
-    `push_date` varchar(64) not null default '',
-    `push_time` varchar(64) not null default '' comment '推送时间,different type have different format',
-    `interval_time` int(11) not null default 0 comment '提醒间隔时间,单位hour',
-    `push_limit` int(11) not null default 0 ,
-    `template_id` varchar(64) not null default '',
-    primary key (`id`),
-    UNIQUE key `u_msg_type` (`remind_type`)
 
-)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '消息类型';
 drop table if exists `notice`.`message`;
 create table `notice`.`message`(
     `id` int(11) not null auto_increment,
@@ -34,3 +18,17 @@ create table `notice`.`message`(
 --     phone varchar(64) not null default '',
 --     primary key (`id`)
 -- )ENGINE=InnoDB DEFAULT CHARSET=utf8 comment='用户表';
+
+
+drop table if exists `msg_push`.`message`;
+create table `msg_push`.`message` (
+    `id` int(11) not null auto_increment,
+    `sys_name` varchar(64) not null default '',
+    `remind_type` varchar(64) not null default '',
+    `target` varchar(64) not null default '',
+    `content` text not null ,
+    `status` int(11) not null default 0,
+    `create_at` DATETIME not null default CURRENT_TIMESTAMP,
+    `update_at` DATETIME not null ON UPDATE CURRENT_TIMESTAMP ,
+     primary key(`id`)
+)

+ 0 - 13
doc/sql/msg_push.sql

@@ -1,13 +0,0 @@
-
-drop table if exists `msg_push`.`message`;
-create table `msg_push`.`message` (
-    `id` int(11) not null auto_increment,
-    `sys_name` varchar(64) not null default '',
-    `remind_type` varchar(64) not null default '',
-    `target` varchar(64) not null default '',
-    `content` text not null ,
-    `status` int(11) not null default 0,
-    `create_at` DATETIME not null default CURRENT_TIMESTAMP,
-    `update_at` DATETIME not null ON UPDATE CURRENT_TIMESTAMP ,
-     primary key(`id`)
-)

+ 36 - 0
doc/sql/msg_type.sql

@@ -0,0 +1,36 @@
+-- -- create database if not exists `notice` default character set utf8 collate utf8_general_ci;
+-- DROP TABLE IF EXISTS `notice`.`message_type`;
+-- create table `notice`.`message_type`(
+--     `sys_name` varchar(64) not null default '',
+--     `id` int(11) unsigned not null ,
+--     `pasture_id` int(11) not null default 0,
+--     `type_name` varchar(64) not null default '',
+--     `remind_type_id` int(11) unsigned not null default 0,
+--     `remind_type` varchar(64) not null default '',
+--     `push_date` varchar(64) not null default '',
+--     `push_time` varchar(64) not null default '' comment '推送时间,different type have different format',
+--     `interval_time` int(11) not null default 0 comment '提醒间隔时间,单位hour',
+--     `push_limit` int(11) not null default 0 ,
+--     `template_id` varchar(64) not null default '',
+--     `roles_id` varchar(64) not null default '',
+--     `users_id` varchar(64) not null default '',
+--     primary key(`id`,`sys_name`,`pasture_id`),
+--     index `u_msg_type` (`remind_type`)
+-- )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '消息类型';
+-- alter table msg_type 
+-- modify column `remind_type_id` int(11) unsigned not null default '0' FIRST remind_type;
+-- modify column `remind_type_id` int(11)  FIRST remind_type
+-- drop index u_msg_type on message_type
+
+-- alter table message
+-- -- add push_count int(11) unsigned not null default '0' AFTER `status`;
+-- add remind_type_id int(11) unsigned not null default '0' AFTER `status`;
+
+insert into message_type
+(sys_name,id,pasture_id,type_name,remind_type_id,remind_type,push_date,push_time,interval_time,push_limit,template_id,roles_id,users_id)
+values  
+    -- ('tmrwatch',1,1,'合同金额超期未收',3,'指定周期','w1,w3,w5','9:30','0',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo','1,2,3','1,2,3'),
+    ('tmrwatch',2,3,'合同金额超期未收',3,'指定周期','w1,w3,w5','9:30','0',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo','1,2,3','1,2,3'),
+    ('tmrwatch',1,3,'合同金额超期未收',3,'指定周期','w1,w3,w5','9:30','0',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo','1,2,3','1,2,3');
+    -- ('tmrwatch','合同审批',1,'立即','0','0','2','0','BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo'),
+    -- ('tmrwatch','客户回访未完成',2,'延时','48','9:30','24',3,'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo'),