Merge branch 'wvp-28181-2.0' of https://github.com/648540858/wvp-GB28181-pro into wvp-28181-2.0
commit
6025c431e4
|
@ -1,540 +0,0 @@
|
||||||
-- 此脚本采用dbeaver导出
|
|
||||||
-- MySQL dump 10.13 Distrib 8.0.27, for Linux (x86_64)
|
|
||||||
--
|
|
||||||
-- Host: localhost Database: wvp
|
|
||||||
-- ------------------------------------------------------
|
|
||||||
-- Server version 8.0.27-0ubuntu0.20.04.1
|
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
||||||
/*!50503 SET NAMES utf8mb4 */;
|
|
||||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
||||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
|
||||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `device`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `device`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `device` (
|
|
||||||
`deviceId` varchar(50) NOT NULL,
|
|
||||||
`name` varchar(255) DEFAULT NULL,
|
|
||||||
`manufacturer` varchar(255) DEFAULT NULL,
|
|
||||||
`model` varchar(255) DEFAULT NULL,
|
|
||||||
`firmware` varchar(255) DEFAULT NULL,
|
|
||||||
`transport` varchar(50) DEFAULT NULL,
|
|
||||||
`streamMode` varchar(50) DEFAULT NULL,
|
|
||||||
`online` varchar(50) DEFAULT NULL,
|
|
||||||
`registerTime` varchar(50) DEFAULT NULL,
|
|
||||||
`keepaliveTime` varchar(50) DEFAULT NULL,
|
|
||||||
`ip` varchar(50) NOT NULL,
|
|
||||||
`createTime` varchar(50) NOT NULL,
|
|
||||||
`updateTime` varchar(50) NOT NULL,
|
|
||||||
`port` int NOT NULL,
|
|
||||||
`expires` int NOT NULL,
|
|
||||||
`subscribeCycleForCatalog` int NOT NULL,
|
|
||||||
`hostAddress` varchar(50) NOT NULL,
|
|
||||||
`charset` varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (`deviceId`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `device`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `device` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `device` DISABLE KEYS */;
|
|
||||||
INSERT INTO `device` VALUES ('34020000001320000005','IPC-HFW4433M-I2','Dahua','IPC-HFW4433M-I2','2.622.0000000.31.R,2017-12-14','UDP','UDP','1','2022-01-05 15:08:26','2022-01-05 15:15:26','192.168.1.100','2022-01-05 15:08:26','2022-01-05 15:15:26',5060,3600,0,'192.168.1.100:5060','gb2312'),('34020000002000000005','DH-NVR5864-I','Dahua','DH-NVR5864-I','4.001.0000000.3,2020-10-22','UDP','UDP','1','2022-01-05 14:07:36','2022-01-05 15:15:25','192.168.1.19','2022-01-05 15:08:25','2022-01-05 15:15:25',5060,3600,0,'192.168.1.19:5060','gb2312'),('44010000001110008008',NULL,'Mercury','MIPC368(P)W-4','1.0.1 Build 210304 Rel.60784n','UDP','UDP','1','2022-01-05 15:08:35','2022-01-05 15:14:35','192.168.1.17','2022-01-05 15:08:35','2022-01-05 15:14:35',5060,36000,0,'192.168.1.17:5060','gb2312');
|
|
||||||
/*!40000 ALTER TABLE `device` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `device_alarm`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `device_alarm`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `device_alarm` (
|
|
||||||
`id` int NOT NULL AUTO_INCREMENT,
|
|
||||||
`deviceId` varchar(50) NOT NULL,
|
|
||||||
`channelId` varchar(50) NOT NULL,
|
|
||||||
`alarmPriority` varchar(50) NOT NULL,
|
|
||||||
`alarmMethod` varchar(50) DEFAULT NULL,
|
|
||||||
`alarmTime` varchar(50) NOT NULL,
|
|
||||||
`alarmDescription` varchar(255) DEFAULT NULL,
|
|
||||||
`longitude` double DEFAULT NULL,
|
|
||||||
`latitude` double DEFAULT NULL,
|
|
||||||
`alarmType` varchar(50) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `device_alarm`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `device_alarm` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `device_alarm` DISABLE KEYS */;
|
|
||||||
/*!40000 ALTER TABLE `device_alarm` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `device_channel`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `device_channel`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `device_channel` (
|
|
||||||
`channelId` varchar(50) NOT NULL,
|
|
||||||
`name` varchar(255) DEFAULT NULL,
|
|
||||||
`manufacture` varchar(50) DEFAULT NULL,
|
|
||||||
`model` varchar(50) DEFAULT NULL,
|
|
||||||
`owner` varchar(50) DEFAULT NULL,
|
|
||||||
`civilCode` varchar(50) DEFAULT NULL,
|
|
||||||
`block` varchar(50) DEFAULT NULL,
|
|
||||||
`address` varchar(50) DEFAULT NULL,
|
|
||||||
`parentId` varchar(50) DEFAULT NULL,
|
|
||||||
`safetyWay` int DEFAULT NULL,
|
|
||||||
`registerWay` int DEFAULT NULL,
|
|
||||||
`certNum` varchar(50) DEFAULT NULL,
|
|
||||||
`certifiable` int DEFAULT NULL,
|
|
||||||
`errCode` int DEFAULT NULL,
|
|
||||||
`endTime` varchar(50) DEFAULT NULL,
|
|
||||||
`secrecy` varchar(50) DEFAULT NULL,
|
|
||||||
`ipAddress` varchar(50) DEFAULT NULL,
|
|
||||||
`port` int DEFAULT NULL,
|
|
||||||
`password` varchar(255) DEFAULT NULL,
|
|
||||||
`PTZType` int DEFAULT NULL,
|
|
||||||
`status` int DEFAULT NULL,
|
|
||||||
`longitude` double DEFAULT NULL,
|
|
||||||
`latitude` double DEFAULT NULL,
|
|
||||||
`streamId` varchar(50) DEFAULT NULL,
|
|
||||||
`deviceId` varchar(50) NOT NULL,
|
|
||||||
`parental` varchar(50) DEFAULT NULL,
|
|
||||||
`hasAudio` bit(1) DEFAULT NULL,
|
|
||||||
`createTime` varchar(50) NOT NULL,
|
|
||||||
`updateTime` varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (`channelId`,`deviceId`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `device_channel`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `device_channel` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `device_channel` DISABLE KEYS */;
|
|
||||||
INSERT INTO `device_channel` VALUES ('34020000001310000001','IPC','Dahua','IPC-HFW4433M-I2','0','340200','','axy','34020000001320000005',0,1,'',0,0,NULL,'0','',0,'',0,1,0,0,'','34020000001320000005','0',NULL,'2022-01-05 15:11:21','2022-01-05 15:11:21'),('34020000001310000001','通道1','Dahua','DH-NVR5864-I','0','340200','','axy','34020000002000000005',0,1,'',0,0,NULL,'0','192.168.1.17',37777,'',0,1,0,0,'','34020000002000000005','0',NULL,'2022-01-05 15:11:25','2022-01-05 15:11:25'),('34020000001310000065','GB_Chn_065','Dahua','DH-NVR5864-I','0','340200','','axy','34020000002000000005',0,1,'',0,0,NULL,'0','',0,'',0,1,0,0,'','34020000002000000005','0',NULL,'2022-01-05 15:11:25','2022-01-05 15:11:25'),('34020000001320000001','IPCamera 01','Mercury','MIPC368(P)W-4','Owner','CivilCode','','Address','',0,1,'',0,0,NULL,'0','',0,'',0,1,0,0,'','44010000001110008008','0',NULL,'2022-01-05 15:11:26','2022-01-05 15:11:26');
|
|
||||||
/*!40000 ALTER TABLE `device_channel` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `device_mobile_position`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `device_mobile_position`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `device_mobile_position` (
|
|
||||||
`deviceId` varchar(50) NOT NULL,
|
|
||||||
`channelId` varchar(50) NOT NULL,
|
|
||||||
`deviceName` varchar(255) DEFAULT NULL,
|
|
||||||
`time` varchar(50) NOT NULL,
|
|
||||||
`longitude` double NOT NULL,
|
|
||||||
`latitude` double NOT NULL,
|
|
||||||
`altitude` double DEFAULT NULL,
|
|
||||||
`speed` double DEFAULT NULL,
|
|
||||||
`direction` double DEFAULT NULL,
|
|
||||||
`reportSource` varchar(50) DEFAULT NULL,
|
|
||||||
`geodeticSystem` varchar(50) DEFAULT NULL,
|
|
||||||
`cnLng` varchar(50) DEFAULT NULL,
|
|
||||||
`cnLat` varchar(50) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`deviceId`,`time`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `device_mobile_position`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `device_mobile_position` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `device_mobile_position` DISABLE KEYS */;
|
|
||||||
/*!40000 ALTER TABLE `device_mobile_position` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `gb_stream`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `gb_stream`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `gb_stream` (
|
|
||||||
`app` varchar(255) NOT NULL,
|
|
||||||
`stream` varchar(255) NOT NULL,
|
|
||||||
`gbId` varchar(50) NOT NULL,
|
|
||||||
`name` varchar(255) DEFAULT NULL,
|
|
||||||
`longitude` double DEFAULT NULL,
|
|
||||||
`latitude` double DEFAULT NULL,
|
|
||||||
`streamType` varchar(50) DEFAULT NULL,
|
|
||||||
`mediaServerId` varchar(50) DEFAULT NULL,
|
|
||||||
`status` int DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`app`,`stream`,`gbId`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `gb_stream`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `gb_stream` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `gb_stream` DISABLE KEYS */;
|
|
||||||
INSERT INTO `gb_stream` VALUES ('1000','10000001_52869999','77777777777777777777','shoulei1111',0,0,'push','XR1LEpKlfQtSg9Z1',1);
|
|
||||||
/*!40000 ALTER TABLE `gb_stream` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `log`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `log`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `log` (
|
|
||||||
`id` int NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(50) NOT NULL,
|
|
||||||
`type` varchar(50) NOT NULL,
|
|
||||||
`uri` varchar(200) NOT NULL,
|
|
||||||
`address` varchar(50) NOT NULL,
|
|
||||||
`result` varchar(50) NOT NULL,
|
|
||||||
`timing` bigint NOT NULL,
|
|
||||||
`username` varchar(50) NOT NULL,
|
|
||||||
`createTime` varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `log`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `log` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `log` DISABLE KEYS */;
|
|
||||||
INSERT INTO `log` VALUES (1,'登录','GET','/api/user/login','127.0.0.1','200 OK',245,'admin','2022-01-05 15:09:06'),(2,'添加上级平台','POST','/api/platform/save','127.0.0.1','200 OK',88,'admin','2022-01-05 15:09:24'),(3,'[设备查询] 同步设备通道','POST','/api/device/query/devices/34020000001320000005/sync','127.0.0.1','200 OK',17,'admin','2022-01-05 15:11:21'),(4,'[设备查询] 同步设备通道','POST','/api/device/query/devices/34020000002000000005/sync','127.0.0.1','200 OK',4,'admin','2022-01-05 15:11:25'),(5,'[设备查询] 同步设备通道','POST','/api/device/query/devices/44010000001110008008/sync','127.0.0.1','200 OK',4,'admin','2022-01-05 15:11:26'),(6,'向上级平台添加国标通道','POST','/api/platform/update_channel_for_gb','127.0.0.1','200 OK',52,'admin','2022-01-05 15:11:32'),(7,'从上级平台移除国标通道','DELETE','/api/platform/del_channel_for_gb','127.0.0.1','200 OK',35,'admin','2022-01-05 15:11:34'),(8,'向上级平台添加国标通道','POST','/api/platform/update_channel_for_gb','127.0.0.1','200 OK',39,'admin','2022-01-05 15:11:35'),(9,'从上级平台移除国标通道','DELETE','/api/platform/del_channel_for_gb','127.0.0.1','200 OK',46,'admin','2022-01-05 15:14:00'),(10,'向上级平台添加国标通道','POST','/api/platform/update_channel_for_gb','127.0.0.1','200 OK',59,'admin','2022-01-05 15:14:01'),(11,'添加通道与国标的关联','POST','/api/gbStream/add','127.0.0.1','200 OK',12,'admin','2022-01-05 15:14:16'),(12,'添加通道与国标的关联','POST','/api/gbStream/add','127.0.0.1','200 OK',8,'admin','2022-01-05 15:14:17'),(13,'添加通道与国标的关联','POST','/api/gbStream/add','127.0.0.1','200 OK',6,'admin','2022-01-05 15:14:19'),(14,'添加通道与国标的关联','POST','/api/gbStream/add','127.0.0.1','200 OK',8,'admin','2022-01-05 15:14:19'),(15,'移除通道与国标的关联','DELETE','/api/gbStream/del','127.0.0.1','200 OK',11,'admin','2022-01-05 15:14:21'),(16,'添加通道与国标的关联','POST','/api/gbStream/add','127.0.0.1','200 OK',42,'admin','2022-01-05 15:14:24'),(17,'移除通道与国标的关联','DELETE','/api/gbStream/del','127.0.0.1','200 OK',43,'admin','2022-01-05 15:14:25'),(18,'添加通道与国标的关联','POST','/api/gbStream/add','127.0.0.1','200 OK',9,'admin','2022-01-05 15:14:27'),(19,'添加通道与国标的关联','POST','/api/gbStream/add','127.0.0.1','200 OK',9,'admin','2022-01-05 15:14:37'),(20,'添加通道与国标的关联','POST','/api/gbStream/add','127.0.0.1','200 OK',10,'admin','2022-01-05 15:14:38');
|
|
||||||
/*!40000 ALTER TABLE `log` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `media_server`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `media_server`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `media_server` (
|
|
||||||
`id` varchar(255) NOT NULL,
|
|
||||||
`ip` varchar(50) NOT NULL,
|
|
||||||
`hookIp` varchar(50) NOT NULL,
|
|
||||||
`sdpIp` varchar(50) NOT NULL,
|
|
||||||
`streamIp` varchar(50) NOT NULL,
|
|
||||||
`httpPort` int NOT NULL,
|
|
||||||
`httpSSlPort` int NOT NULL,
|
|
||||||
`rtmpPort` int NOT NULL,
|
|
||||||
`rtmpSSlPort` int NOT NULL,
|
|
||||||
`rtpProxyPort` int NOT NULL,
|
|
||||||
`rtspPort` int NOT NULL,
|
|
||||||
`rtspSSLPort` int NOT NULL,
|
|
||||||
`autoConfig` int NOT NULL,
|
|
||||||
`secret` varchar(50) NOT NULL,
|
|
||||||
`streamNoneReaderDelayMS` int NOT NULL,
|
|
||||||
`rtpEnable` int NOT NULL,
|
|
||||||
`rtpPortRange` varchar(50) NOT NULL,
|
|
||||||
`sendRtpPortRange` varchar(50) NOT NULL,
|
|
||||||
`recordAssistPort` int NOT NULL,
|
|
||||||
`defaultServer` int NOT NULL,
|
|
||||||
`createTime` varchar(50) NOT NULL,
|
|
||||||
`updateTime` varchar(50) NOT NULL,
|
|
||||||
`hookAliveInterval` int NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `media_server_i` (`ip`,`httpPort`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `media_server`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `media_server` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `media_server` DISABLE KEYS */;
|
|
||||||
INSERT INTO `media_server` VALUES ('XR1LEpKlfQtSg9Z1','192.168.1.3','127.0.0.1','192.168.1.3','192.168.1.3',6080,0,10935,0,10000,10554,0,1,'035c73f7-bb6b-4889-a715-d9eb2d1925cc',100000,1,'30000,30500','30000,30500',18081,1,'2022-01-05 15:08:27','2022-01-05 15:08:27',10);
|
|
||||||
/*!40000 ALTER TABLE `media_server` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `parent_platform`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `parent_platform`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `parent_platform` (
|
|
||||||
`id` int NOT NULL AUTO_INCREMENT,
|
|
||||||
`enable` int DEFAULT NULL,
|
|
||||||
`name` varchar(255) DEFAULT NULL,
|
|
||||||
`serverGBId` varchar(50) NOT NULL,
|
|
||||||
`serverGBDomain` varchar(50) DEFAULT NULL,
|
|
||||||
`serverIP` varchar(50) DEFAULT NULL,
|
|
||||||
`serverPort` int DEFAULT NULL,
|
|
||||||
`deviceGBId` varchar(50) NOT NULL,
|
|
||||||
`deviceIp` varchar(50) DEFAULT NULL,
|
|
||||||
`devicePort` varchar(50) DEFAULT NULL,
|
|
||||||
`username` varchar(255) DEFAULT NULL,
|
|
||||||
`password` varchar(50) DEFAULT NULL,
|
|
||||||
`expires` varchar(50) DEFAULT NULL,
|
|
||||||
`keepTimeout` varchar(50) DEFAULT NULL,
|
|
||||||
`transport` varchar(50) DEFAULT NULL,
|
|
||||||
`characterSet` varchar(50) DEFAULT NULL,
|
|
||||||
`catalogId` varchar(50) NOT NULL,
|
|
||||||
`ptz` int DEFAULT NULL,
|
|
||||||
`rtcp` int DEFAULT NULL,
|
|
||||||
`status` bit(1) DEFAULT NULL,
|
|
||||||
`shareAllLiveStream` int DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`,`serverGBId`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `parent_platform`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `parent_platform` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `parent_platform` DISABLE KEYS */;
|
|
||||||
INSERT INTO `parent_platform` VALUES (1,1,'1112','1111111111111','1111111111','11.11.11.11',111111,'34020000002110000015','192.168.1.3','5060','34020000002110000015','12345678','300','60','UDP','GB2312','1111111111111',1,0,_binary '\0',1);
|
|
||||||
/*!40000 ALTER TABLE `parent_platform` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `platform_catalog`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `platform_catalog`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `platform_catalog` (
|
|
||||||
`id` varchar(50) NOT NULL,
|
|
||||||
`platformId` varchar(50) NOT NULL,
|
|
||||||
`name` varchar(255) NOT NULL,
|
|
||||||
`parentId` varchar(50) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `platform_catalog`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `platform_catalog` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `platform_catalog` DISABLE KEYS */;
|
|
||||||
INSERT INTO `platform_catalog` VALUES ('1111111111','1111111111111','11122','1111111111111');
|
|
||||||
/*!40000 ALTER TABLE `platform_catalog` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `platform_gb_channel`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `platform_gb_channel`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `platform_gb_channel` (
|
|
||||||
`channelId` varchar(50) NOT NULL,
|
|
||||||
`deviceId` varchar(50) NOT NULL,
|
|
||||||
`platformId` varchar(50) NOT NULL,
|
|
||||||
`deviceAndChannelId` varchar(50) NOT NULL,
|
|
||||||
`catalogId` varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (`deviceAndChannelId`,`platformId`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `platform_gb_channel`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `platform_gb_channel` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `platform_gb_channel` DISABLE KEYS */;
|
|
||||||
INSERT INTO `platform_gb_channel` VALUES ('34020000001310000001','34020000001320000005','1111111111111','34020000001320000005_34020000001310000001','1111111111'),('34020000001310000001','34020000002000000005','1111111111111','34020000002000000005_34020000001310000001','1111111111'),('34020000001310000065','34020000002000000005','1111111111111','34020000002000000005_34020000001310000065','1111111111'),('34020000001320000001','44010000001110008008','1111111111111','44010000001110008008_34020000001320000001','1111111111');
|
|
||||||
/*!40000 ALTER TABLE `platform_gb_channel` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `platform_gb_stream`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `platform_gb_stream`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `platform_gb_stream` (
|
|
||||||
`platformId` varchar(50) NOT NULL,
|
|
||||||
`app` varchar(255) NOT NULL,
|
|
||||||
`stream` varchar(255) NOT NULL,
|
|
||||||
`catalogId` varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (`platformId`,`app`,`stream`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `platform_gb_stream`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `platform_gb_stream` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `platform_gb_stream` DISABLE KEYS */;
|
|
||||||
INSERT INTO `platform_gb_stream` VALUES ('1111111111111','1000','10000001_52869999','1111111111');
|
|
||||||
/*!40000 ALTER TABLE `platform_gb_stream` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `role`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `role`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `role` (
|
|
||||||
`id` int NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` text NOT NULL,
|
|
||||||
`authority` text NOT NULL,
|
|
||||||
`createTime` varchar(50) NOT NULL,
|
|
||||||
`updateTime` varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `role`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `role` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
|
|
||||||
INSERT INTO `role` VALUES (1,'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
|
|
||||||
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `stream_proxy`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `stream_proxy`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `stream_proxy` (
|
|
||||||
`type` varchar(50) NOT NULL,
|
|
||||||
`app` varchar(255) NOT NULL,
|
|
||||||
`stream` varchar(255) NOT NULL,
|
|
||||||
`url` varchar(255) DEFAULT NULL,
|
|
||||||
`src_url` varchar(255) DEFAULT NULL,
|
|
||||||
`dst_url` varchar(255) DEFAULT NULL,
|
|
||||||
`timeout_ms` int DEFAULT NULL,
|
|
||||||
`ffmpeg_cmd_key` varchar(255) DEFAULT NULL,
|
|
||||||
`rtp_type` varchar(50) DEFAULT NULL,
|
|
||||||
`mediaServerId` varchar(50) DEFAULT NULL,
|
|
||||||
`enable_hls` bit(1) DEFAULT NULL,
|
|
||||||
`enable_mp4` bit(1) DEFAULT NULL,
|
|
||||||
`enable` bit(1) NOT NULL,
|
|
||||||
`enable_remove_none_reader` bit(1) NOT NULL,
|
|
||||||
`createTime` varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (`app`,`stream`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `stream_proxy`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `stream_proxy` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `stream_proxy` DISABLE KEYS */;
|
|
||||||
/*!40000 ALTER TABLE `stream_proxy` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `stream_push`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `stream_push`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `stream_push` (
|
|
||||||
`app` varchar(255) NOT NULL,
|
|
||||||
`stream` varchar(255) NOT NULL,
|
|
||||||
`totalReaderCount` varchar(50) DEFAULT NULL,
|
|
||||||
`originType` int DEFAULT NULL,
|
|
||||||
`originTypeStr` varchar(50) DEFAULT NULL,
|
|
||||||
`createStamp` int DEFAULT NULL,
|
|
||||||
`aliveSecond` int DEFAULT NULL,
|
|
||||||
`mediaServerId` varchar(50) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`app`,`stream`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `stream_push`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `stream_push` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `stream_push` DISABLE KEYS */;
|
|
||||||
INSERT INTO `stream_push` VALUES ('1000','10000001_52869999','0',2,'rtsp_push',1641366850,0,'XR1LEpKlfQtSg9Z1');
|
|
||||||
/*!40000 ALTER TABLE `stream_push` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `user`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `user`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `user` (
|
|
||||||
`id` int NOT NULL AUTO_INCREMENT,
|
|
||||||
`username` varchar(255) NOT NULL,
|
|
||||||
`password` varchar(255) NOT NULL,
|
|
||||||
`roleId` int NOT NULL,
|
|
||||||
`createTime` varchar(50) NOT NULL,
|
|
||||||
`updateTime` varchar(50) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `user_username_uindex` (`username`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `user`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `user` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
|
|
||||||
INSERT INTO `user` VALUES (1,'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021-04-13 14:14:57','2021-04-13 14:14:57');
|
|
||||||
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping routines for database 'wvp'
|
|
||||||
--
|
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
||||||
|
|
||||||
-- Dump completed on 2022-01-05 15:15:35
|
|
753
sql/mysql.sql
753
sql/mysql.sql
|
@ -1,268 +1,529 @@
|
||||||
-- auto-generated definition
|
-- MySQL dump 10.13 Distrib 8.0.27, for Linux (x86_64)
|
||||||
|
--
|
||||||
|
-- Host: 192.168.1.242 Database: wvp
|
||||||
|
-- ------------------------------------------------------
|
||||||
|
-- Server version 5.7.22
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!50503 SET NAMES utf8mb4 */;
|
||||||
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||||
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||||
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
CREATE DATABASE IF NOT EXISTS `wvp` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_bin */;
|
--
|
||||||
|
-- Table structure for table `device`
|
||||||
|
--
|
||||||
|
|
||||||
use wvp;
|
DROP TABLE IF EXISTS `device`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `device` (
|
||||||
|
`deviceId` varchar(50) NOT NULL,
|
||||||
|
`name` varchar(255) DEFAULT NULL,
|
||||||
|
`manufacturer` varchar(255) DEFAULT NULL,
|
||||||
|
`model` varchar(255) DEFAULT NULL,
|
||||||
|
`firmware` varchar(255) DEFAULT NULL,
|
||||||
|
`transport` varchar(50) DEFAULT NULL,
|
||||||
|
`streamMode` varchar(50) DEFAULT NULL,
|
||||||
|
`online` varchar(50) DEFAULT NULL,
|
||||||
|
`registerTime` varchar(50) DEFAULT NULL,
|
||||||
|
`keepaliveTime` varchar(50) DEFAULT NULL,
|
||||||
|
`ip` varchar(50) NOT NULL,
|
||||||
|
`createTime` varchar(50) NOT NULL,
|
||||||
|
`updateTime` varchar(50) NOT NULL,
|
||||||
|
`port` int(11) NOT NULL,
|
||||||
|
`expires` int(11) NOT NULL,
|
||||||
|
`subscribeCycleForCatalog` int(11) NOT NULL,
|
||||||
|
`hostAddress` varchar(50) NOT NULL,
|
||||||
|
`charset` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`deviceId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
create table device
|
--
|
||||||
(
|
-- Dumping data for table `device`
|
||||||
deviceId varchar(50) not null
|
--
|
||||||
primary key,
|
|
||||||
name varchar(255) null,
|
|
||||||
manufacturer varchar(255) null,
|
|
||||||
model varchar(255) null,
|
|
||||||
firmware varchar(255) null,
|
|
||||||
transport varchar(50) null,
|
|
||||||
streamMode varchar(50) null,
|
|
||||||
online varchar(50) null,
|
|
||||||
registerTime varchar(50) null,
|
|
||||||
keepaliveTime varchar(50) null,
|
|
||||||
ip varchar(50) not null,
|
|
||||||
createTime varchar(50) not null,
|
|
||||||
updateTime varchar(50) not null,
|
|
||||||
port int not null,
|
|
||||||
expires int not null,
|
|
||||||
subscribeCycleForCatalog int not null,
|
|
||||||
hostAddress varchar(50) not null,
|
|
||||||
charset varchar(50) not null
|
|
||||||
);
|
|
||||||
|
|
||||||
create table device_channel
|
LOCK TABLES `device` WRITE;
|
||||||
(
|
/*!40000 ALTER TABLE `device` DISABLE KEYS */;
|
||||||
channelId varchar(50) not null,
|
/*!40000 ALTER TABLE `device` ENABLE KEYS */;
|
||||||
name varchar(255) null,
|
UNLOCK TABLES;
|
||||||
manufacture varchar(50) null,
|
|
||||||
model varchar(50) null,
|
|
||||||
owner varchar(50) null,
|
|
||||||
civilCode varchar(50) null,
|
|
||||||
block varchar(50) null,
|
|
||||||
address varchar(50) null,
|
|
||||||
parentId varchar(50) null,
|
|
||||||
safetyWay int null,
|
|
||||||
registerWay int null,
|
|
||||||
certNum varchar(50) null,
|
|
||||||
certifiable int null,
|
|
||||||
errCode int null,
|
|
||||||
endTime varchar(50) null,
|
|
||||||
secrecy varchar(50) null,
|
|
||||||
ipAddress varchar(50) null,
|
|
||||||
port int null,
|
|
||||||
password varchar(255) null,
|
|
||||||
PTZType int null,
|
|
||||||
status int null,
|
|
||||||
longitude double null,
|
|
||||||
latitude double null,
|
|
||||||
streamId varchar(50) null,
|
|
||||||
deviceId varchar(50) not null,
|
|
||||||
parental varchar(50) null,
|
|
||||||
hasAudio bit null,
|
|
||||||
createTime varchar(50) not null,
|
|
||||||
updateTime varchar(50) not null,
|
|
||||||
primary key (channelId, deviceId)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table device_alarm
|
--
|
||||||
(
|
-- Table structure for table `device_alarm`
|
||||||
id int auto_increment
|
--
|
||||||
primary key,
|
|
||||||
deviceId varchar(50) not null,
|
|
||||||
channelId varchar(50) not null,
|
|
||||||
alarmPriority varchar(50) not null,
|
|
||||||
alarmMethod varchar(50),
|
|
||||||
alarmTime varchar(50) not null,
|
|
||||||
alarmDescription varchar(255),
|
|
||||||
longitude double null,
|
|
||||||
latitude double null,
|
|
||||||
alarmType varchar(50)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table log
|
DROP TABLE IF EXISTS `device_alarm`;
|
||||||
(
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
id int auto_increment
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
primary key,
|
CREATE TABLE `device_alarm` (
|
||||||
name varchar(50) not null,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
type varchar(50) not null,
|
`deviceId` varchar(50) NOT NULL,
|
||||||
uri varchar(200) not null,
|
`channelId` varchar(50) NOT NULL,
|
||||||
address varchar(50) not null,
|
`alarmPriority` varchar(50) NOT NULL,
|
||||||
result varchar(50) not null,
|
`alarmMethod` varchar(50) DEFAULT NULL,
|
||||||
timing bigint not null,
|
`alarmTime` varchar(50) NOT NULL,
|
||||||
username varchar(50) not null,
|
`alarmDescription` varchar(255) DEFAULT NULL,
|
||||||
createTime varchar(50) not null
|
`longitude` double DEFAULT NULL,
|
||||||
);
|
`latitude` double DEFAULT NULL,
|
||||||
|
`alarmType` varchar(50) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
create table device_mobile_position
|
--
|
||||||
(
|
-- Dumping data for table `device_alarm`
|
||||||
deviceId varchar(50) not null,
|
--
|
||||||
channelId varchar(50) not null,
|
|
||||||
deviceName varchar(255) null,
|
|
||||||
time varchar(50) not null,
|
|
||||||
longitude double not null,
|
|
||||||
latitude double not null,
|
|
||||||
altitude double null,
|
|
||||||
speed double null,
|
|
||||||
direction double null,
|
|
||||||
reportSource varchar(50) null,
|
|
||||||
geodeticSystem varchar(50) null,
|
|
||||||
cnLng varchar(50) null,
|
|
||||||
cnLat varchar(50) null,
|
|
||||||
primary key (deviceId, time)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table gb_stream
|
LOCK TABLES `device_alarm` WRITE;
|
||||||
(
|
/*!40000 ALTER TABLE `device_alarm` DISABLE KEYS */;
|
||||||
app varchar(255) not null,
|
/*!40000 ALTER TABLE `device_alarm` ENABLE KEYS */;
|
||||||
stream varchar(255) not null,
|
UNLOCK TABLES;
|
||||||
gbId varchar(50) not null,
|
|
||||||
name varchar(255) null,
|
|
||||||
longitude double null,
|
|
||||||
latitude double null,
|
|
||||||
streamType varchar(50) null,
|
|
||||||
mediaServerId varchar(50) null,
|
|
||||||
status int null,
|
|
||||||
primary key (app, stream, gbId)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table media_server
|
--
|
||||||
(
|
-- Table structure for table `device_channel`
|
||||||
id varchar(255) not null
|
--
|
||||||
primary key,
|
|
||||||
ip varchar(50) not null,
|
|
||||||
hookIp varchar(50) not null,
|
|
||||||
sdpIp varchar(50) not null,
|
|
||||||
streamIp varchar(50) not null,
|
|
||||||
httpPort int not null,
|
|
||||||
httpSSlPort int not null,
|
|
||||||
rtmpPort int not null,
|
|
||||||
rtmpSSlPort int not null,
|
|
||||||
rtpProxyPort int not null,
|
|
||||||
rtspPort int not null,
|
|
||||||
rtspSSLPort int not null,
|
|
||||||
autoConfig int not null,
|
|
||||||
secret varchar(50) not null,
|
|
||||||
streamNoneReaderDelayMS int not null,
|
|
||||||
rtpEnable int not null,
|
|
||||||
rtpPortRange varchar(50) not null,
|
|
||||||
sendRtpPortRange varchar(50) not null,
|
|
||||||
recordAssistPort int not null,
|
|
||||||
defaultServer int not null,
|
|
||||||
createTime varchar(50) not null,
|
|
||||||
updateTime varchar(50) not null,
|
|
||||||
hookAliveInterval int not null,
|
|
||||||
constraint media_server_i
|
|
||||||
unique (ip, httpPort)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table parent_platform
|
DROP TABLE IF EXISTS `device_channel`;
|
||||||
(
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
id int auto_increment,
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
enable int null,
|
CREATE TABLE `device_channel` (
|
||||||
name varchar(255) null,
|
`channelId` varchar(50) NOT NULL,
|
||||||
serverGBId varchar(50) not null,
|
`name` varchar(255) DEFAULT NULL,
|
||||||
serverGBDomain varchar(50) null,
|
`manufacture` varchar(50) DEFAULT NULL,
|
||||||
serverIP varchar(50) null,
|
`model` varchar(50) DEFAULT NULL,
|
||||||
serverPort int null,
|
`owner` varchar(50) DEFAULT NULL,
|
||||||
deviceGBId varchar(50) not null,
|
`civilCode` varchar(50) DEFAULT NULL,
|
||||||
deviceIp varchar(50) null,
|
`block` varchar(50) DEFAULT NULL,
|
||||||
devicePort varchar(50) null,
|
`address` varchar(50) DEFAULT NULL,
|
||||||
username varchar(255) null,
|
`parentId` varchar(50) DEFAULT NULL,
|
||||||
password varchar(50) null,
|
`safetyWay` int(11) DEFAULT NULL,
|
||||||
expires varchar(50) null,
|
`registerWay` int(11) DEFAULT NULL,
|
||||||
keepTimeout varchar(50) null,
|
`certNum` varchar(50) DEFAULT NULL,
|
||||||
transport varchar(50) null,
|
`certifiable` int(11) DEFAULT NULL,
|
||||||
characterSet varchar(50) null,
|
`errCode` int(11) DEFAULT NULL,
|
||||||
catalogId varchar(50) not null,
|
`endTime` varchar(50) DEFAULT NULL,
|
||||||
ptz int null,
|
`secrecy` varchar(50) DEFAULT NULL,
|
||||||
rtcp int null,
|
`ipAddress` varchar(50) DEFAULT NULL,
|
||||||
status bit null,
|
`port` int(11) DEFAULT NULL,
|
||||||
shareAllLiveStream int null,
|
`password` varchar(255) DEFAULT NULL,
|
||||||
primary key (id, serverGBId)
|
`PTZType` int(11) DEFAULT NULL,
|
||||||
);
|
`status` int(11) DEFAULT NULL,
|
||||||
|
`longitude` double DEFAULT NULL,
|
||||||
|
`latitude` double DEFAULT NULL,
|
||||||
|
`streamId` varchar(50) DEFAULT NULL,
|
||||||
|
`deviceId` varchar(50) NOT NULL,
|
||||||
|
`parental` varchar(50) DEFAULT NULL,
|
||||||
|
`hasAudio` bit(1) DEFAULT NULL,
|
||||||
|
`createTime` varchar(50) NOT NULL,
|
||||||
|
`updateTime` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`channelId`,`deviceId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `device_channel`
|
||||||
|
--
|
||||||
|
|
||||||
create table platform_catalog
|
LOCK TABLES `device_channel` WRITE;
|
||||||
(
|
/*!40000 ALTER TABLE `device_channel` DISABLE KEYS */;
|
||||||
id varchar(50) primary key,
|
/*!40000 ALTER TABLE `device_channel` ENABLE KEYS */;
|
||||||
platformId varchar(50) not null,
|
UNLOCK TABLES;
|
||||||
name varchar(255) not null,
|
|
||||||
parentId varchar(50)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table platform_gb_channel
|
--
|
||||||
(
|
-- Table structure for table `device_mobile_position`
|
||||||
channelId varchar(50) not null,
|
--
|
||||||
deviceId varchar(50) not null,
|
|
||||||
platformId varchar(50) not null,
|
|
||||||
deviceAndChannelId varchar(50) not null,
|
|
||||||
catalogId varchar(50) not null,
|
|
||||||
primary key (deviceAndChannelId, platformId)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table platform_gb_stream
|
DROP TABLE IF EXISTS `device_mobile_position`;
|
||||||
(
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
platformId varchar(50) not null,
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
app varchar(255) not null,
|
CREATE TABLE `device_mobile_position` (
|
||||||
stream varchar(255) not null,
|
`deviceId` varchar(50) NOT NULL,
|
||||||
catalogId varchar(50) not null,
|
`channelId` varchar(50) NOT NULL,
|
||||||
primary key (platformId, app, stream)
|
`deviceName` varchar(255) DEFAULT NULL,
|
||||||
);
|
`time` varchar(50) NOT NULL,
|
||||||
|
`longitude` double NOT NULL,
|
||||||
|
`latitude` double NOT NULL,
|
||||||
|
`altitude` double DEFAULT NULL,
|
||||||
|
`speed` double DEFAULT NULL,
|
||||||
|
`direction` double DEFAULT NULL,
|
||||||
|
`reportSource` varchar(50) DEFAULT NULL,
|
||||||
|
`geodeticSystem` varchar(50) DEFAULT NULL,
|
||||||
|
`cnLng` varchar(50) DEFAULT NULL,
|
||||||
|
`cnLat` varchar(50) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`deviceId`,`time`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
create table stream_proxy
|
--
|
||||||
(
|
-- Dumping data for table `device_mobile_position`
|
||||||
type varchar(50) not null,
|
--
|
||||||
app varchar(255) not null,
|
|
||||||
stream varchar(255) not null,
|
|
||||||
url varchar(255) null,
|
|
||||||
src_url varchar(255) null,
|
|
||||||
dst_url varchar(255) null,
|
|
||||||
timeout_ms int null,
|
|
||||||
ffmpeg_cmd_key varchar(255) null,
|
|
||||||
rtp_type varchar(50) null,
|
|
||||||
mediaServerId varchar(50) null,
|
|
||||||
enable_hls bit null,
|
|
||||||
enable_mp4 bit null,
|
|
||||||
enable bit not null,
|
|
||||||
enable_remove_none_reader bit not null,
|
|
||||||
createTime varchar(50) not null,
|
|
||||||
primary key (app, stream)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table stream_push
|
LOCK TABLES `device_mobile_position` WRITE;
|
||||||
(
|
/*!40000 ALTER TABLE `device_mobile_position` DISABLE KEYS */;
|
||||||
app varchar(255) not null,
|
/*!40000 ALTER TABLE `device_mobile_position` ENABLE KEYS */;
|
||||||
stream varchar(255) not null,
|
UNLOCK TABLES;
|
||||||
totalReaderCount varchar(50) null,
|
|
||||||
originType int null,
|
|
||||||
originTypeStr varchar(50) null,
|
|
||||||
createStamp int null,
|
|
||||||
aliveSecond int null,
|
|
||||||
mediaServerId varchar(50) null,
|
|
||||||
primary key (app, stream)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table user
|
--
|
||||||
(
|
-- Table structure for table `gb_stream`
|
||||||
id int auto_increment
|
--
|
||||||
primary key,
|
|
||||||
username varchar(255) not null,
|
|
||||||
password varchar(255) not null,
|
|
||||||
roleId int not null,
|
|
||||||
createTime varchar(50) not null,
|
|
||||||
updateTime varchar(50) not null
|
|
||||||
);
|
|
||||||
|
|
||||||
create unique index user_username_uindex
|
DROP TABLE IF EXISTS `gb_stream`;
|
||||||
on user (username);
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `gb_stream` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`app` varchar(255) NOT NULL,
|
||||||
|
`stream` varchar(255) NOT NULL,
|
||||||
|
`gbId` varchar(50) NOT NULL,
|
||||||
|
`name` varchar(255) DEFAULT NULL,
|
||||||
|
`longitude` double DEFAULT NULL,
|
||||||
|
`latitude` double DEFAULT NULL,
|
||||||
|
`streamType` varchar(50) DEFAULT NULL,
|
||||||
|
`mediaServerId` varchar(50) DEFAULT NULL,
|
||||||
|
`status` int(11) DEFAULT NULL,
|
||||||
|
`createStamp` bigint(20) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `app` (`app`,`stream`),
|
||||||
|
UNIQUE KEY `gbId` (`gbId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
insert into user (username, password, roleId, createTime, updateTime) values ('admin', '21232f297a57a5a743894a0e4a801fc3', '1', '2021-04-13 14:14:57', '2021-04-13 14:14:57');
|
--
|
||||||
|
-- Dumping data for table `gb_stream`
|
||||||
|
--
|
||||||
|
|
||||||
create table role (
|
LOCK TABLES `gb_stream` WRITE;
|
||||||
id int auto_increment
|
/*!40000 ALTER TABLE `gb_stream` DISABLE KEYS */;
|
||||||
primary key,
|
/*!40000 ALTER TABLE `gb_stream` ENABLE KEYS */;
|
||||||
name TEXT NOT NULL,
|
UNLOCK TABLES;
|
||||||
authority TEXT NOT NULL,
|
|
||||||
createTime varchar(50) not null,
|
|
||||||
updateTime varchar(50) not null
|
|
||||||
);
|
|
||||||
insert into role (id, name, authority, createTime, updateTime) values ('1', 'admin', '0', '2021-04-13 14:14:57', '2021-04-13 14:14:57');
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `log`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `log`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `log` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(50) NOT NULL,
|
||||||
|
`type` varchar(50) NOT NULL,
|
||||||
|
`uri` varchar(200) NOT NULL,
|
||||||
|
`address` varchar(50) NOT NULL,
|
||||||
|
`result` varchar(50) NOT NULL,
|
||||||
|
`timing` bigint(20) NOT NULL,
|
||||||
|
`username` varchar(50) NOT NULL,
|
||||||
|
`createTime` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `log`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `log` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `log` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `log` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `media_server`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `media_server`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `media_server` (
|
||||||
|
`id` varchar(255) NOT NULL,
|
||||||
|
`ip` varchar(50) NOT NULL,
|
||||||
|
`hookIp` varchar(50) NOT NULL,
|
||||||
|
`sdpIp` varchar(50) NOT NULL,
|
||||||
|
`streamIp` varchar(50) NOT NULL,
|
||||||
|
`httpPort` int(11) NOT NULL,
|
||||||
|
`httpSSlPort` int(11) NOT NULL,
|
||||||
|
`rtmpPort` int(11) NOT NULL,
|
||||||
|
`rtmpSSlPort` int(11) NOT NULL,
|
||||||
|
`rtpProxyPort` int(11) NOT NULL,
|
||||||
|
`rtspPort` int(11) NOT NULL,
|
||||||
|
`rtspSSLPort` int(11) NOT NULL,
|
||||||
|
`autoConfig` int(11) NOT NULL,
|
||||||
|
`secret` varchar(50) NOT NULL,
|
||||||
|
`streamNoneReaderDelayMS` int(11) NOT NULL,
|
||||||
|
`rtpEnable` int(11) NOT NULL,
|
||||||
|
`rtpPortRange` varchar(50) NOT NULL,
|
||||||
|
`sendRtpPortRange` varchar(50) NOT NULL,
|
||||||
|
`recordAssistPort` int(11) NOT NULL,
|
||||||
|
`defaultServer` int(11) NOT NULL,
|
||||||
|
`createTime` varchar(50) NOT NULL,
|
||||||
|
`updateTime` varchar(50) NOT NULL,
|
||||||
|
`hookAliveInterval` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `media_server_i` (`ip`,`httpPort`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `media_server`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `media_server` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `media_server` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `media_server` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `parent_platform`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `parent_platform`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `parent_platform` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`enable` int(11) DEFAULT NULL,
|
||||||
|
`name` varchar(255) DEFAULT NULL,
|
||||||
|
`serverGBId` varchar(50) NOT NULL,
|
||||||
|
`serverGBDomain` varchar(50) DEFAULT NULL,
|
||||||
|
`serverIP` varchar(50) DEFAULT NULL,
|
||||||
|
`serverPort` int(11) DEFAULT NULL,
|
||||||
|
`deviceGBId` varchar(50) NOT NULL,
|
||||||
|
`deviceIp` varchar(50) DEFAULT NULL,
|
||||||
|
`devicePort` varchar(50) DEFAULT NULL,
|
||||||
|
`username` varchar(255) DEFAULT NULL,
|
||||||
|
`password` varchar(50) DEFAULT NULL,
|
||||||
|
`expires` varchar(50) DEFAULT NULL,
|
||||||
|
`keepTimeout` varchar(50) DEFAULT NULL,
|
||||||
|
`transport` varchar(50) DEFAULT NULL,
|
||||||
|
`characterSet` varchar(50) DEFAULT NULL,
|
||||||
|
`catalogId` varchar(50) NOT NULL,
|
||||||
|
`ptz` int(11) DEFAULT NULL,
|
||||||
|
`rtcp` int(11) DEFAULT NULL,
|
||||||
|
`status` bit(1) DEFAULT NULL,
|
||||||
|
`shareAllLiveStream` int(11) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`,`serverGBId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `parent_platform`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `parent_platform` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `parent_platform` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `parent_platform` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `platform_catalog`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `platform_catalog`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `platform_catalog` (
|
||||||
|
`id` varchar(50) NOT NULL,
|
||||||
|
`platformId` varchar(50) NOT NULL,
|
||||||
|
`name` varchar(255) NOT NULL,
|
||||||
|
`parentId` varchar(50) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `platform_catalog`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `platform_catalog` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `platform_catalog` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `platform_catalog` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `platform_gb_channel`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `platform_gb_channel`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `platform_gb_channel` (
|
||||||
|
`channelId` varchar(50) NOT NULL,
|
||||||
|
`deviceId` varchar(50) NOT NULL,
|
||||||
|
`platformId` varchar(50) NOT NULL,
|
||||||
|
`deviceAndChannelId` varchar(50) NOT NULL,
|
||||||
|
`catalogId` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`deviceAndChannelId`,`platformId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `platform_gb_channel`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `platform_gb_channel` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `platform_gb_channel` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `platform_gb_channel` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `platform_gb_stream`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `platform_gb_stream`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `platform_gb_stream` (
|
||||||
|
`platformId` varchar(50) NOT NULL,
|
||||||
|
`app` varchar(255) NOT NULL,
|
||||||
|
`stream` varchar(255) NOT NULL,
|
||||||
|
`catalogId` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`platformId`,`app`,`stream`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `platform_gb_stream`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `platform_gb_stream` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `platform_gb_stream` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `platform_gb_stream` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `user_role`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `user_role`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `user_role` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(50) NOT NULL,
|
||||||
|
`authority` varchar(50) NOT NULL,
|
||||||
|
`createTime` varchar(50) NOT NULL,
|
||||||
|
`updateTime` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `user_role`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `user_role` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
|
||||||
|
INSERT INTO `user_role` VALUES (1,'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
|
||||||
|
/*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `stream_proxy`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `stream_proxy`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `stream_proxy` (
|
||||||
|
`type` varchar(50) NOT NULL,
|
||||||
|
`app` varchar(255) NOT NULL,
|
||||||
|
`stream` varchar(255) NOT NULL,
|
||||||
|
`url` varchar(255) DEFAULT NULL,
|
||||||
|
`src_url` varchar(255) DEFAULT NULL,
|
||||||
|
`dst_url` varchar(255) DEFAULT NULL,
|
||||||
|
`timeout_ms` int(11) DEFAULT NULL,
|
||||||
|
`ffmpeg_cmd_key` varchar(255) DEFAULT NULL,
|
||||||
|
`rtp_type` varchar(50) DEFAULT NULL,
|
||||||
|
`mediaServerId` varchar(50) DEFAULT NULL,
|
||||||
|
`enable_hls` bit(1) DEFAULT NULL,
|
||||||
|
`enable_mp4` bit(1) DEFAULT NULL,
|
||||||
|
`enable` bit(1) NOT NULL,
|
||||||
|
`enable_remove_none_reader` bit(1) NOT NULL,
|
||||||
|
`createTime` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`app`,`stream`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `stream_proxy`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `stream_proxy` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `stream_proxy` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `stream_proxy` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `stream_push`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `stream_push`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `stream_push` (
|
||||||
|
`app` varchar(255) NOT NULL,
|
||||||
|
`stream` varchar(255) NOT NULL,
|
||||||
|
`totalReaderCount` varchar(50) DEFAULT NULL,
|
||||||
|
`originType` int(11) DEFAULT NULL,
|
||||||
|
`originTypeStr` varchar(50) DEFAULT NULL,
|
||||||
|
`createStamp` bigint(20) DEFAULT NULL,
|
||||||
|
`aliveSecond` int(11) DEFAULT NULL,
|
||||||
|
`mediaServerId` varchar(50) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`app`,`stream`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `stream_push`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `stream_push` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `stream_push` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `stream_push` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `user`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `user`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `user` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`username` varchar(255) NOT NULL,
|
||||||
|
`password` varchar(255) NOT NULL,
|
||||||
|
`roleId` int(11) NOT NULL,
|
||||||
|
`createTime` varchar(50) NOT NULL,
|
||||||
|
`updateTime` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `user_username_uindex` (`username`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `user`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `user` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
|
||||||
|
INSERT INTO `user` VALUES (1,'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021-04-13 14:14:57','2021-04-13 14:14:57');
|
||||||
|
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
|
-- Dump completed on 2022-01-25 15:36:42
|
||||||
|
|
|
@ -14,6 +14,10 @@ public class GbStream extends PlatformGbStream{
|
||||||
private double latitude;
|
private double latitude;
|
||||||
private String streamType;
|
private String streamType;
|
||||||
private boolean status;
|
private boolean status;
|
||||||
|
/**
|
||||||
|
* GMT unix系统时间戳,单位秒
|
||||||
|
*/
|
||||||
|
public Long createStamp;
|
||||||
|
|
||||||
public String getApp() {
|
public String getApp() {
|
||||||
return app;
|
return app;
|
||||||
|
@ -86,4 +90,13 @@ public class GbStream extends PlatformGbStream{
|
||||||
public void setMediaServerId(String mediaServerId) {
|
public void setMediaServerId(String mediaServerId) {
|
||||||
this.mediaServerId = mediaServerId;
|
this.mediaServerId = mediaServerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Long getCreateStamp() {
|
||||||
|
return createStamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateStamp(Long createStamp) {
|
||||||
|
this.createStamp = createStamp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,6 +138,7 @@ public class ZLMMediaListManager {
|
||||||
if (gbStreamMapper.selectOne(transform.getApp(), transform.getStream()) != null) {
|
if (gbStreamMapper.selectOne(transform.getApp(), transform.getStream()) != null) {
|
||||||
gbStreamMapper.update(transform);
|
gbStreamMapper.update(transform);
|
||||||
}else {
|
}else {
|
||||||
|
transform.setCreateStamp(System.currentTimeMillis());
|
||||||
gbStreamMapper.add(transform);
|
gbStreamMapper.add(transform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,11 +56,6 @@ public class StreamPushItem extends GbStream implements Comparable<StreamPushIte
|
||||||
*/
|
*/
|
||||||
private String originUrl;
|
private String originUrl;
|
||||||
|
|
||||||
/**
|
|
||||||
* GMT unix系统时间戳,单位秒
|
|
||||||
*/
|
|
||||||
private Long createStamp;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存活时间,单位秒
|
* 存活时间,单位秒
|
||||||
*/
|
*/
|
||||||
|
@ -92,7 +87,7 @@ public class StreamPushItem extends GbStream implements Comparable<StreamPushIte
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(@NotNull StreamPushItem streamPushItem) {
|
public int compareTo(@NotNull StreamPushItem streamPushItem) {
|
||||||
return Long.valueOf(this.createStamp - streamPushItem.getCreateStamp().intValue()).intValue();
|
return Long.valueOf(super.createStamp - streamPushItem.getCreateStamp().intValue()).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class MediaSchema {
|
public static class MediaSchema {
|
||||||
|
@ -182,14 +177,6 @@ public class StreamPushItem extends GbStream implements Comparable<StreamPushIte
|
||||||
this.originUrl = originUrl;
|
this.originUrl = originUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getCreateStamp() {
|
|
||||||
return createStamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateStamp(Long createStamp) {
|
|
||||||
this.createStamp = createStamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getAliveSecond() {
|
public Long getAliveSecond() {
|
||||||
return aliveSecond;
|
return aliveSecond;
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class GbStreamServiceImpl implements IGbStreamService {
|
||||||
try {
|
try {
|
||||||
List<DeviceChannel> deviceChannelList = new ArrayList<>();
|
List<DeviceChannel> deviceChannelList = new ArrayList<>();
|
||||||
for (GbStream gbStream : gbStreams) {
|
for (GbStream gbStream : gbStreams) {
|
||||||
platformGbStreamMapper.delByAppAndStream(gbStream.getApp(), gbStream.getStream());
|
platformGbStreamMapper.delByAppAndStreamAndPlatform(gbStream.getApp(), gbStream.getStream(), platformId);
|
||||||
DeviceChannel deviceChannel = new DeviceChannel();
|
DeviceChannel deviceChannel = new DeviceChannel();
|
||||||
deviceChannel.setChannelId(gbStream.getGbId());
|
deviceChannel.setChannelId(gbStream.getGbId());
|
||||||
deviceChannelList.add(deviceChannel);
|
deviceChannelList.add(deviceChannel);
|
||||||
|
|
|
@ -146,6 +146,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||||
result.append(", 关联国标平台[ " + param.getPlatformGbId() + " ]失败");
|
result.append(", 关联国标平台[ " + param.getPlatformGbId() + " ]失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!StringUtils.isEmpty(param.getGbId())) {
|
||||||
// 查找开启了全部直播流共享的上级平台
|
// 查找开启了全部直播流共享的上级平台
|
||||||
List<ParentPlatform> parentPlatforms = parentPlatformMapper.selectAllAhareAllLiveStream();
|
List<ParentPlatform> parentPlatforms = parentPlatformMapper.selectAllAhareAllLiveStream();
|
||||||
if (parentPlatforms.size() > 0) {
|
if (parentPlatforms.size() > 0) {
|
||||||
|
@ -160,6 +161,8 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wvpResult.setMsg(result.toString());
|
wvpResult.setMsg(result.toString());
|
||||||
return wvpResult;
|
return wvpResult;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
||||||
public boolean saveToGB(GbStream stream) {
|
public boolean saveToGB(GbStream stream) {
|
||||||
stream.setStreamType("push");
|
stream.setStreamType("push");
|
||||||
stream.setStatus(true);
|
stream.setStatus(true);
|
||||||
|
stream.setCreateStamp(System.currentTimeMillis());
|
||||||
int add = gbStreamMapper.add(stream);
|
int add = gbStreamMapper.add(stream);
|
||||||
|
|
||||||
// 查找开启了全部直播流共享的上级平台
|
// 查找开启了全部直播流共享的上级平台
|
||||||
|
@ -305,6 +306,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
||||||
streamPushItem.setStreamType("push");
|
streamPushItem.setStreamType("push");
|
||||||
streamPushItem.setStatus(true);
|
streamPushItem.setStatus(true);
|
||||||
streamPushItem.setGbId("34020000004111" + gbId);
|
streamPushItem.setGbId("34020000004111" + gbId);
|
||||||
|
streamPushItem.setCreateStamp(System.currentTimeMillis());
|
||||||
gbId ++;
|
gbId ++;
|
||||||
}
|
}
|
||||||
int limitCount = 30;
|
int limitCount = 30;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class StreamPushUploadFileHandler extends AnalysisEventListener<StreamPus
|
||||||
streamPushItem.setGbId(streamPushExcelDto.getGbId());
|
streamPushItem.setGbId(streamPushExcelDto.getGbId());
|
||||||
streamPushItem.setStatus(false);
|
streamPushItem.setStatus(false);
|
||||||
streamPushItem.setStreamType("push");
|
streamPushItem.setStreamType("push");
|
||||||
streamPushItem.setCreateStamp(System.currentTimeMillis()/1000);
|
streamPushItem.setCreateStamp(System.currentTimeMillis());
|
||||||
streamPushItem.setMediaServerId(defaultMediaServerId);
|
streamPushItem.setMediaServerId(defaultMediaServerId);
|
||||||
streamPushItem.setName(streamPushExcelDto.getName());
|
streamPushItem.setName(streamPushExcelDto.getName());
|
||||||
streamPushItem.setOriginType(2);
|
streamPushItem.setOriginType(2);
|
||||||
|
|
|
@ -96,8 +96,8 @@ public interface DeviceChannelMapper {
|
||||||
"SELECT * FROM ( "+
|
"SELECT * FROM ( "+
|
||||||
" SELECT dc.channelId, dc.deviceId, dc.name, de.manufacturer, de.hostAddress, " +
|
" SELECT dc.channelId, dc.deviceId, dc.name, de.manufacturer, de.hostAddress, " +
|
||||||
"(SELECT count(0) FROM device_channel WHERE parentId=dc.channelId) as subCount, " +
|
"(SELECT count(0) FROM device_channel WHERE parentId=dc.channelId) as subCount, " +
|
||||||
"(SELECT pc.platformId FROM platform_gb_channel pc WHERE pc.deviceId=dc.deviceId AND pc.channelId = dc.channelId ) as platformId, " +
|
"(SELECT pc.platformId FROM platform_gb_channel pc WHERE pc.deviceId=dc.deviceId AND pc.channelId = dc.channelId AND pc.platformId = #{platformId}) as platformId, " +
|
||||||
"(SELECT pc.catalogId FROM platform_gb_channel pc WHERE pc.deviceId=dc.deviceId AND pc.channelId = dc.channelId ) as catalogId " +
|
"(SELECT pc.catalogId FROM platform_gb_channel pc WHERE pc.deviceId=dc.deviceId AND pc.channelId = dc.channelId AND pc.platformId = #{platformId} ) as catalogId " +
|
||||||
"FROM device_channel dc " +
|
"FROM device_channel dc " +
|
||||||
"LEFT JOIN device de ON dc.deviceId = de.deviceId " +
|
"LEFT JOIN device de ON dc.deviceId = de.deviceId " +
|
||||||
" WHERE 1=1 " +
|
" WHERE 1=1 " +
|
||||||
|
|
|
@ -15,10 +15,10 @@ import java.util.List;
|
||||||
public interface GbStreamMapper {
|
public interface GbStreamMapper {
|
||||||
|
|
||||||
@Insert("REPLACE INTO gb_stream (app, stream, gbId, name, " +
|
@Insert("REPLACE INTO gb_stream (app, stream, gbId, name, " +
|
||||||
"longitude, latitude, streamType, mediaServerId, status) VALUES" +
|
"longitude, latitude, streamType, mediaServerId, status, createStamp) VALUES" +
|
||||||
"('${app}', '${stream}', '${gbId}', '${name}', " +
|
"('${app}', '${stream}', '${gbId}', '${name}', " +
|
||||||
"'${longitude}', '${latitude}', '${streamType}', " +
|
"'${longitude}', '${latitude}', '${streamType}', " +
|
||||||
"'${mediaServerId}', ${status})")
|
"'${mediaServerId}', ${status}, ${createStamp})")
|
||||||
int add(GbStream gbStream);
|
int add(GbStream gbStream);
|
||||||
|
|
||||||
@Update("UPDATE gb_stream " +
|
@Update("UPDATE gb_stream " +
|
||||||
|
@ -38,8 +38,8 @@ public interface GbStreamMapper {
|
||||||
int del(String app, String stream);
|
int del(String app, String stream);
|
||||||
|
|
||||||
@Select("SELECT gs.*, pgs.platformId AS platformId, pgs.catalogId AS catalogId FROM gb_stream gs " +
|
@Select("SELECT gs.*, pgs.platformId AS platformId, pgs.catalogId AS catalogId FROM gb_stream gs " +
|
||||||
"LEFT JOIN platform_gb_stream pgs ON gs.app = pgs.app AND gs.stream = pgs.stream " +
|
"LEFT JOIN platform_gb_stream pgs ON gs.app = pgs.app AND gs.stream = pgs.stream AND (pgs.platformId = #{platformId} OR pgs.platformId is null)" +
|
||||||
"WHERE pgs.platformId is null OR pgs.platformId = #{platformId}")
|
"order by gs.id asc ")
|
||||||
List<GbStream> selectAll(String platformId);
|
List<GbStream> selectAll(String platformId);
|
||||||
|
|
||||||
@Select("SELECT * FROM gb_stream WHERE app=#{app} AND stream=#{stream}")
|
@Select("SELECT * FROM gb_stream WHERE app=#{app} AND stream=#{stream}")
|
||||||
|
@ -87,12 +87,12 @@ public interface GbStreamMapper {
|
||||||
@Insert("<script> " +
|
@Insert("<script> " +
|
||||||
"REPLACE into gb_stream " +
|
"REPLACE into gb_stream " +
|
||||||
"(app, stream, gbId, name, " +
|
"(app, stream, gbId, name, " +
|
||||||
"longitude, latitude, streamType, mediaServerId, status)" +
|
"longitude, latitude, streamType, mediaServerId, status, createStamp)" +
|
||||||
"values " +
|
"values " +
|
||||||
"<foreach collection='subList' index='index' item='item' separator=','> " +
|
"<foreach collection='subList' index='index' item='item' separator=','> " +
|
||||||
"('${item.app}', '${item.stream}', '${item.gbId}', '${item.name}', " +
|
"('${item.app}', '${item.stream}', '${item.gbId}', '${item.name}', " +
|
||||||
"'${item.longitude}', '${item.latitude}', '${item.streamType}', " +
|
"'${item.longitude}', '${item.latitude}', '${item.streamType}', " +
|
||||||
"'${item.mediaServerId}', ${item.status}) "+
|
"'${item.mediaServerId}', ${item.status}, ${item.createStamp}) "+
|
||||||
"</foreach> " +
|
"</foreach> " +
|
||||||
"</script>")
|
"</script>")
|
||||||
void batchAdd(List<StreamPushItem> subList);
|
void batchAdd(List<StreamPushItem> subList);
|
||||||
|
|
|
@ -73,6 +73,6 @@ public interface PlatformGbStreamMapper {
|
||||||
"</script> ")
|
"</script> ")
|
||||||
List<ParentPlatform> queryPlatFormListForGBWithGBId(String app, String stream, List<String> platforms);
|
List<ParentPlatform> queryPlatFormListForGBWithGBId(String app, String stream, List<String> platforms);
|
||||||
|
|
||||||
@Select("SELECT * FROM platform_gb_stream WHERE app=#{app} AND stream=#{stream} AND platformId=#{platformId}")
|
@Delete("DELETE FROM platform_gb_stream WHERE app=#{app} AND stream=#{stream} AND platformId=#{platformId}")
|
||||||
int delByAppAndStreamAndPlatform(String app, String streamId, String platformId);
|
int delByAppAndStreamAndPlatform(String app, String stream, String platformId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,12 +11,12 @@ import java.util.List;
|
||||||
@Repository
|
@Repository
|
||||||
public interface RoleMapper {
|
public interface RoleMapper {
|
||||||
|
|
||||||
@Insert("INSERT INTO role (name, authority, createTime, updateTime) VALUES" +
|
@Insert("INSERT INTO user_role (name, authority, createTime, updateTime) VALUES" +
|
||||||
"('${name}', '${authority}', '${createTime}', '${updateTime}')")
|
"('${name}', '${authority}', '${createTime}', '${updateTime}')")
|
||||||
int add(Role role);
|
int add(Role role);
|
||||||
|
|
||||||
@Update(value = {" <script>" +
|
@Update(value = {" <script>" +
|
||||||
"UPDATE role " +
|
"UPDATE user_role " +
|
||||||
"SET updateTime='${updateTime}' " +
|
"SET updateTime='${updateTime}' " +
|
||||||
"<if test=\"name != null\">, name='${name}'</if>" +
|
"<if test=\"name != null\">, name='${name}'</if>" +
|
||||||
"<if test=\"authority != null\">, authority='${authority}'</if>" +
|
"<if test=\"authority != null\">, authority='${authority}'</if>" +
|
||||||
|
@ -24,12 +24,12 @@ public interface RoleMapper {
|
||||||
" </script>"})
|
" </script>"})
|
||||||
int update(Role role);
|
int update(Role role);
|
||||||
|
|
||||||
@Delete("DELETE FROM role WHERE id != 1 and id=#{id}")
|
@Delete("DELETE FROM user_role WHERE id != 1 and id=#{id}")
|
||||||
int delete(int id);
|
int delete(int id);
|
||||||
|
|
||||||
@Select("select * FROM role WHERE id=#{id}")
|
@Select("select * FROM user_role WHERE id=#{id}")
|
||||||
Role selectById(int id);
|
Role selectById(int id);
|
||||||
|
|
||||||
@Select("select * FROM role")
|
@Select("select * FROM user_role")
|
||||||
List<Role> selectAll();
|
List<Role> selectAll();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,8 +53,8 @@ public interface StreamPushMapper {
|
||||||
"REPLACE INTO stream_push (app, stream, totalReaderCount, originType, originTypeStr, " +
|
"REPLACE INTO stream_push (app, stream, totalReaderCount, originType, originTypeStr, " +
|
||||||
"createStamp, aliveSecond, mediaServerId) " +
|
"createStamp, aliveSecond, mediaServerId) " +
|
||||||
"VALUES <foreach collection='streamPushItems' item='item' index='index' separator=','>" +
|
"VALUES <foreach collection='streamPushItems' item='item' index='index' separator=','>" +
|
||||||
"( '${item.app}', '${item.stream}', '${item.totalReaderCount}', '${item.originType}', " +
|
"( '${item.app}', '${item.stream}', '${item.totalReaderCount}', #{item.originType}, " +
|
||||||
"'${item.originTypeStr}','${item.createStamp}', '${item.aliveSecond}', '${item.mediaServerId}' )" +
|
"'${item.originTypeStr}',#{item.createStamp}, #{item.aliveSecond}, '${item.mediaServerId}' )" +
|
||||||
" </foreach>" +
|
" </foreach>" +
|
||||||
"</script>")
|
"</script>")
|
||||||
void addAll(List<StreamPushItem> streamPushItems);
|
void addAll(List<StreamPushItem> streamPushItems);
|
||||||
|
|
|
@ -27,7 +27,7 @@ public interface UserMapper {
|
||||||
@Delete("DELETE FROM user WHERE id != 1 and id=#{id}")
|
@Delete("DELETE FROM user WHERE id != 1 and id=#{id}")
|
||||||
int delete(int id);
|
int delete(int id);
|
||||||
|
|
||||||
@Select("select user.*, role.id roleID, role.name roleName, role.authority roleAuthority , role.createTime roleCreateTime , role.updateTime roleUpdateTime FROM user, role WHERE user.roleId=role.id and user.username=#{username} AND user.password=#{password}")
|
@Select("select u.*, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u, user_role r WHERE u.roleId=r.id and u.username=#{username} AND u.password=#{password}")
|
||||||
@Results(id = "roleMap", value = {
|
@Results(id = "roleMap", value = {
|
||||||
@Result(column = "roleID", property = "role.id"),
|
@Result(column = "roleID", property = "role.id"),
|
||||||
@Result(column = "roleName", property = "role.name"),
|
@Result(column = "roleName", property = "role.name"),
|
||||||
|
@ -37,15 +37,15 @@ public interface UserMapper {
|
||||||
})
|
})
|
||||||
User select(String username, String password);
|
User select(String username, String password);
|
||||||
|
|
||||||
@Select("select user.*, role.id roleID, role.name roleName, role.authority roleAuthority, role.createTime roleCreateTime , role.updateTime roleUpdateTime FROM user, role WHERE user.roleId=role.id and user.id=#{id}")
|
@Select("select u.*, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u, user_role r WHERE u.roleId=r.id and u.id=#{id}")
|
||||||
@ResultMap(value="roleMap")
|
@ResultMap(value="roleMap")
|
||||||
User selectById(int id);
|
User selectById(int id);
|
||||||
|
|
||||||
@Select("select user.*, role.id roleID, role.name roleName, role.authority roleAuthority, role.createTime roleCreateTime , role.updateTime roleUpdateTime FROM user, role WHERE user.roleId=role.id and username=#{username}")
|
@Select("select u.*, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u, user_role r WHERE u.roleId=r.id and u.username=#{username}")
|
||||||
@ResultMap(value="roleMap")
|
@ResultMap(value="roleMap")
|
||||||
User getUserByUsername(String username);
|
User getUserByUsername(String username);
|
||||||
|
|
||||||
@Select("select user.*, role.id roleID, role.name roleName, role.authority roleAuthority, role.createTime roleCreateTime , role.updateTime roleUpdateTime FROM user, role WHERE user.roleId=role.id")
|
@Select("select u.*, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u, user_role r WHERE u.roleId=r.id")
|
||||||
@ResultMap(value="roleMap")
|
@ResultMap(value="roleMap")
|
||||||
List<User> selectAll();
|
List<User> selectAll();
|
||||||
}
|
}
|
||||||
|
|
|
@ -679,6 +679,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
|
||||||
streamProxyItem.setStatus(true);
|
streamProxyItem.setStatus(true);
|
||||||
String now = this.format.format(System.currentTimeMillis());
|
String now = this.format.format(System.currentTimeMillis());
|
||||||
streamProxyItem.setCreateTime(now);
|
streamProxyItem.setCreateTime(now);
|
||||||
|
streamProxyItem.setCreateStamp(System.currentTimeMillis());
|
||||||
try {
|
try {
|
||||||
if (gbStreamMapper.add(streamProxyItem)<0 || streamProxyMapper.add(streamProxyItem) < 0) {
|
if (gbStreamMapper.add(streamProxyItem)<0 || streamProxyMapper.add(streamProxyItem) < 0) {
|
||||||
//事务回滚
|
//事务回滚
|
||||||
|
|
|
@ -87,21 +87,22 @@ public class PlatformController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存上级平台信息
|
* 添加上级平台信息
|
||||||
* @param parentPlatform
|
* @param parentPlatform
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation("保存上级平台信息")
|
@ApiOperation("添加上级平台信息")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "parentPlatform", value = "上级平台信息", dataTypeClass = ParentPlatform.class),
|
@ApiImplicitParam(name = "parentPlatform", value = "上级平台信息", dataTypeClass = ParentPlatform.class),
|
||||||
})
|
})
|
||||||
@PostMapping("/save")
|
@PostMapping("/add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity<String> savePlatform(@RequestBody ParentPlatform parentPlatform){
|
public ResponseEntity<WVPResult<String>> addPlatform(@RequestBody ParentPlatform parentPlatform){
|
||||||
|
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("保存上级平台信息API调用");
|
logger.debug("保存上级平台信息API调用");
|
||||||
}
|
}
|
||||||
|
WVPResult<String> wvpResult = new WVPResult<>();
|
||||||
if (StringUtils.isEmpty(parentPlatform.getName())
|
if (StringUtils.isEmpty(parentPlatform.getName())
|
||||||
||StringUtils.isEmpty(parentPlatform.getServerGBId())
|
||StringUtils.isEmpty(parentPlatform.getServerGBId())
|
||||||
||StringUtils.isEmpty(parentPlatform.getServerGBDomain())
|
||StringUtils.isEmpty(parentPlatform.getServerGBDomain())
|
||||||
|
@ -113,11 +114,69 @@ public class PlatformController {
|
||||||
||StringUtils.isEmpty(parentPlatform.getTransport())
|
||StringUtils.isEmpty(parentPlatform.getTransport())
|
||||||
||StringUtils.isEmpty(parentPlatform.getCharacterSet())
|
||StringUtils.isEmpty(parentPlatform.getCharacterSet())
|
||||||
){
|
){
|
||||||
return new ResponseEntity<>("missing parameters", HttpStatus.BAD_REQUEST);
|
wvpResult.setCode(-1);
|
||||||
|
wvpResult.setMsg("missing parameters");
|
||||||
|
return new ResponseEntity<>(wvpResult, HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
// TODO 检查是否已经存在,且注册成功, 如果注册成功,需要先注销之前再,修改并注册
|
|
||||||
|
|
||||||
// ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getDeviceGBId());
|
ParentPlatform parentPlatformOld = storager.queryParentPlatByServerGBId(parentPlatform.getServerGBId());
|
||||||
|
if (parentPlatformOld != null) {
|
||||||
|
wvpResult.setCode(-1);
|
||||||
|
wvpResult.setMsg("平台 "+parentPlatform.getServerGBId()+" 已存在");
|
||||||
|
return new ResponseEntity<>(wvpResult, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
boolean updateResult = storager.updateParentPlatform(parentPlatform);
|
||||||
|
|
||||||
|
if (updateResult) {
|
||||||
|
// 保存时启用就发送注册
|
||||||
|
if (parentPlatform.isEnable()) {
|
||||||
|
// 只要保存就发送注册
|
||||||
|
commanderForPlatform.register(parentPlatform, null, null);
|
||||||
|
} else if (parentPlatformOld != null && parentPlatformOld.isEnable() && !parentPlatform.isEnable()){ // 关闭启用时注销
|
||||||
|
commanderForPlatform.unregister(parentPlatform, null, null);
|
||||||
|
}
|
||||||
|
wvpResult.setCode(0);
|
||||||
|
wvpResult.setMsg("success");
|
||||||
|
return new ResponseEntity<>(wvpResult, HttpStatus.OK);
|
||||||
|
} else {
|
||||||
|
wvpResult.setCode(-1);
|
||||||
|
wvpResult.setMsg("写入数据库失败");
|
||||||
|
return new ResponseEntity<>(wvpResult, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存上级平台信息
|
||||||
|
* @param parentPlatform
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("保存上级平台信息")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "parentPlatform", value = "上级平台信息", dataTypeClass = ParentPlatform.class),
|
||||||
|
})
|
||||||
|
@PostMapping("/save")
|
||||||
|
@ResponseBody
|
||||||
|
public ResponseEntity<WVPResult<String>> savePlatform(@RequestBody ParentPlatform parentPlatform){
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("保存上级平台信息API调用");
|
||||||
|
}
|
||||||
|
WVPResult<String> wvpResult = new WVPResult<>();
|
||||||
|
if (StringUtils.isEmpty(parentPlatform.getName())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getServerGBId())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getServerGBDomain())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getServerIP())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getServerPort())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getDeviceGBId())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getExpires())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getKeepTimeout())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getTransport())
|
||||||
|
||StringUtils.isEmpty(parentPlatform.getCharacterSet())
|
||||||
|
){
|
||||||
|
wvpResult.setCode(-1);
|
||||||
|
wvpResult.setMsg("missing parameters");
|
||||||
|
return new ResponseEntity<>(wvpResult, HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
ParentPlatform parentPlatformOld = storager.queryParentPlatByServerGBId(parentPlatform.getServerGBId());
|
ParentPlatform parentPlatformOld = storager.queryParentPlatByServerGBId(parentPlatform.getServerGBId());
|
||||||
|
|
||||||
boolean updateResult = storager.updateParentPlatform(parentPlatform);
|
boolean updateResult = storager.updateParentPlatform(parentPlatform);
|
||||||
|
@ -130,9 +189,13 @@ public class PlatformController {
|
||||||
} else if (parentPlatformOld != null && parentPlatformOld.isEnable() && !parentPlatform.isEnable()){ // 关闭启用时注销
|
} else if (parentPlatformOld != null && parentPlatformOld.isEnable() && !parentPlatform.isEnable()){ // 关闭启用时注销
|
||||||
commanderForPlatform.unregister(parentPlatform, null, null);
|
commanderForPlatform.unregister(parentPlatform, null, null);
|
||||||
}
|
}
|
||||||
return new ResponseEntity<>("success", HttpStatus.OK);
|
wvpResult.setCode(0);
|
||||||
|
wvpResult.setMsg("success");
|
||||||
|
return new ResponseEntity<>(wvpResult, HttpStatus.OK);
|
||||||
} else {
|
} else {
|
||||||
return new ResponseEntity<>("fail", HttpStatus.OK);
|
wvpResult.setCode(0);
|
||||||
|
wvpResult.setMsg("写入数据库失败");
|
||||||
|
return new ResponseEntity<>(wvpResult, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,13 +118,12 @@ public class StreamPushController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public DeferredResult<ResponseEntity<WVPResult<Object>>> uploadChannelFile(@RequestParam(value = "file") MultipartFile file){
|
public DeferredResult<ResponseEntity<WVPResult<Object>>> uploadChannelFile(@RequestParam(value = "file") MultipartFile file){
|
||||||
|
|
||||||
|
|
||||||
// 最多处理文件一个小时
|
// 最多处理文件一个小时
|
||||||
DeferredResult<ResponseEntity<WVPResult<Object>>> result = new DeferredResult<>(60*60*1000L);
|
DeferredResult<ResponseEntity<WVPResult<Object>>> result = new DeferredResult<>(60*60*1000L);
|
||||||
// 录像查询以channelId作为deviceId查询
|
// 录像查询以channelId作为deviceId查询
|
||||||
String key = DeferredResultHolder.UPLOAD_FILE_CHANNEL;
|
String key = DeferredResultHolder.UPLOAD_FILE_CHANNEL;
|
||||||
String uuid = UUID.randomUUID().toString();
|
String uuid = UUID.randomUUID().toString();
|
||||||
|
logger.info("通道导入文件类型: {}",file.getContentType() );
|
||||||
if (file.isEmpty()) {
|
if (file.isEmpty()) {
|
||||||
logger.warn("通道导入文件为空");
|
logger.warn("通道导入文件为空");
|
||||||
WVPResult<Object> wvpResult = new WVPResult<>();
|
WVPResult<Object> wvpResult = new WVPResult<>();
|
||||||
|
@ -133,6 +132,23 @@ public class StreamPushController {
|
||||||
result.setResult(ResponseEntity.status(HttpStatus.BAD_REQUEST).body(wvpResult));
|
result.setResult(ResponseEntity.status(HttpStatus.BAD_REQUEST).body(wvpResult));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
if (file.getContentType() == null) {
|
||||||
|
WVPResult<Object> wvpResult = new WVPResult<>();
|
||||||
|
wvpResult.setCode(-1);
|
||||||
|
wvpResult.setMsg("无法识别文件类型");
|
||||||
|
result.setResult(ResponseEntity.status(HttpStatus.BAD_REQUEST).body(wvpResult));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
// if (!file.getContentType().endsWith(".xls")
|
||||||
|
// && !file.getContentType().endsWith(".csv")
|
||||||
|
// && !file.getContentType().endsWith(".xlsx") ) {
|
||||||
|
// logger.warn("通道导入文件类型错误: {}",file.getContentType() );
|
||||||
|
// WVPResult<Object> wvpResult = new WVPResult<>();
|
||||||
|
// wvpResult.setCode(-1);
|
||||||
|
// wvpResult.setMsg("文件类型错误,请使用");
|
||||||
|
// result.setResult(ResponseEntity.status(HttpStatus.BAD_REQUEST).body(wvpResult));
|
||||||
|
// return result;
|
||||||
|
// }
|
||||||
// 同时只处理一个文件
|
// 同时只处理一个文件
|
||||||
if (resultHolder.exist(key, null)) {
|
if (resultHolder.exist(key, null)) {
|
||||||
logger.warn("已有导入任务正在执行");
|
logger.warn("已有导入任务正在执行");
|
||||||
|
@ -162,6 +178,7 @@ public class StreamPushController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
//传入参数
|
//传入参数
|
||||||
ExcelReader excelReader = EasyExcel.read(inputStream, StreamPushExcelDto.class,
|
ExcelReader excelReader = EasyExcel.read(inputStream, StreamPushExcelDto.class,
|
||||||
new StreamPushUploadFileHandler(streamPushService, mediaServerService.getDefaultMediaServer().getId(), (errorStreams, errorGBs)->{
|
new StreamPushUploadFileHandler(streamPushService, mediaServerService.getDefaultMediaServer().getId(), (errorStreams, errorGBs)->{
|
||||||
|
@ -186,6 +203,18 @@ public class StreamPushController {
|
||||||
ReadSheet readSheet = EasyExcel.readSheet(0).build();
|
ReadSheet readSheet = EasyExcel.readSheet(0).build();
|
||||||
excelReader.read(readSheet);
|
excelReader.read(readSheet);
|
||||||
excelReader.finish();
|
excelReader.finish();
|
||||||
|
}catch (Exception e) {
|
||||||
|
logger.warn("通道导入失败:", e);
|
||||||
|
RequestMessage msg = new RequestMessage();
|
||||||
|
msg.setKey(key);
|
||||||
|
WVPResult<Object> wvpResult = new WVPResult<>();
|
||||||
|
wvpResult.setCode(-1);
|
||||||
|
wvpResult.setMsg("通道导入失败: " + e.getMessage() );
|
||||||
|
msg.setData(wvpResult);
|
||||||
|
resultHolder.invokeAllResult(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
|
# [可选]上传文件大小限制
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 10MB
|
||||||
|
max-request-size: 100MB
|
||||||
# REDIS数据库配置
|
# REDIS数据库配置
|
||||||
redis:
|
redis:
|
||||||
# [必须修改] Redis服务器IP, REDIS安装在本机的,使用127.0.0.1
|
# [必须修改] Redis服务器IP, REDIS安装在本机的,使用127.0.0.1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
spring:
|
spring:
|
||||||
# 上传文件大小限制
|
# [可选]上传文件大小限制
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 10MB
|
max-file-size: 10MB
|
||||||
|
@ -19,23 +19,12 @@ spring:
|
||||||
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
|
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
|
||||||
datasource:
|
datasource:
|
||||||
# 使用mysql 打开23-28行注释, 删除29-36行
|
# 使用mysql 打开23-28行注释, 删除29-36行
|
||||||
# name: wvp
|
name: wvp
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true
|
url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true
|
||||||
# username:
|
|
||||||
# password:
|
|
||||||
# type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
name: eiot
|
|
||||||
url: jdbc:sqlite::resource:wvp.sqlite
|
|
||||||
username:
|
username:
|
||||||
password:
|
password:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driver-class-name: org.sqlite.JDBC
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
journal_mode: WAL
|
|
||||||
synchronous: NORMAL
|
|
||||||
transaction_mode: IMMEDIATE
|
|
||||||
max-active: 1
|
|
||||||
min-idle: 1
|
|
||||||
|
|
||||||
# [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
|
# [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
|
||||||
server:
|
server:
|
||||||
|
|
|
@ -19,23 +19,12 @@ spring:
|
||||||
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
|
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
|
||||||
datasource:
|
datasource:
|
||||||
# 使用mysql 打开23-28行注释, 删除29-36行
|
# 使用mysql 打开23-28行注释, 删除29-36行
|
||||||
# name: wvp
|
name: wvp
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true
|
url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true
|
||||||
# username:
|
username: root
|
||||||
# password:
|
password: root
|
||||||
# type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
name: eiot
|
|
||||||
url: jdbc:sqlite::resource:wvp.sqlite
|
|
||||||
username:
|
|
||||||
password:
|
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driver-class-name: org.sqlite.JDBC
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
journal_mode: WAL
|
|
||||||
synchronous: NORMAL
|
|
||||||
transaction_mode: IMMEDIATE
|
|
||||||
max-active: 1
|
|
||||||
min-idle: 1
|
|
||||||
|
|
||||||
# [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
|
# [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
|
||||||
server:
|
server:
|
||||||
|
|
Binary file not shown.
|
@ -91,16 +91,6 @@ export default {
|
||||||
if (typeof(callback) === 'function') {
|
if (typeof(callback) === 'function') {
|
||||||
callback(res.data.data)
|
callback(res.data.data)
|
||||||
}
|
}
|
||||||
//
|
|
||||||
|
|
||||||
// if (typeof (this.$refs.tree.setCurrentKey) == "undefined") {
|
|
||||||
// this.$refs.tree.setCurrentKey(this.defaultCatalogId)
|
|
||||||
// let data = this.$refs.tree.getCurrentNode()
|
|
||||||
// if (data != null && data.id === this.defaultCatalogId) {
|
|
||||||
// this.currentCatalogChange(data, this.$refs.tree.getNode(data.id))
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
|
@ -126,18 +116,6 @@ export default {
|
||||||
let node = this.$refs.tree.getNode(id);
|
let node = this.$refs.tree.getNode(id);
|
||||||
this.refreshCatalog(node);
|
this.refreshCatalog(node);
|
||||||
}
|
}
|
||||||
// if (nodeIds !== null) {
|
|
||||||
// let refreshNode = {}
|
|
||||||
// for (let i = 0; i < nodeIds.length; i++) {
|
|
||||||
// let node = this.$refs.tree.getNode(nodeIds[i]);
|
|
||||||
// refreshNode[node.parent.data.id] = node.parent
|
|
||||||
// }
|
|
||||||
// if (Object.values(refreshNode).length > 0) {
|
|
||||||
// for (let j = 0; j < Object.values(refreshNode).length; j++) {
|
|
||||||
// this.refreshCatalog(Object.values(refreshNode)[j]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
editCatalog: function (data, node){
|
editCatalog: function (data, node){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -261,7 +239,15 @@ export default {
|
||||||
disabled: node.level === 1,
|
disabled: node.level === 1,
|
||||||
divided: true,
|
divided: true,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
|
this.$confirm('确定删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
this.removeCatalog(data.id, node)
|
this.removeCatalog(data.id, node)
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,6 +116,7 @@ export default {
|
||||||
showDialog: false,
|
showDialog: false,
|
||||||
isLoging: false,
|
isLoging: false,
|
||||||
onSubmit_text: "立即创建",
|
onSubmit_text: "立即创建",
|
||||||
|
saveUrl: "/api/platform/save",
|
||||||
|
|
||||||
platform: {
|
platform: {
|
||||||
id: null,
|
id: null,
|
||||||
|
@ -163,6 +164,7 @@ export default {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (platform == null) {
|
if (platform == null) {
|
||||||
this.onSubmit_text = "立即创建";
|
this.onSubmit_text = "立即创建";
|
||||||
|
this.saveUrl = "/api/platform/add";
|
||||||
this.$axios({
|
this.$axios({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url:`/api/platform/server_config`
|
url:`/api/platform/server_config`
|
||||||
|
@ -198,6 +200,7 @@ export default {
|
||||||
this.platform.shareAllLiveStream = platform.shareAllLiveStream;
|
this.platform.shareAllLiveStream = platform.shareAllLiveStream;
|
||||||
this.platform.catalogId = platform.catalogId;
|
this.platform.catalogId = platform.catalogId;
|
||||||
this.onSubmit_text = "保存";
|
this.onSubmit_text = "保存";
|
||||||
|
this.saveUrl = "/api/platform/save";
|
||||||
}
|
}
|
||||||
this.showDialog = true;
|
this.showDialog = true;
|
||||||
this.listChangeCallback = callback;
|
this.listChangeCallback = callback;
|
||||||
|
@ -212,14 +215,13 @@ export default {
|
||||||
this.platform.username = this.platform.deviceGBId ;
|
this.platform.username = this.platform.deviceGBId ;
|
||||||
},
|
},
|
||||||
onSubmit: function () {
|
onSubmit: function () {
|
||||||
console.log("onSubmit");
|
|
||||||
var that = this;
|
var that = this;
|
||||||
that.$axios({
|
that.$axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url:`/api/platform/save`,
|
url: this.saveUrl,
|
||||||
data: that.platform
|
data: that.platform
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
if (res.data == "success") {
|
if (res.data.code === 0) {
|
||||||
that.$message({
|
that.$message({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
|
@ -229,6 +231,12 @@ export default {
|
||||||
if (that.listChangeCallback != null) {
|
if (that.listChangeCallback != null) {
|
||||||
that.listChangeCallback();
|
that.listChangeCallback();
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
that.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: res.data.msg,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
Loading…
Reference in New Issue