CREATE TABLE `sys_config` (
  `id` bigint(20) unsigned NOT NULL,
  `config_item_key` varchar(30) NOT NULL COMMENT '配置项key',
  `config_item_remark` varchar(1000) DEFAULT NULL COMMENT '配置项说明',
  `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `status` int(1) NOT NULL DEFAULT '0' COMMENT '0-有效  1-无效',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_ITEM` (`config_item_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `sys_config_value` (
  `id` bigint(20) unsigned NOT NULL,
  `config_item_id` bigint(1) NOT NULL COMMENT '配置项id',
  `config_item_value` varchar(100) DEFAULT NULL COMMENT '配置项value',
  `tenant_id` varchar(5) NOT NULL,
  `parent_tenant_id` varchar(5) DEFAULT NULL,
  `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_CONFIG_TENANT` (`config_item_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=ucs2;

insert  into `sys_config`(`id`,`config_item_key`,`config_item_remark`,`create_date`,`update_date`,`status`) values 
(1,'vierfySeconds','券码刷新时间，秒','2021-11-29 17:53:23','2021-11-29 17:53:23',0);
insert  into `sys_config`(`id`,`config_item_key`,`config_item_remark`,`create_date`,`update_date`,`status`) values 
(2,'defaultMerchantBUserId','外部设备核销默认商户员工编号','2021-11-29 17:53:23','2021-11-29 17:53:23',0);

insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(1,1,'60','789',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(2,1,'60','1003',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(3,1,'60','1008','1028','2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(4,1,'60','1009',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(5,1,'60','1010',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(6,1,'60','1012',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(7,1,'60','1013',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(8,1,'60','1019',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(9,1,'60','1020','1028','2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(10,1,'60','1021',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(11,1,'60','1022',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(12,1,'60','1023',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(13,1,'60','1024',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(14,1,'60','1025',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(15,1,'60','1026','1025','2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(16,1,'60','1027','1025','2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(17,1,'60','1028',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(18,1,'60','1035','1037','2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(19,1,'60','1036','1037','2021-11-29 17:54:07','2021-11-29 17:54:07');
insert  into `sys_config_value`(`id`,`config_item_id`,`config_item_value`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`) values 
(20,1,'60','1037',NULL,'2021-11-29 17:54:07','2021-11-29 17:54:07');



