commit 2f69e2c6f2bb19fcfa0379497560253fcacd86e6
Author: review512jwy@163.com <“review512jwy@163.com”>
Date: Fri Oct 31 15:39:07 2025 +0800
代码同步
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0663bec
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,16 @@
+/target/
+/logs/
+/.idea/
+*.iml
+*.bak
+*.log
+/.settings/
+*.project
+*.classpath
+*.factorypath
+*.springBeans
+/.apt_generated/
+/.externalToolBuilders/
+/bin/
+/dongjian-center-admin-controller/tmp/
+application-*.properties
diff --git a/document/cmd b/document/cmd
new file mode 100644
index 0000000..186d579
--- /dev/null
+++ b/document/cmd
@@ -0,0 +1,31 @@
+aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com
+
+docker tag 67f91fc6cfbf 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest
+
+docker push 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest
+
+docker pull 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest
+
+docker run -d -p 8887:20008 -v /home/data-center-business/back/application.properties:/home/data-center-business/config/application.properties 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business
+
+aws configure
+
+docker run -e apiEnable=false -e datasourceDNS=tokyo-building-db.caetvgb7diak.ap-northeast-1.rds.amazonaws.com -e datasourceTimeZone=Asia/Tokyo -e datasourceUsername=techsor -e datasourcePassword=Abc#123456xyz -e loggingLevel=ERROR -e loggingPath=/home/data-center-business/log -e loggingAppender=SYSLOG -e redisHost=replication-group-tokyo-build.ncvpel.ng.0001.apne1.cache.amazonaws.com -e redisPassword= -e awsAccesskey=AKIA5OFH5OOZHM3U3KX4 -e awsSecretkey=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 -e awsBucket=tokyo-build-databucket-381659385655 -e ibatisLoggingLog=ERROR -e ibatisLoggingLogFactory=ERROR -d -p 20008:20008 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest
+
+阿里云
+docker tag e1fe6f58961e registry.cn-shanghai.aliyuncs.com/test-data-business/data-business-server:latest
+
+docker push registry.cn-shanghai.aliyuncs.com/test-data-business/data-business-server:latest
+
+docker pull registry.cn-shanghai.aliyuncs.com/test-data-business/data-business-server:latest
+
+docker exec -it 3c77bb84d338 /bin/bash
+
+docker run -d -p 20008:20015 -v /home/application.properties:/home/dongjian-center-admin/config/application.properties registry.cn-shanghai.aliyuncs.com/test-data-business/data-business-server
+
+测试环境
+aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com
+
+docker tag ecee6b583d3c 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest
+
+docker push 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest
diff --git a/document/db/20240508.sql b/document/db/20240508.sql
new file mode 100644
index 0000000..c83fcc4
--- /dev/null
+++ b/document/db/20240508.sql
@@ -0,0 +1,85 @@
+USE `data_center_aeon_admin`;
+
+DROP procedure IF EXISTS `add_column`;
+
+DELIMITER $$
+
+CREATE PROCEDURE add_column()
+
+BEGIN
+ IF NOT EXISTS (
+ SELECT *
+ FROM information_schema.columns
+ WHERE table_schema = 'data_center_aeon_admin'
+ AND table_name = 'basic_company'
+ AND column_name = 'aurora_flag'
+ ) THEN
+ ALTER TABLE basic_company
+ ADD COLUMN `aurora_flag` int DEFAULT '0' COMMENT '0-未创建,1-创建中,2-创建成功,3-创建失败';
+ END IF;
+
+ IF NOT EXISTS (
+ SELECT *
+ FROM information_schema.columns
+ WHERE table_schema = 'data_center_aeon_admin'
+ AND table_name = 'basic_company'
+ AND column_name = 'aurora_url'
+ ) THEN
+ ALTER TABLE basic_company
+ ADD COLUMN `aurora_url` varchar(255) DEFAULT NULL;
+ END IF;
+
+ IF NOT EXISTS (
+ SELECT *
+ FROM information_schema.columns
+ WHERE table_schema = 'data_center_aeon_admin'
+ AND table_name = 'basic_company'
+ AND column_name = 'aurora_username'
+ ) THEN
+ ALTER TABLE basic_company
+ ADD COLUMN `aurora_username` varchar(255) DEFAULT NULL;
+ END IF;
+
+ IF NOT EXISTS (
+ SELECT *
+ FROM information_schema.columns
+ WHERE table_schema = 'data_center_aeon_admin'
+ AND table_name = 'basic_company'
+ AND column_name = 'aurora_password'
+ ) THEN
+ ALTER TABLE basic_company
+ ADD COLUMN `aurora_password` varchar(255) DEFAULT NULL;
+ END IF;
+
+ IF NOT EXISTS (
+ SELECT *
+ FROM information_schema.columns
+ WHERE table_schema = 'data_center_aeon_admin'
+ AND table_name = 'basic_company'
+ AND column_name = 'redis_db_id'
+ ) THEN
+ ALTER TABLE basic_company
+ ADD COLUMN `redis_db_id` int DEFAULT NULL COMMENT '使用的redis库id';
+ END IF;
+
+ IF NOT EXISTS (
+ SELECT *
+ FROM information_schema.columns
+ WHERE table_schema = 'data_center_aeon_admin'
+ AND table_name = 'basic_company'
+ AND column_name = 'bearer_token'
+ ) THEN
+ ALTER TABLE basic_company
+ ADD COLUMN `bearer_token` text;
+ END IF;
+
+ update basic_company set aurora_flag = 2 where aurora_url is not null;
+
+END$$
+
+DELIMITER ;
+
+
+CALL add_column();
+
+DROP procedure IF EXISTS `add_column`;
\ No newline at end of file
diff --git a/document/db/20240515.sql b/document/db/20240515.sql
new file mode 100644
index 0000000..82689da
--- /dev/null
+++ b/document/db/20240515.sql
@@ -0,0 +1,62 @@
+USE `data_center_aeon_admin`;
+
+/*Table structure for table `basic_menu` */
+
+DROP TABLE IF EXISTS `basic_menu`;
+
+CREATE TABLE `basic_menu` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_menu_id` bigint DEFAULT NULL,
+ `menu_name` varchar(100) DEFAULT NULL,
+ `menu_name_en` varchar(100) DEFAULT NULL,
+ `menu_name_jp` varchar(100) DEFAULT NULL,
+ `remark` varchar(100) DEFAULT NULL,
+ `menu_level` int DEFAULT '1' COMMENT '菜单级别',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_menu` */
+
+insert into `basic_menu`(`id`,`parent_menu_id`,`menu_name`,`menu_name_en`,`menu_name_jp`,`remark`,`menu_level`,`flag`,`create_time`) values (1,-1,'项目管理','项目管理','プロジェクト管理','项目管理',1,0,1659079777164),(2,-1,'楼宇模块','楼宇模块','ビルモジュール','楼宇模块',1,0,1659079777164),(3,-1,'设备模块','设备模块','設備モジュール','设备模块',1,0,1659079777164),(4,-1,'转发管理','转发管理','転送管理','转发管理',1,0,1659079777164),(5,-1,'数据来源管理','数据来源管理','データ源管理','数据来源管理',1,0,1659079777164),(6,1,'添加','添加','追加','项目管理-添加',2,0,1659079777164),(7,1,'编辑','编辑','編集','项目管理-编辑',2,0,1659079777164),(8,1,'删除','删除','削除','项目管理-删除',2,0,1659079777164),(9,1,'批量添加','批量添加','大量に追加','项目管理-批量添加',2,0,1659079777164),(10,2,'楼宇管理','楼宇管理','ビル管理','楼宇管理',2,0,1659079777164),(11,2,'楼层管理','楼层管理','フロア管理','楼层管理',2,0,1659079777164),(12,2,'房间管理','房间管理','部屋管理','房间管理',2,0,1659079777164),(13,2,'资产管理','资产管理','資産管理','资产管理',2,0,1659079777164),(14,10,'添加','添加','追加','楼宇管理-添加',3,0,1659079777164),(15,10,'编辑','编辑','編集','楼宇管理-编辑',3,0,1659079777164),(16,10,'删除','删除','削除','楼宇管理-删除',3,0,1659079777164),(17,11,'添加','添加','追加','楼层管理-添加',3,0,1659079777164),(18,11,'编辑','编辑','編集','楼层管理-编辑',3,0,1659079777164),(19,11,'删除','删除','削除','楼层管理-删除',3,0,1659079777164),(20,12,'添加','添加','追加','房间管理-添加',3,0,1659079777164),(21,12,'编辑','编辑','編集','房间管理-编辑',3,0,1659079777164),(22,12,'删除','删除','削除','房间管理-删除',3,0,1659079777164),(23,13,'添加','添加','追加','资产管理-添加',3,0,1659079777164),(24,13,'编辑','编辑','編集','资产管理-编辑',3,0,1659079777164),(25,13,'删除','删除','削除','资产管理-删除',3,0,1659079777164),(26,3,'设备管理','设备管理','設備管理','设备管理',2,0,1659079777164),(27,26,'添加','添加','追加','设备管理-添加',3,0,1659079777164),(28,26,'编辑','编辑','編集','设备管理-编辑',3,0,1659079777164),(29,26,'删除','删除','削除','设备管理-删除',3,0,1659079777164),(30,26,'批量添加','批量添加','大量に追加','设备管理-批量添加',3,0,1659079777164),(31,26,'批量删除','批量删除','一括削除','设备管理-批量删除',3,0,1659079777164),(32,3,'设备类别管理','设备类别管理','設備の種類管理','设备类别管理',2,0,1659079777164),(33,32,'添加','添加','追加','设备类别管理-添加',3,0,1659079777164),(34,32,'编辑','编辑','編集','设备类别管理-编辑',3,0,1659079777164),(35,32,'删除','删除','削除','设备类别管理-删除',3,0,1659079777164),(36,4,'添加','添加','追加','转发管理-添加',3,0,1659079777164),(37,4,'编辑','编辑','編集','转发管理-编辑',3,0,1659079777164),(38,4,'删除','删除','削除','转发管理-删除',3,0,1659079777164),(39,5,'添加','添加','追加','数据来源管理-添加',3,0,1659079777164),(40,5,'编辑','编辑','編集','数据来源管理-编辑',3,0,1659079777164),(41,5,'删除','删除','削除','数据来源管理-删除',3,0,1659079777164),(42,26,'设置告警模板','设置告警模板','アラームテンプレートの設定','设备管理-设置告警模板',3,0,1659079777164);
+
+
+/*Table structure for table `basic_role` */
+
+DROP TABLE IF EXISTS `basic_role`;
+
+CREATE TABLE `basic_role` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `role_name` varchar(100) DEFAULT NULL,
+ `description` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_menu_relation` */
+
+DROP TABLE IF EXISTS `basic_role_menu_relation`;
+
+CREATE TABLE `basic_role_menu_relation` (
+ `role_id` bigint DEFAULT NULL,
+ `menu_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_user_relation` */
+
+DROP TABLE IF EXISTS `basic_role_user_relation`;
+
+CREATE TABLE `basic_role_user_relation` (
+ `user_id` bigint DEFAULT NULL,
+ `role_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
diff --git a/document/db/init.sql b/document/db/init.sql
new file mode 100644
index 0000000..5024010
--- /dev/null
+++ b/document/db/init.sql
@@ -0,0 +1,161 @@
+/*
+SQLyog 企业版 - MySQL GUI v8.14
+MySQL - 8.0.28 : Database - data_center_aeon_admin
+*********************************************************************
+*/
+
+
+/*!40101 SET NAMES utf8 */;
+
+/*!40101 SET SQL_MODE=''*/;
+
+/*!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 /*!32312 IF NOT EXISTS*/`data_center_aeon_admin` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
+
+USE `data_center_aeon_admin`;
+
+/*Table structure for table `basic_company` */
+
+DROP TABLE IF EXISTS `basic_company`;
+
+CREATE TABLE `basic_company` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_id` bigint DEFAULT NULL,
+ `company_name` varchar(500) DEFAULT NULL,
+ `mfa_switch` int DEFAULT '0' COMMENT '谷歌mfa服务开关。0-关闭,1-开启',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `apikey` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_company` */
+
+insert into `basic_company`(`id`,`parent_id`,`company_name`,`mfa_switch`,`flag`,`create_time`,`modify_time`) values (1,-1,'MiniSolution',0,0,1658978002231,1658978002231);
+
+/*Table structure for table `basic_menu` */
+
+DROP TABLE IF EXISTS `basic_menu`;
+
+CREATE TABLE `basic_menu` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_menu_id` bigint DEFAULT NULL,
+ `menu_name` varchar(100) DEFAULT NULL,
+ `menu_name_en` varchar(100) DEFAULT NULL,
+ `menu_name_jp` varchar(100) DEFAULT NULL,
+ `remark` varchar(100) DEFAULT NULL,
+ `menu_level` int DEFAULT '1' COMMENT '菜单级别',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_menu` */
+
+insert into `basic_menu`(`id`,`parent_menu_id`,`menu_name`,`menu_name_en`,`menu_name_jp`,`remark`,`menu_level`,`flag`,`create_time`) values (1,-1,'项目管理','项目管理','项目管理','项目管理',1,0,1659079777164),(2,-1,'楼宇模块','楼宇模块','楼宇模块','楼宇模块',1,0,1659079777164),(3,-1,'设备模块','设备模块','设备模块','设备模块',1,0,1659079777164),(4,-1,'转发管理','转发管理','转发管理','转发管理',1,0,1659079777164),(5,-1,'数据来源管理','数据来源管理','数据来源管理','数据来源管理',1,0,1659079777164),(6,1,'添加','添加','添加','项目管理-添加',2,0,1659079777164),(7,1,'编辑','编辑','编辑','项目管理-编辑',2,0,1659079777164),(8,1,'删除','删除','删除','项目管理-删除',2,0,1659079777164),(9,1,'批量添加','批量添加','批量添加','项目管理-批量添加',2,0,1659079777164),(10,2,'楼宇管理','楼宇管理','楼宇管理','楼宇管理',2,0,1659079777164),(11,2,'楼层管理','楼层管理','楼层管理','楼层管理',2,0,1659079777164),(12,2,'房间管理','房间管理','房间管理','房间管理',2,0,1659079777164),(13,2,'资产管理','资产管理','资产管理','资产管理',2,0,1659079777164),(14,10,'添加','添加','添加','楼宇管理-添加',3,0,1659079777164),(15,10,'编辑','编辑','编辑','楼宇管理-编辑',3,0,1659079777164),(16,10,'删除','删除','删除','楼宇管理-删除',3,0,1659079777164),(17,11,'添加','添加','添加','楼层管理-添加',3,0,1659079777164),(18,11,'编辑','编辑','编辑','楼层管理-编辑',3,0,1659079777164),(19,11,'删除','删除','删除','楼层管理-删除',3,0,1659079777164),(20,12,'添加','添加','添加','房间管理-添加',3,0,1659079777164),(21,12,'编辑','编辑','编辑','房间管理-编辑',3,0,1659079777164),(22,12,'删除','删除','删除','房间管理-删除',3,0,1659079777164),(23,13,'添加','添加','添加','资产管理-添加',3,0,1659079777164),(24,13,'编辑','编辑','编辑','资产管理-编辑',3,0,1659079777164),(25,13,'删除','删除','删除','资产管理-删除',3,0,1659079777164),(26,3,'设备管理','设备管理','设备管理','设备管理',2,0,1659079777164),(27,26,'添加','添加','添加','设备管理-添加',3,0,1659079777164),(28,26,'编辑','编辑','编辑','设备管理-编辑',3,0,1659079777164),(29,26,'删除','删除','删除','设备管理-删除',3,0,1659079777164),(30,26,'批量添加','批量添加','批量添加','设备管理-批量添加',3,0,1659079777164),(31,26,'批量删除','批量删除','批量删除','设备管理-批量删除',3,0,1659079777164),(32,3,'设备类别管理','设备类别管理','设备类别管理','设备类别管理',2,0,1659079777164),(33,32,'添加','添加','添加','设备类别管理-添加',3,0,1659079777164),(34,32,'编辑','编辑','编辑','设备类别管理-编辑',3,0,1659079777164),(35,32,'删除','删除','删除','设备类别管理-删除',3,0,1659079777164),(36,4,'添加','添加','添加','转发管理-添加',3,0,1659079777164),(37,4,'编辑','编辑','编辑','转发管理-编辑',3,0,1659079777164),(38,4,'删除','删除','删除','转发管理-删除',3,0,1659079777164),(39,5,'添加','添加','添加','数据来源管理-添加',3,0,1659079777164),(40,5,'编辑','编辑','编辑','数据来源管理-编辑',3,0,1659079777164),(41,5,'删除','删除','删除','数据来源管理-删除',3,0,1659079777164);
+
+/*Table structure for table `basic_role` */
+
+DROP TABLE IF EXISTS `basic_role`;
+
+CREATE TABLE `basic_role` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `role_name` varchar(100) DEFAULT NULL,
+ `description` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_menu_relation` */
+
+DROP TABLE IF EXISTS `basic_role_menu_relation`;
+
+CREATE TABLE `basic_role_menu_relation` (
+ `role_id` bigint DEFAULT NULL,
+ `menu_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_user_relation` */
+
+DROP TABLE IF EXISTS `basic_role_user_relation`;
+
+CREATE TABLE `basic_role_user_relation` (
+ `user_id` bigint DEFAULT NULL,
+ `role_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_user` */
+
+DROP TABLE IF EXISTS `basic_user`;
+
+CREATE TABLE `basic_user` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_type` int DEFAULT '0' COMMENT '0-未知,1-管理平台用户,2-普通平台用户',
+ `company_id` bigint NOT NULL,
+ `username` varchar(255) DEFAULT NULL,
+ `login_name` varchar(255) DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `password_modify_time` bigint DEFAULT NULL,
+ `salt` varchar(255) DEFAULT NULL,
+ `email` varchar(255) DEFAULT NULL,
+ `mobile_number` varchar(255) DEFAULT NULL,
+ `mfa_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `mfa_bind` int DEFAULT '0' COMMENT '用户是否绑定了mfa设备。0-未绑定,1-已绑定',
+ `last_login_time` bigint DEFAULT NULL,
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `expire_time` bigint DEFAULT '4114487556000',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_user` */
+
+insert into `basic_user`(`id`,`user_type`,`company_id`,`username`,`login_name`,`password`,`password_modify_time`,`salt`,`email`,`mobile_number`,`mfa_secret`,`mfa_bind`,`last_login_time`,`flag`,`expire_time`,`create_time`,`creator_id`,`modify_time`,`modifier_id`) values (1,1,1,'admin','admin','nVg+buw0YAs=',1670312031273,'09bc3a7898','1053492832@qq.com',NULL,NULL,0,1706177793183,0,4114487556000,4114487556000,NULL,1670312031273,NULL);
+
+/*Table structure for table `login_history` */
+
+DROP TABLE IF EXISTS `login_history`;
+
+CREATE TABLE `login_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_id` bigint DEFAULT NULL,
+ `request_ip` varchar(255) DEFAULT NULL,
+ `login_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `worker_node` */
+
+DROP TABLE IF EXISTS `worker_node`;
+
+CREATE TABLE `worker_node` (
+ `ID` bigint NOT NULL AUTO_INCREMENT COMMENT 'auto increment id',
+ `HOST_NAME` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'host name',
+ `PORT` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'port',
+ `TYPE` int NOT NULL COMMENT 'node type: ACTUAL or CONTAINER',
+ `LAUNCH_DATE` date NOT NULL COMMENT 'launch date',
+ `MODIFIED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'modified time',
+ `CREATED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created time',
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='DB WorkerID Assigner for UID Generator';
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
diff --git a/document/start.sh b/document/start.sh
new file mode 100644
index 0000000..282cc1e
--- /dev/null
+++ b/document/start.sh
@@ -0,0 +1,30 @@
+#! /bin/sh
+#启动方法
+start(){
+now=`date "+%Y%m%d%H%M%S"`
+cd /home/dongjian-center-admin/back/server/run && nohup /usr/local/java/jdk1.8.0_221/bin/java -server -Xms256m -Xmx256m -jar /home/dongjian-center-admin/back/server/run/dongjian-center-admin-controller-0.0.1-SNAPSHOT.jar > /dev/null 2>boot.log &
+}
+#停止方法
+stop(){
+ ps -ef|grep java|grep dongjian-center-admin-controller-0.0.1-SNAPSHOT.jar|awk '{print $2}'|while read pid
+ do
+ kill -9 $pid
+ done
+}
+
+case "$1" in
+start)
+start
+;;
+stop)
+stop
+;;
+restart)
+stop
+start
+;;
+*)
+printf 'Usage: %s {start|stop|restart}\n' "$prog"
+exit 1
+;;
+esac
\ No newline at end of file
diff --git a/document/update.sh b/document/update.sh
new file mode 100644
index 0000000..d21a756
--- /dev/null
+++ b/document/update.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+projectName=dongjian-center-admin
+backFilePath=/home/$projectName/back/server
+
+basepath=$(cd `dirname $0`; pwd)
+cd $basepath
+
+echo "start for Web"
+
+rm -rf $backFilePath/run/lib
+unzip -o $backFilePath/$projectName.zip -d $backFilePath/run
+\cp -r $backFilePath/run/$projectName/* $backFilePath/run/
+rm -rf $backFilePath/run/$projectName
+
+sh start.sh restart
+exit
\ No newline at end of file
diff --git a/dongjian-center-admin-common/.gitignore b/dongjian-center-admin-common/.gitignore
new file mode 100644
index 0000000..aa23915
--- /dev/null
+++ b/dongjian-center-admin-common/.gitignore
@@ -0,0 +1,15 @@
+/target/
+/logs/
+/.idea/
+*.iml
+*.bak
+*.log
+/.settings/
+*.project
+*.classpath
+*.factorypath
+*.springBeans
+/.apt_generated/
+/.externalToolBuilders/
+/bin/
+application-*.properties
diff --git a/dongjian-center-admin-common/pom.xml b/dongjian-center-admin-common/pom.xml
new file mode 100644
index 0000000..70d2d9a
--- /dev/null
+++ b/dongjian-center-admin-common/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+ com.techsor
+ dongjian-center-admin
+ 0.0.1-SNAPSHOT
+
+ dongjian-center-admin-common
+ dongjian-center-admin-common
+ http://maven.apache.org
+
+ UTF-8
+
+
+
+ junit
+ junit
+ test
+
+
+
+ com.techsor
+ dongjian-center-admin-dao
+ 0.0.1-SNAPSHOT
+
+
+ com.techsor
+ dongjian-center-admin-util
+ 0.0.1-SNAPSHOT
+
+
+
+
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/Constants.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/Constants.java
new file mode 100644
index 0000000..3a13551
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/Constants.java
@@ -0,0 +1,29 @@
+package com.dongjian.datacenter.admin.common;
+/**
+* @author Mr.Jiang
+* @time 2022年5月20日 下午2:01:41
+*/
+public class Constants {
+
+ //这个很重要,不要随便动
+ public static final String DES_SALT = "ci3b512jwy199511";
+
+ public static final String APP_NAME = "dongjian_datacenter_admin:";
+
+ public static final int LOGIN_ATTEMPTS = 5;
+ public static final long LOGIN_LOCK_PERIOD = 3600000;//ms
+ public static final String LOGIN_FAIL = APP_NAME + "login_fail:%s";// 失败次数,过期时间为1小时
+ public static final String LOGIN_LOCK = APP_NAME + "login_lock:%s";// 锁定标志,值为 true,过期时间为1小时
+
+ //用户ID,登录名,企业ID,token
+ public static final String ACCESS_TOKEN_FORMAT = APP_NAME + "RequestHeader:AccessToken:{0}:{1}:{2}:{3}";
+
+ public static final String CAPTCHA_VERIFICATION = APP_NAME + "CAPTCHA:VERIFICATION:";
+
+ public static final String AURORA_URL_FORMAT ="jdbc:mysql://{0}:3306/third?useUnicode=true&characterEncoding=UTF-8&useSSL=false";
+
+ public final static String DATA_TABLE_NAME = "rawData";
+
+ public static final String MOUNT_DIR = "/home/third-admin/mount";
+
+}
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/exception/BusinessException.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/exception/BusinessException.java
new file mode 100644
index 0000000..c0dcaa5
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/exception/BusinessException.java
@@ -0,0 +1,36 @@
+package com.dongjian.datacenter.admin.common.exception;
+
+/**
+ * 业务异常处理
+ *
+ */
+public class BusinessException extends RuntimeException{
+
+ /**
+ * 实例化一个新的业务异常
+ *
+ * @param msg 异常信息
+ */
+ public BusinessException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * 实例化一个新的业务异常
+ *
+ * @param cause 异常原因
+ */
+ public BusinessException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * 实例化一个新的业务异常
+ *
+ * @param msg 异常信息
+ * @param cause 异常原因
+ */
+ public BusinessException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+}
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/exception/MsgCodeException.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/exception/MsgCodeException.java
new file mode 100644
index 0000000..3ad4f42
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/exception/MsgCodeException.java
@@ -0,0 +1,26 @@
+package com.dongjian.datacenter.admin.common.exception;
+
+/**
+ *
+ * @author jwy-style
+ *
+ */
+public class MsgCodeException extends RuntimeException{
+
+ private String message;
+
+ public MsgCodeException(String message) {
+ super(message);
+ this.message = message;
+ }
+
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+}
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/PropertySourceYumFactory.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/PropertySourceYumFactory.java
new file mode 100644
index 0000000..d6eafc4
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/PropertySourceYumFactory.java
@@ -0,0 +1,26 @@
+package com.dongjian.datacenter.admin.common.language;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.springframework.boot.env.YamlPropertySourceLoader;
+import org.springframework.core.env.PropertySource;
+import org.springframework.core.io.support.DefaultPropertySourceFactory;
+import org.springframework.core.io.support.EncodedResource;
+
+/**
+ * @PropertySource 解析.yum文件需要指定该工厂
+ */
+public class PropertySourceYumFactory extends DefaultPropertySourceFactory {
+
+ @Override
+ public PropertySource> createPropertySource(String name, EncodedResource resource) throws IOException {
+ if (resource == null) {
+ return super.createPropertySource(name, resource);
+ }
+ List> sources = new YamlPropertySourceLoader().load(resource.getResource().getFilename(), resource.getResource());
+ return sources.get(0);
+ }
+
+
+}
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/MsgLanguageChange.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/MsgLanguageChange.java
new file mode 100644
index 0000000..d05556d
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/MsgLanguageChange.java
@@ -0,0 +1,38 @@
+package com.dongjian.datacenter.admin.common.language.msg;
+
+import org.apache.commons.collections.MapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class MsgLanguageChange {
+ @Autowired
+ private Msg_EN msgEn;
+ @Autowired
+ private Msg_CN msgCn;
+ @Autowired
+ private Msg_JP msgJp;
+
+ /**
+ * 参数映射
+ * @param languaType
+ * @param code
+ * @return
+ */
+ public String getParameterMapByCode(Integer languaType,String code){
+ String msg = null;
+ if(null != languaType){
+ if(languaType == 0){//中文
+ msg = MapUtils.getString(msgCn.getParameterMap(), code, code);
+ }else if(languaType == 1){//英文
+ msg = MapUtils.getString(msgEn.getParameterMap(), code, code);
+ }else if(languaType == 2){//日语
+ msg = MapUtils.getString(msgJp.getParameterMap(), code, code);
+ }
+ }else{
+ msg = MapUtils.getString(msgJp.getParameterMap(), code, code);
+ }
+ return msg;
+ }
+
+}
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_CN.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_CN.java
new file mode 100644
index 0000000..c037b60
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_CN.java
@@ -0,0 +1,25 @@
+package com.dongjian.datacenter.admin.common.language.msg;
+
+import java.util.Map;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+import com.dongjian.datacenter.admin.common.language.PropertySourceYumFactory;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+@Component
+@PropertySource(value = "classpath:/config/language/msg/msg_cn.yml", encoding = "UTF-8", factory = PropertySourceYumFactory.class)
+@ConfigurationProperties(prefix = "msgcn")
+public class Msg_CN {
+
+ private Map parameterMap;
+
+ private Map reportMap;
+
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_EN.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_EN.java
new file mode 100644
index 0000000..2b7a34d
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_EN.java
@@ -0,0 +1,25 @@
+package com.dongjian.datacenter.admin.common.language.msg;
+
+import java.util.Map;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+import com.dongjian.datacenter.admin.common.language.PropertySourceYumFactory;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+@Component
+@PropertySource(value = "classpath:/config/language/msg/msg_en.yml", encoding = "UTF-8", factory = PropertySourceYumFactory.class)
+@ConfigurationProperties(prefix = "msgen")
+public class Msg_EN {
+
+ private Map parameterMap;
+
+ private Map reportMap;
+
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_JP.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_JP.java
new file mode 100644
index 0000000..875e863
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/language/msg/Msg_JP.java
@@ -0,0 +1,25 @@
+package com.dongjian.datacenter.admin.common.language.msg;
+
+import java.util.Map;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+import com.dongjian.datacenter.admin.common.language.PropertySourceYumFactory;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+@Component
+@PropertySource(value = "classpath:/config/language/msg/msg_jp.yml", encoding = "UTF-8", factory = PropertySourceYumFactory.class)
+@ConfigurationProperties(prefix = "msgjp")
+public class Msg_JP {
+
+ private Map parameterMap;
+
+ private Map reportMap;
+
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/BaseResponse.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/BaseResponse.java
new file mode 100644
index 0000000..a361eb5
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/BaseResponse.java
@@ -0,0 +1,51 @@
+package com.dongjian.datacenter.admin.common.response;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+
+/**
+ *
+ * @author jwy-style
+ *
+ */
+public class BaseResponse {
+ /**
+ * 返回码
+ */
+ @Schema(description = "状态码, 0或者200表示成功",example = "0")
+ private int code;
+ /**
+ * 提示信息
+ */
+ @Schema(description = "简单的提示信息",example = "服务器错误")
+ private String msg = "success";
+
+ public BaseResponse() {
+
+ }
+
+ public BaseResponse(int code) {
+ this.code = code;
+ }
+
+ public BaseResponse(int code, String msg) {
+ this.code = code;
+ this.msg = msg;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+}
+
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/PageInfo.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/PageInfo.java
new file mode 100644
index 0000000..2f80c8a
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/PageInfo.java
@@ -0,0 +1,401 @@
+package com.dongjian.datacenter.admin.common.response;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageSerializable;
+
+/**
+ * 对Page结果进行包装
+ *
+ * 新增分页的多项属性,主要参考:http://bbs.csdn.net/topics/360010907
+ *
+ * @author liuzh/abel533/isea533
+ * @version 3.3.0
+ * @since 3.2.2
+ * 项目地址 : http://git.oschina.net/free/Mybatis_PageHelper
+ */
+@SuppressWarnings({"rawtypes", "unchecked"})
+public class PageInfo extends PageSerializable {
+ public static final int DEFAULT_NAVIGATE_PAGES = 8;
+ public static final PageInfo EMPTY = new PageInfo(Collections.emptyList(), 0);
+ /**
+ * 当前页
+ */
+ private int pageNum;
+ /**
+ * 每页的数量
+ */
+ private int pageSize;
+ /**
+ * 当前页的数量
+ */
+ private int size;
+
+ /**
+ * 由于startRow和endRow不常用,这里说个具体的用法
+ * 可以在页面中"显示startRow到endRow 共size条数据"
+ * 当前页面第一个元素在数据库中的行号
+ */
+ private long startRow;
+ /**
+ * 当前页面最后一个元素在数据库中的行号
+ */
+ private long endRow;
+ /**
+ * 总页数
+ */
+ private int pages;
+ /**
+ * 前一页
+ */
+ private int prePage;
+ /**
+ * 下一页
+ */
+ private int nextPage;
+
+ /**
+ * 是否为第一页
+ */
+ private boolean isFirstPage = false;
+ /**
+ * 是否为最后一页
+ */
+ private boolean isLastPage = false;
+ /**
+ * 是否有前一页
+ */
+ private boolean hasPreviousPage = false;
+ /**
+ * 是否有下一页
+ */
+ private boolean hasNextPage = false;
+
+ /**
+ * 导航页码数
+ */
+ private int navigatePages;
+ /**
+ * 所有导航页号
+ */
+ private int[] navigatepageNums;
+ /**
+ * 导航条上的第一页
+ */
+ private int navigateFirstPage;
+ /**
+ * 导航条上的最后一页
+ */
+ private int navigateLastPage;
+
+ public PageInfo() {
+ }
+
+ /**
+ * 包装Page对象
+ *
+ * @param list
+ */
+ public PageInfo(List extends T> list) {
+ this(list, DEFAULT_NAVIGATE_PAGES);
+ }
+
+ /**
+ * 包装Page对象
+ *
+ * @param list page结果
+ * @param navigatePages 页码数量
+ */
+ public PageInfo(List extends T> list, int navigatePages) {
+ super(list);
+ if (list instanceof Page) {
+ Page page = (Page) list;
+ this.pageNum = page.getPageNum();
+ this.pageSize = page.getPageSize();
+
+ this.pages = page.getPages();
+ this.size = page.size();
+ //由于结果是>startRow的,所以实际的需要+1
+ if (this.size == 0) {
+ this.startRow = 0;
+ this.endRow = 0;
+ } else {
+ this.startRow = page.getStartRow() + 1;
+ //计算实际的endRow(最后一页的时候特殊)
+ this.endRow = this.startRow - 1 + this.size;
+ }
+ } else if (list instanceof Collection) {
+ this.pageNum = 1;
+ this.pageSize = list.size();
+
+ this.pages = this.pageSize > 0 ? 1 : 0;
+ this.size = list.size();
+ this.startRow = 0;
+ this.endRow = list.size() > 0 ? list.size() - 1 : 0;
+ }
+ if (list instanceof Collection) {
+ calcByNavigatePages(navigatePages);
+ }
+ }
+
+ public static PageInfo of(List extends T> list) {
+ return new PageInfo(list);
+ }
+
+ public static PageInfo of(List extends T> list, int navigatePages) {
+ return new PageInfo(list, navigatePages);
+ }
+
+ /**
+ * 返回一个空的 Pageinfo 对象
+ *
+ * @return
+ */
+ public static PageInfo emptyPageInfo() {
+ return EMPTY;
+ }
+
+ public void calcByNavigatePages(int navigatePages) {
+ setNavigatePages(navigatePages);
+ //计算导航页
+ calcNavigatepageNums();
+ //计算前后页,第一页,最后一页
+ calcPage();
+ //判断页面边界
+ judgePageBoudary();
+ }
+
+ /**
+ * 计算导航页
+ */
+ private void calcNavigatepageNums() {
+ //当总页数小于或等于导航页码数时
+ if (pages <= navigatePages) {
+ navigatepageNums = new int[pages];
+ for (int i = 0; i < pages; i++) {
+ navigatepageNums[i] = i + 1;
+ }
+ } else { //当总页数大于导航页码数时
+ navigatepageNums = new int[navigatePages];
+ int startNum = pageNum - navigatePages / 2;
+ int endNum = pageNum + navigatePages / 2;
+
+ if (startNum < 1) {
+ startNum = 1;
+ //(最前navigatePages页
+ for (int i = 0; i < navigatePages; i++) {
+ navigatepageNums[i] = startNum++;
+ }
+ } else if (endNum > pages) {
+ endNum = pages;
+ //最后navigatePages页
+ for (int i = navigatePages - 1; i >= 0; i--) {
+ navigatepageNums[i] = endNum--;
+ }
+ } else {
+ //所有中间页
+ for (int i = 0; i < navigatePages; i++) {
+ navigatepageNums[i] = startNum++;
+ }
+ }
+ }
+ }
+
+ /**
+ * 计算前后页,第一页,最后一页
+ */
+ private void calcPage() {
+ if (navigatepageNums != null && navigatepageNums.length > 0) {
+ navigateFirstPage = navigatepageNums[0];
+ navigateLastPage = navigatepageNums[navigatepageNums.length - 1];
+ if (pageNum > 1) {
+ prePage = pageNum - 1;
+ }
+ if (pageNum < pages) {
+ nextPage = pageNum + 1;
+ }
+ }
+ }
+
+ /**
+ * 判定页面边界
+ */
+ private void judgePageBoudary() {
+ isFirstPage = pageNum == 1;
+ isLastPage = pageNum == pages || pages == 0;
+ hasPreviousPage = pageNum > 1;
+ hasNextPage = pageNum < pages;
+ }
+
+ /**
+ * 是否包含内容
+ */
+ public boolean hasContent() {
+ return this.size > 0;
+ }
+
+ public int getPageNum() {
+ return pageNum;
+ }
+
+ public void setPageNum(int pageNum) {
+ this.pageNum = pageNum;
+ }
+
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ public int getSize() {
+ return size;
+ }
+
+ public void setSize(int size) {
+ this.size = size;
+ }
+
+ public long getStartRow() {
+ return startRow;
+ }
+
+ public void setStartRow(long startRow) {
+ this.startRow = startRow;
+ }
+
+ public long getEndRow() {
+ return endRow;
+ }
+
+ public void setEndRow(long endRow) {
+ this.endRow = endRow;
+ }
+
+ public int getPages() {
+ return pages;
+ }
+
+ public void setPages(int pages) {
+ this.pages = pages;
+ }
+
+ public int getPrePage() {
+ return prePage;
+ }
+
+ public void setPrePage(int prePage) {
+ this.prePage = prePage;
+ }
+
+ public int getNextPage() {
+ return nextPage;
+ }
+
+ public void setNextPage(int nextPage) {
+ this.nextPage = nextPage;
+ }
+
+ public boolean isIsFirstPage() {
+ return isFirstPage;
+ }
+
+ public void setIsFirstPage(boolean isFirstPage) {
+ this.isFirstPage = isFirstPage;
+ }
+
+ public boolean isIsLastPage() {
+ return isLastPage;
+ }
+
+ public void setIsLastPage(boolean isLastPage) {
+ this.isLastPage = isLastPage;
+ }
+
+ public boolean isHasPreviousPage() {
+ return hasPreviousPage;
+ }
+
+ public void setHasPreviousPage(boolean hasPreviousPage) {
+ this.hasPreviousPage = hasPreviousPage;
+ }
+
+ public boolean isHasNextPage() {
+ return hasNextPage;
+ }
+
+ public void setHasNextPage(boolean hasNextPage) {
+ this.hasNextPage = hasNextPage;
+ }
+
+ public int getNavigatePages() {
+ return navigatePages;
+ }
+
+ public void setNavigatePages(int navigatePages) {
+ this.navigatePages = navigatePages;
+ }
+
+ public int[] getNavigatepageNums() {
+ return navigatepageNums;
+ }
+
+ public void setNavigatepageNums(int[] navigatepageNums) {
+ this.navigatepageNums = navigatepageNums;
+ }
+
+ public int getNavigateFirstPage() {
+ return navigateFirstPage;
+ }
+
+ public int getNavigateLastPage() {
+ return navigateLastPage;
+ }
+
+ public void setNavigateFirstPage(int navigateFirstPage) {
+ this.navigateFirstPage = navigateFirstPage;
+ }
+
+ public void setNavigateLastPage(int navigateLastPage) {
+ this.navigateLastPage = navigateLastPage;
+ }
+
+ @Override
+ public String toString() {
+ final StringBuilder sb = new StringBuilder("PageInfo{");
+ sb.append("pageNum=").append(pageNum);
+ sb.append(", pageSize=").append(pageSize);
+ sb.append(", size=").append(size);
+ sb.append(", startRow=").append(startRow);
+ sb.append(", endRow=").append(endRow);
+ sb.append(", total=").append(total);
+ sb.append(", pages=").append(pages);
+ sb.append(", list=").append(list);
+ sb.append(", prePage=").append(prePage);
+ sb.append(", nextPage=").append(nextPage);
+ sb.append(", isFirstPage=").append(isFirstPage);
+ sb.append(", isLastPage=").append(isLastPage);
+ sb.append(", hasPreviousPage=").append(hasPreviousPage);
+ sb.append(", hasNextPage=").append(hasNextPage);
+ sb.append(", navigatePages=").append(navigatePages);
+ sb.append(", navigateFirstPage=").append(navigateFirstPage);
+ sb.append(", navigateLastPage=").append(navigateLastPage);
+ sb.append(", navigatepageNums=");
+ if (navigatepageNums == null) {
+ sb.append("null");
+ } else {
+ sb.append('[');
+ for (int i = 0; i < navigatepageNums.length; ++i) {
+ sb.append(i == 0 ? "" : ", ").append(navigatepageNums[i]);
+ }
+ sb.append(']');
+ }
+ sb.append('}');
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/PageResponse.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/PageResponse.java
new file mode 100644
index 0000000..7319045
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/PageResponse.java
@@ -0,0 +1,66 @@
+package com.dongjian.datacenter.admin.common.response;
+
+import com.github.pagehelper.PageInfo;
+
+import java.util.Map;
+
+/**
+ *
+ * @author jwy-style
+ *
+ * @param
+ */
+public class PageResponse extends BaseResponse{
+ /**
+ * 对象信息
+ */
+ private T data;
+
+ private Map errorMap;
+
+ public PageResponse() {
+ }
+
+ public PageResponse(int code) {
+ super(code);
+ }
+
+ public PageResponse(int code, String msg) {
+ super(code, msg);
+ }
+
+ public PageResponse(int code,String msg,Map errorMap){
+ super(code, msg);
+ this.errorMap = errorMap;
+ }
+
+ public static PageResponse success(Object data){
+ PageResponse pageResponse = new PageResponse();
+ pageResponse.setData((PageInfo) data);
+ pageResponse.setCode(ResponseCode.SUCCESS);
+ pageResponse.setMsg("success");
+ return pageResponse;
+ }
+
+
+ public Map getErrorMap() {
+ return errorMap;
+ }
+
+ public void setErrorMap(Map errorMap) {
+ this.errorMap = errorMap;
+ }
+
+ public T getData() {
+ return data;
+ }
+
+ public void setData(T data) {
+ this.data = data;
+ }
+
+
+
+
+
+}
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/ResponseCode.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/ResponseCode.java
new file mode 100644
index 0000000..425dbca
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/ResponseCode.java
@@ -0,0 +1,32 @@
+package com.dongjian.datacenter.admin.common.response;
+
+/**
+ *
+ * @author jwy-style
+ *
+ */
+public class ResponseCode {
+
+ /** 成功 */
+ public static final int OK = 0;
+ /**
+ * 请求已成功,请求所希望的响应头或数据体将随此响应返回。
+ */
+ public static final int SUCCESS = 200;
+
+ //鉴权不通过
+ public static final int AUTHORIZE_FAILED = 401;
+
+ //服务器内部错误
+ public static final int SERVER_ERROR = 500;
+ public static final String SERVER_ERROR_MSG = "service error";
+
+ /** 系统错误 */
+ public static final int SYSTEM_ERROR = 20000;
+ //
+ public static final int MSG_ERROR = 20001;
+
+ public static final int MSG_DATA_NULL_ERROR = 20002;
+
+ public static final int MSG_DATA_ERROR = 20003;
+}
diff --git a/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/SimpleDataResponse.java b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/SimpleDataResponse.java
new file mode 100644
index 0000000..24637d7
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/java/com/dongjian/datacenter/admin/common/response/SimpleDataResponse.java
@@ -0,0 +1,104 @@
+package com.dongjian.datacenter.admin.common.response;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+
+import java.util.Map;
+
+/**
+ *
+ * @author jwy-style
+ *
+ * @param
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class SimpleDataResponse extends BaseResponse {
+ /**
+ * 单个对象
+ */
+ @Schema(description = "返回的数据",example = "object")
+ private T data;
+
+ /**
+ * The parameters Error map.
+ */
+ @Schema(description = "复杂的提示信息",example = "{\"name\":\"长度过长\",\"age\":\"年龄太大\",\"weight\":\"体重超标\"}")
+ private Map errorMap;
+
+ public SimpleDataResponse() {
+ super();
+ }
+
+ public SimpleDataResponse(int code) {
+ super(code);
+ }
+
+ public SimpleDataResponse(int code, String msg) {
+ super(code, msg);
+ }
+
+ /**
+ * 响应结果,携带错误Map
+ * @param code
+ * @param msg
+ * @param errorMap
+ */
+ public SimpleDataResponse(int code, String msg, Map errorMap) {
+ this(code, msg);
+ this.errorMap = errorMap;
+ }
+
+ /**
+ * 成功响应
+ * @return
+ */
+ public static SimpleDataResponse success(){
+ return new SimpleDataResponse(ResponseCode.SUCCESS,"Success");
+ }
+
+ /**
+ * 多条数据,成功响应
+ * @param rows
+ * @return
+ */
+ public static SimpleDataResponse success(int rows){
+ return new SimpleDataResponse(ResponseCode.SUCCESS,"Success: "+rows);
+ }
+
+ /**
+ * 成功响应,携带数据对象返回
+ * @param data
+ * @return
+ */
+ public static SimpleDataResponse success(Object data){
+ SimpleDataResponse comm = success();
+ comm.setData(data);
+ return comm;
+ }
+
+
+ public static SimpleDataResponse fail(int code,String message){
+ return new SimpleDataResponse(code,message);
+ }
+ public static SimpleDataResponse fail(int code,String message,Object data){
+ SimpleDataResponse simpleDataResponse= new SimpleDataResponse(code,message);
+ simpleDataResponse.setData(data);
+ return simpleDataResponse;
+ }
+ public T getData() {
+ return data;
+ }
+
+ public void setData(T data) {
+ this.data = data;
+ }
+
+ public Map getErrorMap() {
+ return errorMap;
+ }
+
+ public void setErrorMap(Map errorMap) {
+ this.errorMap = errorMap;
+ }
+}
diff --git a/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_cn.yml b/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_cn.yml
new file mode 100644
index 0000000..e19c9a8
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_cn.yml
@@ -0,0 +1,60 @@
+msgcn:
+ parameterMap:
+ serviceError: 内部服务错误
+ tokenError: 接口鉴权失败
+ excelEmpty: 表格为空
+ lineNum: 第{0}行:
+ paramsFormatError: 参数格式错误
+ verifCodeExpired: 验证码过期
+ verifCodeError: 验证码错误
+ accountExpired: 该账号已过期
+ pwdError: 密码错误
+ userNotExist: 用户不存在
+ noOperationAuth: 无操作权限
+ projectNameHasExisted: 项目名称已存在
+ projectNameDoesNotExist: 项目名称不存在
+ buildingNameHasExisted: 楼宇名称已存在
+ buildingNameDoesNotExist: 楼宇名称不存在
+ floorNameHasExisted: 楼层名称已存在
+ floorNameDoesNotExist: 楼层名称不存在
+ buildingNotFound: 不存在该楼宇
+ fbNotSameCompany: 需与楼宇归属于同一企业
+ spaceNameHasExisted: 房间名称已存在
+ floorNotFound: 不存在该楼层
+ rfNotSameCompany: 需与楼层归属于同一企业
+ assetNameHasExisted: 资产名称已存在
+ assetSymbolHasExisted: 资产记号已存在
+ assetNameDoesNotExist: 资产名称不存在
+ assetSymbolDoesNotExist: 资产记号不存在
+ spaceNotFound: 不存在该房间
+ faNotSameCompany: 需与房间归属于同一企业
+ bindedDevice: 绑定了设备
+ deviceTypeNotExist: 设备类型不存在
+ excelBuildingLineDuplicate: 表格内存在相同的数据
+ dbBuildingDuplicate: 平台已存在此楼宇
+ dbFloorDuplicate: 平台已存在此楼层
+ dbSpaceDuplicate: 平台已存在此房间
+ dbAssetDuplicate: 平台已存在此资产
+ excelCompanyNameIsNull: 需填写企业名称
+ excelBuildingNameIsNull: 需填写楼宇
+ excelFloorNameIsNull: 需填写楼层
+ excelSpaceNameIsNull: 需填写房间
+ excelSpaceOrFloorNameIsNull: 需填写楼层和房间
+ excelCompanyNameNotExist: 平台不存在此企业名称
+ userOrEmailNotExist: 用户名或邮箱不存在
+ companyNameHasExisted: 平台已存在此企业
+ taowaComapny: 不可使用下级企业作为父企业
+ hasSubsidiary: 删除的企业拥有下级企业,需先处理下级企业
+ roleNameExist: 角色名已存在
+ roleHasBinded: 角色已绑定用户,请先解绑再删除
+ loginNameOrEmailHasExisted: 用户名或邮箱已被使用
+ mailAddUserPwdSubject: 新建账号密码
+ mailAddUserPwdContentAdmin: 'アカウント {0} のパスワードは {1} お忘れにならないようにお願いします。 ログインWebアドレス:{2} '
+ mailAddUserPwdContent: '{0} このたびは、データ管理プラットフォームへのご登録、誠にありがとうございます。 下記の通り、アカウントが発行されましたのでご案内いたします。 ------------------------------------------------- ユーザー名(ID):{1} 初期パスワード:{2} ------------------------------------------------- ログインはこちらから: 【2D3DWebログインURL】:{3} 【データ管理プラットフォームURL】:{4} ご不明な点がございましたら、お気軽にサポートまでお問い合わせください。 ------------------------------- 株式会社テクサー サポート窓口: support@techsor.co.jp -------------------------------'
+ mailResetUserPwdSubject: 重置账号密码
+ pwdFormatError: 密码组成必须包含数字、英文字母、特殊符号(~!@#$%^&*)且大于等于12位
+ oldPwdError: 旧密码错误
+ newPwdSameOld: 新密码不得与旧密码相同
+ companyLimit: 最多可创建15个企业
+ consecutiveLoginFail: 登录失败次数过多,请等待{0}分{1}秒后再登录
+ loginFailCount: 已登录失败{0}次,剩余尝试登录次数:{1}
\ No newline at end of file
diff --git a/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_en.yml b/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_en.yml
new file mode 100644
index 0000000..6a3d5ad
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_en.yml
@@ -0,0 +1,60 @@
+msgen:
+ parameterMap:
+ serviceError: Internal service error.
+ tokenError: API authentication failed.
+ excelEmpty: The spreadsheet is empty.
+ lineNum: "Lines {0}:"
+ paramsFormatError: Parameter format error.
+ verifCodeExpired: Verification code expired.
+ verifCodeError: Verification code error.
+ accountExpired: The account has expired.
+ pwdError: Password error.
+ userNotExist: User does not exist.
+ noOperationAuth: No operation permission.
+ projectNameHasExisted: Project name already exists.
+ projectNameDoesNotExist: Project name does not exist.
+ buildingNameHasExisted: Building name already exists.
+ buildingNameDoesNotExist: Building name does not exist.
+ floorNameHasExisted: Floor name already exists.
+ floorNameDoesNotExist: Floor name does not exist.
+ buildingNotFound: Building not found.
+ fbNotSameCompany: Must belong to the same company as the building.
+ spaceNameHasExisted: Room name already exists.
+ floorNotFound: Floor not found.
+ rfNotSameCompany: Must belong to the same company as the floor.
+ assetNameHasExisted: Asset name already exists.
+ assetSymbolHasExisted: Asset symbol already exists.
+ assetNameDoesNotExist: Asset name does not exist.
+ assetSymbolDoesNotExist: 资产记号不存在
+ spaceNotFound: Room not found.
+ faNotSameCompany: Must belong to the same company as the room.
+ bindedDevice: Device is bound.
+ deviceTypeNotExist: Device type does not exist.
+ excelBuildingLineDuplicate: Duplicate data exists in the spreadsheet.
+ dbBuildingDuplicate: This building already exists on the platform.
+ dbFloorDuplicate: 平台已存在此楼层
+ dbSpaceDuplicate: 平台已存在此房间
+ dbAssetDuplicate: 平台已存在此资产
+ excelCompanyNameIsNull: Company name needs to be filled out.
+ excelBuildingNameIsNull: Building name needs to be filled out.
+ excelFloorNameIsNull: 需填写楼层
+ excelSpaceNameIsNull: 需填写房间
+ excelSpaceOrFloorNameIsNull: 需填写楼层和房间
+ excelCompanyNameNotExist: The platform does not have this company name.
+ userOrEmailNotExist: 用户名或邮箱不存在
+ companyNameHasExisted: 平台已存在此企业
+ taowaComapny: 不可使用下级企业作为父企业
+ hasSubsidiary: 删除的企业拥有下级企业,需先处理下级企业
+ roleNameExist: 角色名已存在
+ roleHasBinded: 角色已绑定用户,请先解绑再删除
+ loginNameOrEmailHasExisted: 用户名或邮箱已被使用
+ mailAddUserPwdSubject: 新建账号密码
+ mailAddUserPwdContentAdmin: 'アカウント {0} のパスワードは {1} お忘れにならないようにお願いします。 ログインWebアドレス:{2} '
+ mailAddUserPwdContent: '{0} このたびは、データ管理プラットフォームへのご登録、誠にありがとうございます。 下記の通り、アカウントが発行されましたのでご案内いたします。 ------------------------------------------------- ユーザー名(ID):{1} 初期パスワード:{2} ------------------------------------------------- ログインはこちらから: 【2D3DWebログインURL】:{3} 【データ管理プラットフォームURL】:{4} ご不明な点がございましたら、お気軽にサポートまでお問い合わせください。 ------------------------------- 株式会社テクサー サポート窓口: support@techsor.co.jp -------------------------------'
+ mailResetUserPwdSubject: 重置账号密码
+ pwdFormatError: 密码组成必须包含数字、英文字母、特殊符号(~!@#$%^&*)且大于等于12位
+ oldPwdError: 旧密码错误
+ newPwdSameOld: 新密码不得与旧密码相同
+ companyLimit: 最多可创建15个企业
+ consecutiveLoginFail: Too many failed login attempts. Please wait {0} minute(s) and {1} second(s) before trying again.
+ loginFailCount: Login failed {0} times. Remaining login attempts:{1}.
\ No newline at end of file
diff --git a/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_jp.yml b/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_jp.yml
new file mode 100644
index 0000000..17a7015
--- /dev/null
+++ b/dongjian-center-admin-common/src/main/resources/config/language/msg/msg_jp.yml
@@ -0,0 +1,60 @@
+msgjp:
+ parameterMap:
+ serviceError: 内部サービスのエラー
+ tokenError: インターフェイスの認証に失敗
+ excelEmpty: フォームが空になっている
+ lineNum: 行{0}:
+ paramsFormatError: パラメータのフォーマットエラー
+ verifCodeExpired: 確認コード期限切れ
+ verifCodeError: 確認コードエラー
+ accountExpired: アカウントの有効期限が切れている
+ pwdError: パスワードエラー
+ userNotExist: ユーザーが存在しない
+ noOperationAuth: 操作権限なし
+ projectNameHasExisted: プロジェクト名がすでにある
+ projectNameDoesNotExist: プロジェクト名がない
+ buildingNameHasExisted: 該当ビル名がすでにある
+ buildingNameDoesNotExist: 該当ビル名がない
+ floorNameHasExisted: 該当フロア名がすでにある
+ floorNameDoesNotExist: 該当フロア名がない
+ buildingNotFound: 該当ビルがない
+ fbNotSameCompany: ビルと同じ会社に所属してください
+ spaceNameHasExisted: 該当部屋名がすでにある
+ floorNotFound: 該当フロア名がない
+ rfNotSameCompany: フロアと同じ会社に所属してください
+ assetNameHasExisted: 該当資産名がすでにある
+ assetSymbolHasExisted: 記号はすでに存在します
+ assetNameDoesNotExist: 該当資産名がない
+ assetSymbolDoesNotExist: 資産記号が存在しません
+ spaceNotFound: 該当部屋がない
+ faNotSameCompany: 部屋と同じ会社に所属してください
+ bindedDevice: デバイスと関連付け
+ deviceTypeNotExist: デバイスタイプがない
+ excelBuildingLineDuplicate: テーブルに同じデータがある
+ dbBuildingDuplicate: プラットフォームにすでに該当ビルがない
+ dbFloorDuplicate: プラットフォームには既にこのフロアが存在しています。
+ dbSpaceDuplicate: プラットフォームには既にこのスペースが存在しています。
+ dbAssetDuplicate: プラットフォームには既にこのアセットが存在しています。
+ excelCompanyNameIsNull: 会社名を入力してください
+ excelBuildingNameIsNull: ビルを入力してください
+ excelFloorNameIsNull: フロア名を入力してください。
+ excelSpaceNameIsNull: スペース名を入力してください。
+ excelSpaceOrFloorNameIsNull: フロア名とスペース名を入力してください。
+ excelCompanyNameNotExist: プラットフォーム上に該当会社名はない
+ userOrEmailNotExist: ユーザーが存在しません
+ companyNameHasExisted: 会社はすでにプラットフォーム上に存在する
+ taowaComapny: 下位の会社を親会社として利用することは不可
+ hasSubsidiary: 削除対象の会社には下位の会社があるので、先に下位の会社を対応してください
+ roleNameExist: 役割名が既に登録済み
+ roleHasBinded: 役割はユーザーにバインドされている ので、削除する前にバインドを解除してください
+ loginNameOrEmailHasExisted: ユーザー名またはメールボックスはすでに使用されています
+ mailAddUserPwdSubject: 新規アカウント・パスワードの作成
+ mailAddUserPwdContentAdmin: 'アカウント {0} のパスワードは {1} お忘れにならないようにお願いします。 ログインWebアドレス:{2} '
+ mailAddUserPwdContent: '{0} このたびは、データ管理プラットフォームへのご登録、誠にありがとうございます。 下記の通り、アカウントが発行されましたのでご案内いたします。 ------------------------------------------------- ユーザー名(ID):{1} 初期パスワード:{2} ------------------------------------------------- ログインはこちらから: 【2D3DWebログインURL】:{3} 【データ管理プラットフォームURL】:{4} ご不明な点がございましたら、お気軽にサポートまでお問い合わせください。 ------------------------------- 株式会社テクサー サポート窓口: support@techsor.co.jp -------------------------------'
+ mailResetUserPwdSubject: アカウント・パスワードのリセット
+ pwdFormatError: パスワードの構成には、数字、アルファベット、特殊文字(~!@#$%^&*) で、12桁以上
+ oldPwdError: 旧パスワードエラー
+ newPwdSameOld: 注:旧パスワードと同じものを使用しないでください
+ companyLimit: 最大15のエンタープライズを作成可能
+ consecutiveLoginFail: ログインの失敗が多すぎます。{0}分{1}秒待ってから再度ログインしてください。
+ loginFailCount: ログインに{0}回失敗しました。残りの試行回数:{1}回。
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/.gitignore b/dongjian-center-admin-controller/.gitignore
new file mode 100644
index 0000000..aa23915
--- /dev/null
+++ b/dongjian-center-admin-controller/.gitignore
@@ -0,0 +1,15 @@
+/target/
+/logs/
+/.idea/
+*.iml
+*.bak
+*.log
+/.settings/
+*.project
+*.classpath
+*.factorypath
+*.springBeans
+/.apt_generated/
+/.externalToolBuilders/
+/bin/
+application-*.properties
diff --git a/dongjian-center-admin-controller/buildPush-prod.sh b/dongjian-center-admin-controller/buildPush-prod.sh
new file mode 100644
index 0000000..eb0e79b
--- /dev/null
+++ b/dongjian-center-admin-controller/buildPush-prod.sh
@@ -0,0 +1,11 @@
+aws configure set aws_access_key_id AKIAVRXFMB43TOELSROK
+aws configure set aws_secret_access_key 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
+aws configure set default.region ap-northeast-1
+aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com
+
+docker build -t 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-admin:latest\
+ --build-arg JAR_FILE=target/dongjian-center-admin-controller-0.0.1-SNAPSHOT.jar \
+ --build-arg LIB_DIR=target/lib \
+ --build-arg CONFIG_DIR=target/config \
+ .
+docker push 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-admin:latest
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/buildPush-staging.sh b/dongjian-center-admin-controller/buildPush-staging.sh
new file mode 100644
index 0000000..393ab5e
--- /dev/null
+++ b/dongjian-center-admin-controller/buildPush-staging.sh
@@ -0,0 +1,11 @@
+aws configure set aws_access_key_id AKIA5OFH5OOZPCXZIRUQ
+aws configure set aws_secret_access_key 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
+aws configure set default.region ap-northeast-1
+aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com
+
+docker build -t 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-admin:latest\
+ --build-arg JAR_FILE=target/dongjian-center-admin-controller-0.0.1-SNAPSHOT.jar \
+ --build-arg LIB_DIR=target/lib \
+ --build-arg CONFIG_DIR=target/config \
+ .
+docker push 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-admin:latest
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/dockerfile b/dongjian-center-admin-controller/dockerfile
new file mode 100644
index 0000000..7215193
--- /dev/null
+++ b/dongjian-center-admin-controller/dockerfile
@@ -0,0 +1,70 @@
+#FROM openjdk:8-jre-alpine
+#FROM amazon-corretto-8
+#FROM amazoncorretto:11
+
+# 使用Ubuntu 20.04 LTS作为基础镜像
+# FROM ubuntu:20.04
+FROM registry.ap-northeast-1.aliyuncs.com/southwave/ubuntu2004-template:latest
+
+# 设置系统的默认编码方式为 UTF-8
+ENV LANG=en_US.UTF-8
+ENV LC_CTYPE=zh_CN.UTF-8
+
+# 设置环境变量,避免交互式安装
+ENV DEBIAN_FRONTEND=noninteractive
+
+# 更新APT软件包索引并安装必要的软件包
+RUN apt-get update && \
+ apt-get install -y \
+ curl \
+ unzip \
+ vim \
+ fontconfig \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/*
+
+# 安装Terraform
+RUN curl -fsSLk https://releases.hashicorp.com/terraform/1.7.5/terraform_1.7.5_linux_amd64.zip -o /tmp/terraform.zip && \
+ unzip /tmp/terraform.zip -d /usr/local/bin/ && \
+ rm /tmp/terraform.zip
+
+# 安装Amazon Corretto 11 JDK
+RUN curl -fsSLk https://corretto.aws/downloads/resources/11.0.22.7.1/amazon-corretto-11.0.22.7.1-linux-x64.tar.gz -o /tmp/amazon-corretto-11.tar.gz && \
+ mkdir /usr/lib/jvm/ && \
+ tar -xzvf /tmp/amazon-corretto-11.tar.gz -C /usr/lib/jvm/ && \
+ rm /tmp/amazon-corretto-11.tar.gz
+
+# 设置JAVA_HOME环境变量
+ENV JAVA_HOME=/usr/lib/jvm/amazon-corretto-11.0.22.7.1-linux-x64
+ENV PATH=$JAVA_HOME/bin:$PATH
+
+ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
+
+# 打印Terraform版本
+RUN terraform --version
+
+# 打印Java版本
+RUN java -version
+
+WORKDIR /home/data-center-admin
+
+#EXPOSE 20008
+
+# 设置时区
+#RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
+
+ARG JAR_FILE
+ARG LIB_DIR
+ARG CONFIG_DIR
+ARG AURORA_TERRAFORM
+ARG JVM_OPTS
+
+COPY ${JAR_FILE} app.jar
+COPY ${LIB_DIR} lib
+COPY ${CONFIG_DIR} config
+COPY ${AURORA_TERRAFORM} aurora_terraform
+
+#ENTRYPOINT ["java", "${JVM_OPTS}", "-jar","app.jar"]
+ENTRYPOINT java ${JVM_OPTS} -jar app.jar
+
+
diff --git a/dongjian-center-admin-controller/pom.xml b/dongjian-center-admin-controller/pom.xml
new file mode 100644
index 0000000..381f56d
--- /dev/null
+++ b/dongjian-center-admin-controller/pom.xml
@@ -0,0 +1,545 @@
+
+
+ 4.0.0
+
+ com.techsor
+ dongjian-center-admin
+ 0.0.1-SNAPSHOT
+
+ dongjian-center-admin-controller
+ dongjian-center-admin-controller
+ http://maven.apache.org
+
+ UTF-8
+
+ tokyo-build-admin
+ latest
+ ap-northeast-1
+
+ 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com
+ AKIA5OFH5OOZHM3U3KX4
+ Plkid7RDnHc1gGbp2yAv/Scc+ukI0q8vzBuyEBN2
+
+ 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com
+ AKIAVRXFMB43XVQ3GXAL
+ G0FaGcizm8FlgLxZsL+8xBwfPSzQF71294nrtE2y
+
+
+
+
+
+
+ com.techsor
+ dongjian-center-admin-service
+ 0.0.1-SNAPSHOT
+
+
+
+ com.techsor
+ dongjian-center-admin-common
+ 0.0.1-SNAPSHOT
+
+
+ junit
+ junit
+ test
+
+
+
+
+
+
+ only-package
+
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+ dongjian-center-admin
+
+ src/main/resources/assembly.xml
+
+ false
+
+
+
+ make-assembly
+ package
+
+ single
+
+
+
+
+
+
+
+
+ docker-package
+
+
+
+
+ com.google.cloud.tools
+ jib-maven-plugin
+ 3.4.5
+
+
+
+ ]]>
+ docker://registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest
+
+
+ registry.cn-shanghai.aliyuncs.com/clouddog/datacenter-admin:${aws.ecr.tag}
+
+
+ /home/dongjian-center-admin
+
+ Asia/Tokyo
+
+
+ java
+ -jar
+ ${project.build.finalName}.jar
+
+
+
+
+
+ ${project.build.directory}
+ ${project.build.finalName}.jar
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ lib/**
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ config/**
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ aurora_terraform/**
+ /home/dongjian-center-admin/
+
+
+
+
+ /home/dongjian-center-admin/lib
+ 755
+
+
+ /home/dongjian-center-admin/config
+ 755
+
+
+ /home/dongjian-center-admin/aurora_terraform
+ 755
+
+
+
+
+
+
+ package
+
+
+ dockerBuild
+
+
+
+
+
+
+
+
+ docker-aliyun
+
+
+
+
+ com.google.cloud.tools
+ jib-maven-plugin
+ 3.4.5
+
+
+
+ ]]>
+ docker://registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest
+
+
+ ${aws.ecr.registry.test}/${aws.ecr.repository}:${aws.ecr.tag}
+
+
+ /home/dongjian-center-admin
+
+ Asia/Tokyo
+
+
+ java
+ -jar
+ ${project.build.finalName}.jar
+
+
+
+
+
+ ${project.build.directory}
+ ${project.build.finalName}.jar
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ lib/**
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ config/**
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ aurora_terraform/**
+ /home/dongjian-center-admin/
+
+
+
+
+ /home/dongjian-center-admin/lib
+ 755
+
+
+ /home/dongjian-center-admin/config
+ 755
+
+
+ /home/dongjian-center-admin/aurora_terraform
+ 755
+
+
+
+
+
+
+ package
+
+
+ dockerBuild
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 3.0.0
+
+
+
+ package
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ docker-test
+
+
+
+
+ com.google.cloud.tools
+ jib-maven-plugin
+ 3.4.5
+
+
+
+ ]]>
+ docker://registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest
+
+
+ ${aws.ecr.registry.test}/${aws.ecr.repository}:${aws.ecr.tag}
+
+
+ /home/dongjian-center-admin
+
+ Asia/Tokyo
+
+
+ java
+ -jar
+ ${project.build.finalName}.jar
+
+
+
+
+
+ ${project.build.directory}
+ ${project.build.finalName}.jar
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ lib/**
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ config/**
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ aurora_terraform/**
+ /home/dongjian-center-admin/
+
+
+
+
+ /home/dongjian-center-admin/lib
+ 755
+
+
+ /home/dongjian-center-admin/config
+ 755
+
+
+ /home/dongjian-center-admin/aurora_terraform
+ 755
+
+
+
+
+
+
+ package
+
+
+ dockerBuild
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 3.0.0
+
+
+
+ package
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ docker-production
+
+
+
+
+ com.google.cloud.tools
+ jib-maven-plugin
+ 3.4.5
+
+
+
+ ]]>
+ docker://registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest
+
+
+ ${aws.ecr.registry.production}/${aws.ecr.repository}:${aws.ecr.tag}
+
+
+ /home/dongjian-center-admin
+
+ Asia/Tokyo
+
+
+ java
+ -jar
+ ${project.build.finalName}.jar
+
+
+
+
+
+ ${project.build.directory}
+ ${project.build.finalName}.jar
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ lib/**
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ config/**
+ /home/dongjian-center-admin/
+
+
+ ${project.build.directory}
+ aurora_terraform/**
+ /home/dongjian-center-admin/
+
+
+
+
+ /home/dongjian-center-admin/lib
+ 755
+
+
+ /home/dongjian-center-admin/config
+ 755
+
+
+ /home/dongjian-center-admin/aurora_terraform
+ 755
+
+
+
+
+
+
+ package
+
+ build
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 3.0.0
+
+
+
+ package
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/DongjianAdminApplication.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/DongjianAdminApplication.java
new file mode 100644
index 0000000..07f4410
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/DongjianAdminApplication.java
@@ -0,0 +1,20 @@
+package com.dongjian.datacenter.admin;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@SpringBootApplication
+//@ComponentScan({"com.dongjian.datacenter.admin"})
+@ServletComponentScan
+@EnableAsync
+@EnableScheduling
+public class DongjianAdminApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(DongjianAdminApplication.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/ApiConfig.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/ApiConfig.java
new file mode 100644
index 0000000..0f64b15
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/ApiConfig.java
@@ -0,0 +1,56 @@
+package com.dongjian.datacenter.admin.configurator;
+
+import org.springframework.boot.web.servlet.MultipartConfigFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.mobile.device.DeviceHandlerMethodArgumentResolver;
+import org.springframework.mobile.device.DeviceResolverHandlerInterceptor;
+import org.springframework.util.unit.DataSize;
+import org.springframework.web.method.support.HandlerMethodArgumentResolver;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+import com.dongjian.datacenter.admin.configurator.interceptor.AccessApiInterceptor;
+
+import jakarta.servlet.MultipartConfigElement;
+
+import java.io.File;
+import java.util.List;
+
+@Configuration
+public class ApiConfig implements WebMvcConfigurer {
+
+ @Bean
+ public AccessApiInterceptor accessApiInterceptor(){
+ return new AccessApiInterceptor();
+ }
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry){
+ registry.addInterceptor(accessApiInterceptor());
+ }
+
+ @Bean
+ public DeviceHandlerMethodArgumentResolver deviceHandlerMethodArgumentResolver() {
+ return new DeviceHandlerMethodArgumentResolver();
+ }
+
+ @Override
+ public void addArgumentResolvers(List argumentResolvers) {
+ argumentResolvers.add(deviceHandlerMethodArgumentResolver());
+ }
+
+ @Bean
+ public MultipartConfigElement multipartConfigElement() {
+ String path = System.getProperty("user.dir")+"/tmp";
+ MultipartConfigFactory factory = new MultipartConfigFactory();
+ factory.setMaxFileSize(DataSize.ofMegabytes(20L));
+ File tmpFile = new File(path);
+ if (!tmpFile.exists()) {
+ tmpFile.mkdirs();
+ }
+ factory.setLocation(path);
+ return factory.createMultipartConfig();
+ }
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/CorsConfigurer.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/CorsConfigurer.java
new file mode 100644
index 0000000..039df42
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/CorsConfigurer.java
@@ -0,0 +1,38 @@
+package com.dongjian.datacenter.admin.configurator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+/**
+ * 跨域配置
+* @author jwy
+* @time 2022-5-12 17:54:43
+ */
+@Configuration
+public class CorsConfigurer {
+ @Value("${crosxss.origin:*}")
+ private String corsOrigin;
+ @Bean
+ public FilterRegistrationBean corsFilter() {
+ List allowedOriginPatterns = new ArrayList();
+ allowedOriginPatterns.add(corsOrigin);
+ UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+ CorsConfiguration config = new CorsConfiguration();
+ config.setAllowCredentials(true);
+ config.setAllowedOriginPatterns(allowedOriginPatterns);
+ config.addAllowedHeader("*");
+ config.addAllowedMethod("*");
+ source.registerCorsConfiguration("/**", config);
+ FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source));
+ bean.setOrder(0);
+ return bean;
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/CrosXssFilter.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/CrosXssFilter.java
new file mode 100644
index 0000000..e5da23d
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/CrosXssFilter.java
@@ -0,0 +1,78 @@
+package com.dongjian.datacenter.admin.configurator;
+
+import java.io.IOException;
+
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import javax.servlet.annotation.WebFilter;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import java.util.UUID;
+
+import org.jboss.logging.MDC;
+
+@WebFilter
+public class CrosXssFilter implements Filter {
+
+ private static final Logger logger = LoggerFactory.getLogger(CrosXssFilter.class);
+
+ @Value("${crosxss.filter.disable:false}")
+ private boolean disable;
+
+ @Override
+ public void init(FilterConfig filterConfig) throws ServletException {
+ }
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException {
+ try {
+ MDC.put("processNo", UUID.randomUUID().toString().replace("-", ""));
+ request.setCharacterEncoding("utf-8");
+// response.setContentType("text/html;charset=utf-8");
+ if (disable) {
+ chain.doFilter(request, response);
+ } else {
+ //跨域设置
+ if (response instanceof HttpServletResponse) {
+ HttpServletResponse httpServletResponse = (HttpServletResponse) response;
+ //禁用浏览器缓存
+ httpServletResponse.setHeader("Cache-Control", "no-store");
+ //禁止被IFrame嵌套
+ httpServletResponse.setHeader("X-Frame-Options", "deny");
+ //安全性配置
+ httpServletResponse.setHeader("X-XSS-Protection", "1; mode=block");
+ httpServletResponse.setHeader("X-Content-Type-Options", "nosniff");
+ httpServletResponse.setHeader("Referrer-Policy", "origin");
+ }
+ ServletRequest requestWrapper = null;
+ if(request instanceof HttpServletRequest) {
+ requestWrapper = new RequestWrapper((HttpServletRequest) request);
+ }
+ if(requestWrapper == null) {
+ chain.doFilter(request, response);
+ } else {
+ chain.doFilter(requestWrapper, response);
+ }
+ }
+ } finally {
+ // 避免线程泄漏
+ MDC.clear();
+ }
+
+ }
+
+ @Override
+ public void destroy() {
+
+ }
+
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/RequestWrapper.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/RequestWrapper.java
new file mode 100644
index 0000000..58f3bf8
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/RequestWrapper.java
@@ -0,0 +1,92 @@
+package com.dongjian.datacenter.admin.configurator;
+
+import jakarta.servlet.ReadListener;
+import jakarta.servlet.ServletInputStream;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequestWrapper;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+
+public class RequestWrapper extends HttpServletRequestWrapper {
+
+ private static final Logger logger = LoggerFactory.getLogger(HttpServletRequestWrapper.class);
+
+ private final String body;
+
+ public RequestWrapper(HttpServletRequest request) {
+ super(request);
+ StringBuilder stringBuilder = new StringBuilder();
+ BufferedReader bufferedReader = null;
+ InputStream inputStream = null;
+ try {
+ inputStream = request.getInputStream();
+ if (inputStream != null) {
+ bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
+ char[] charBuffer = new char[128];
+ int bytesRead = -1;
+ while ((bytesRead = bufferedReader.read(charBuffer)) > 0) {
+ stringBuilder.append(charBuffer, 0, bytesRead);
+ }
+ } else {
+ stringBuilder.append("");
+ }
+ } catch (IOException ex) {
+ logger.error("RequestWrapper读取流错误", ex);
+ } finally {
+ if (inputStream != null) {
+ try {
+ inputStream.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ if (bufferedReader != null) {
+ try {
+ bufferedReader.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ body = stringBuilder.toString();
+ }
+
+ @Override
+ public ServletInputStream getInputStream() throws IOException {
+ final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(body.getBytes());
+ ServletInputStream servletInputStream = new ServletInputStream() {
+ @Override
+ public boolean isFinished() {
+ return false;
+ }
+ @Override
+ public boolean isReady() {
+ return false;
+ }
+ @Override
+ public void setReadListener(ReadListener readListener) {
+ }
+ @Override
+ public int read() throws IOException {
+ return byteArrayInputStream.read();
+ }
+ };
+ return servletInputStream;
+
+ }
+
+ @Override
+ public BufferedReader getReader() throws IOException {
+ return new BufferedReader(new InputStreamReader(this.getInputStream()));
+ }
+
+ public String getBody() {
+ return this.body;
+ }
+
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/interceptor/AccessApiInterceptor.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/interceptor/AccessApiInterceptor.java
new file mode 100644
index 0000000..87671c6
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/interceptor/AccessApiInterceptor.java
@@ -0,0 +1,73 @@
+package com.dongjian.datacenter.admin.configurator.interceptor;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.dongjian.datacenter.admin.common.response.ResponseCode;
+import com.dongjian.datacenter.admin.service.AccountService;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.method.HandlerMethod;
+import org.springframework.web.servlet.HandlerInterceptor;
+import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
+
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import java.lang.reflect.Method;
+
+public class AccessApiInterceptor implements HandlerInterceptor {
+
+ private static final Logger logger = LoggerFactory.getLogger(AccessApiInterceptor.class);
+
+ @Value("${user.login.keytimeout}")
+ private long keytimeout;
+
+ @Autowired
+ private AccountService accountService;
+
+ public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+ if(handler instanceof HandlerMethod) {
+ HandlerMethod handlerMethod = (HandlerMethod) handler;
+ Class> tClass = handlerMethod.getBeanType();
+ AccessRequired annotation = tClass.getAnnotation(AccessRequired.class);
+ if (annotation == null) {
+ Method method = handlerMethod.getMethod();
+ annotation = method.getAnnotation(AccessRequired.class);
+ }
+ try {
+ if (annotation != null) {
+ String loginName = request.getHeader("LoginName");
+ String accessToken = request.getHeader("AccessToken");
+ String userId = request.getHeader("UserId");
+ String companyId = request.getHeader("CompanyId");
+
+ String languageType = request.getHeader("LanguageType");
+ response.setContentType("application/json;charset=utf-8");
+ String URI = request.getRequestURI();
+ logger.info("===============请求的URI :" + URI + " ===============");
+ JSONObject jsonObject = new JSONObject();
+
+ boolean result = accountService.accessAuth(loginName, companyId, userId, accessToken, languageType, jsonObject, keytimeout);
+ if(!result) {
+ response.getWriter().print(jsonObject.toString());
+ }
+ return result;
+ }
+ } catch (Exception e) {
+ logger.error("Error from AccessApiInterceptor!", e);
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("code", ResponseCode.SERVER_ERROR);
+ jsonObject.put("msg", "service error");
+ response.getWriter().print(jsonObject.toString());
+ return false;
+ }
+ // 没有注解通过拦截
+ return true;
+ }else if(handler instanceof ResourceHttpRequestHandler) {//资源文件不拦截
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/interceptor/AccessRequired.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/interceptor/AccessRequired.java
new file mode 100644
index 0000000..cd8317a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/configurator/interceptor/AccessRequired.java
@@ -0,0 +1,10 @@
+package com.dongjian.datacenter.admin.configurator.interceptor;
+
+import java.lang.annotation.*;
+
+@Target({ElementType.TYPE,ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface AccessRequired {
+
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/AccountController.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/AccountController.java
new file mode 100644
index 0000000..2e2dce3
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/AccountController.java
@@ -0,0 +1,103 @@
+package com.dongjian.datacenter.admin.controller;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+
+import org.apache.tomcat.util.codec.binary.Base64;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.mobile.device.Device;
+import org.springframework.web.bind.annotation.*;
+
+import com.google.code.kaptcha.impl.DefaultKaptcha;
+import com.dongjian.datacenter.admin.common.response.SimpleDataResponse;
+import com.dongjian.datacenter.admin.configurator.interceptor.AccessRequired;
+import com.dongjian.datacenter.admin.dto.account.CacheUserData;
+import com.dongjian.datacenter.admin.dto.account.LoginParam;
+import com.dongjian.datacenter.admin.service.AccountService;
+import com.dongjian.datacenter.admin.service.captcha.CaptchaService;
+import com.dongjian.datacenter.admin.service.captcha.CaptchaVO;
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+/**
+ * 账户管理
+ * @author jwy-style
+ *
+ */
+@RestController
+@RequestMapping("/account")
+@Tag(name = "AccountController",description = "账号登录/登出、获取验证码接口")
+public class AccountController {
+
+ @Autowired
+ private AccountService accountService;
+ @Autowired
+ private DefaultKaptcha producer;
+ @Autowired
+ private CaptchaService captchaService;
+
+
+ @Operation(summary = "用户登录")
+ @RequestMapping(value = "/login", method = RequestMethod.POST)
+ public SimpleDataResponse login(@RequestBody LoginParam loginParam,
+ @Parameter(name="LanguageType", description="Language Type 0: Chinese, 1: English, 2: Japanese", required=true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
+ HttpServletRequest request,
+ HttpServletResponse response,
+ Device device) {
+ return accountService.login(loginParam,device,LanguageType,request,response);
+ }
+
+
+
+ /**
+ * 用户退出登录
+ * @param user_name
+ * @param access_token
+ * @return
+ */
+ @AccessRequired
+ @Operation(summary = "用户退出")
+ @RequestMapping(value = "/logout", method = RequestMethod.GET)
+ public SimpleDataResponse logout( @Parameter(name="LoginName",description="Login Name",required=true) @RequestHeader(required=true) String LoginName,
+ @Parameter(name="AccessToken",description="Authentication Token",required=true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name="UserId",description="User ID",required=true) @RequestHeader(required=true) Long UserId,
+ @Parameter(name="CompanyId",description="Company ID",required=false) @RequestHeader(required=false) Long CompanyId,
+ @Parameter(name="LanguageType", description="Language Type 0: Chinese, 1: English, 2: Japanese", required=true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType) {
+ return accountService.logout(AccessToken,CompanyId,LoginName,UserId);
+ }
+
+ /**
+ * 获取验证码
+ * @param user_name
+ * @param access_token
+ * @return
+ */
+ @Operation(summary = "获取登录验证码")
+ @RequestMapping(value = "/getCaptcha", method = RequestMethod.GET )
+ public SimpleDataResponse getCaptcha() throws IOException {
+ // 生成文字验证码
+ String content = producer.createText();
+ // 生成图片验证码
+ ByteArrayOutputStream outputStream = null;
+ BufferedImage image = producer.createImage(content);
+ outputStream = new ByteArrayOutputStream();
+ ImageIO.write(image, "jpg", outputStream);
+ // 对字节数组Base64编码
+// BASE64Encoder encoder = new BASE64Encoder();
+ String str = "data:image/jpeg;base64,";
+ String base64Img = str + Base64.encodeBase64String(outputStream.toByteArray()).replace("\n", "").replace("\r", "");
+ CaptchaVO captchaVO = captchaService.cacheCaptcha(content);
+ captchaVO.setBase64Img(base64Img);
+ return SimpleDataResponse.success(captchaVO);
+ }
+
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/CommonController.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/CommonController.java
new file mode 100644
index 0000000..085e429
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/CommonController.java
@@ -0,0 +1,81 @@
+package com.dongjian.datacenter.admin.controller;
+
+import java.util.List;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.alibaba.fastjson.JSONObject;
+import com.dongjian.datacenter.admin.common.response.SimpleDataResponse;
+import com.dongjian.datacenter.admin.service.CommonService;
+import io.swagger.v3.oas.annotations.Hidden;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
+/**
+ *
+ * @author jwy-style
+ *
+ */
+//@ApiIgnore
+@RestController//代表返回的是json格式的数据,这个注解是Spring4之后新加的注解
+@RequestMapping("/common") //http请求路径映射
+@Tag(name = "CommonController",description = "公共接口")
+@SuppressWarnings("unchecked")
+public class CommonController{
+
+ private static Logger logger = LoggerFactory.getLogger(CommonController.class);
+
+ @Autowired
+ private CommonService commonService;
+
+ @Hidden
+ @Operation(summary = "接收Lambda测试数据")
+ @RequestMapping(value = "/testReceiveLambdaData",method = RequestMethod.POST)
+ public SimpleDataResponse testReceiveLambdaData(@RequestBody JSONObject jsonObj){
+ logger.info("testReceiveLambdaData接收数据--{}", jsonObj.toString());
+ return SimpleDataResponse.success();
+ }
+
+ @Hidden
+ @Operation(summary = "检测apikey是否有效")
+ @RequestMapping(value = "/checkApikey",method = RequestMethod.GET)
+ public SimpleDataResponse checkApikey(
+ @Parameter(name = "apikey", description = "API key value", required = true) @RequestParam String apikey){
+ return commonService.checkApikey(apikey);
+ }
+
+ @Hidden
+ @Operation(summary = "初始化企业对应数据库")
+ @RequestMapping(value = "/initDatabase/{companyId}",method = RequestMethod.GET)
+ public SimpleDataResponse initDatabase(
+ @PathVariable Long companyId
+ ){
+ return commonService.initDatabase(companyId);
+ }
+
+ @Hidden
+ @Operation(summary = "初始化企业对应aurora")
+ @RequestMapping(value = "/initAurora/{companyId}",method = RequestMethod.GET)
+ public SimpleDataResponse initAurora(
+ @PathVariable Long companyId
+ ){
+ return commonService.initAurora(companyId);
+ }
+
+ @Hidden
+ @Operation(summary = "销毁企业对应aurora")
+ @RequestMapping(value = "/destroyAurora/{companyId}",method = RequestMethod.GET)
+ public SimpleDataResponse destroyAurora(
+ @PathVariable Long companyId
+ ){
+ return commonService.destroyAurora(companyId);
+ }
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/CompanyController.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/CompanyController.java
new file mode 100644
index 0000000..528113f
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/CompanyController.java
@@ -0,0 +1,138 @@
+package com.dongjian.datacenter.admin.controller;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import com.dongjian.datacenter.admin.common.exception.BusinessException;
+import com.dongjian.datacenter.admin.common.response.PageInfo;
+import com.dongjian.datacenter.admin.common.response.PageResponse;
+import com.dongjian.datacenter.admin.common.response.ResponseCode;
+import com.dongjian.datacenter.admin.common.response.SimpleDataResponse;
+import com.dongjian.datacenter.admin.configurator.interceptor.AccessRequired;
+import com.dongjian.datacenter.admin.dto.company.CompanySearchParams;
+import com.dongjian.datacenter.admin.dto.company.DeleteCompanyParams;
+import com.dongjian.datacenter.admin.dto.company.OptCompanyParams;
+import com.dongjian.datacenter.admin.vo.company.CompanyPageDTO;
+import com.dongjian.datacenter.admin.vo.TreeMenusDTO;
+import com.dongjian.datacenter.admin.service.CompanyService;
+
+/**
+ *
+ * @author jwy-style
+ *
+ */
+@RestController//代表返回的是json格式的数据,这个注解是Spring4之后新加的注解
+//@AccessRequired //注解标识是否需要验证token
+@RequestMapping("/company") //http请求路径映射
+@Tag(name = "CompanyController",description = "企业管理的相关接口")
+@SuppressWarnings("unchecked")
+public class CompanyController {
+
+ private static Logger logger = LoggerFactory.getLogger(CompanyController.class);
+
+ @Autowired
+ private CompanyService companyService;
+
+
+ @AccessRequired
+ @Operation(summary = "添加企业")
+ @RequestMapping(value = "/add",method = RequestMethod.POST)
+ public SimpleDataResponse add(
+ @RequestBody OptCompanyParams optCompanyParams,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return companyService.add(optCompanyParams, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "编辑企业")
+ @RequestMapping(value = "/edit",method = RequestMethod.POST)
+ public SimpleDataResponse edit(
+ @RequestBody OptCompanyParams optCompanyParams,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType) {
+ return companyService.edit(optCompanyParams, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "删除企业")
+ @RequestMapping(value = "/batchDelete",method = RequestMethod.POST)
+ public SimpleDataResponse batchDelete(
+ @RequestBody DeleteCompanyParams deleteCompanyParams,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return companyService.batchDelete(deleteCompanyParams, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "获取当前登录用户下的企业菜单树")
+ @RequestMapping(value = "/getCompanyTree",method = RequestMethod.GET)
+ public SimpleDataResponse> getCompanyTree(
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return companyService.getCompanyTree(CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "获取企业列表")
+ @RequestMapping(value = "/getListPage",method = RequestMethod.GET)
+ public PageResponse> getListPage(
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
+// @ApiParam(name="LoginCompanyId",value="登录用户的企业ID",required=false,defaultValue = "1") @RequestHeader(required=false) Long LoginCompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
+ @Parameter(name="UTCOffset",description="格林威治时间与本地时间的差值,单位是分钟,比如东八区是 -480",required=true,schema = @Schema(defaultValue = "-480")) @RequestHeader(required=true) Integer UTCOffset,
+ CompanySearchParams pageSearchParam
+ ) throws BusinessException {
+
+ pageSearchParam.setUserId(UserId);
+// if (1 == pageSearchParam.getSearchType()) {
+// pageSearchParam.setCompanyId(LoginCompanyId);
+// } else if (2 == pageSearchParam.getSearchType()) {
+// pageSearchParam.setCompanyId(CompanyId);
+// }
+
+ PageResponse> pageResponse = new PageResponse>();
+ try{
+ pageResponse.setData(companyService.getListPage(pageSearchParam, CompanyId, UserId, LanguageType, UTCOffset));
+ pageResponse.setCode(ResponseCode.SUCCESS);
+ pageResponse.setMsg("success");
+ }catch (Exception e){
+ logger.error("查询列表报错",e);
+ pageResponse.setCode(ResponseCode.SERVER_ERROR);
+ pageResponse.setMsg("service error");
+ }
+ return pageResponse;
+ }
+
+ @Operation(summary = "创建大阪区资源")
+ @RequestMapping(value = "/initAurora/osaka",method = RequestMethod.GET)
+ public SimpleDataResponse osakaInitAurora(){
+ return companyService.osakaInitAurora();
+ }
+
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/HealthController.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/HealthController.java
new file mode 100644
index 0000000..e1b3e5b
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/HealthController.java
@@ -0,0 +1,35 @@
+package com.dongjian.datacenter.admin.controller;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.alibaba.fastjson.JSONObject;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.Properties;
+
+@RestController
+public class HealthController {
+
+ @GetMapping("/healthcheck")
+ public String health(){
+ return "ok";
+ }
+
+ @GetMapping("/version")
+ public String getVersion() throws IOException {
+ Properties properties = new Properties();
+ Reader in = new InputStreamReader(this.getClass().getResourceAsStream("/config/version.properties"),"utf-8");
+ BufferedReader bufferedReader = new BufferedReader(in);
+ properties.load(bufferedReader);
+ String version=properties.getProperty("project.latest.version");
+ String content = properties.getProperty(version);
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("version", version);
+ jsonObject.put("content", content);
+ return jsonObject.toString();
+ }
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/ProjectController.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/ProjectController.java
new file mode 100644
index 0000000..0abfaa6
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/ProjectController.java
@@ -0,0 +1,110 @@
+package com.dongjian.datacenter.admin.controller;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Hidden;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import com.dongjian.datacenter.admin.common.exception.BusinessException;
+import com.dongjian.datacenter.admin.common.response.PageInfo;
+import com.dongjian.datacenter.admin.common.response.PageResponse;
+import com.dongjian.datacenter.admin.common.response.ResponseCode;
+import com.dongjian.datacenter.admin.common.response.SimpleDataResponse;
+import com.dongjian.datacenter.admin.configurator.interceptor.AccessRequired;
+import com.dongjian.datacenter.admin.dto.project.DeleteProjectParams;
+import com.dongjian.datacenter.admin.dto.project.OptProjectParams;
+import com.dongjian.datacenter.admin.dto.project.ProjectSearchParams;
+import com.dongjian.datacenter.admin.service.ProjectService;
+import com.dongjian.datacenter.admin.vo.project.ProjectPageVO;
+
+
+/**
+ *
+ * @author jwy-style
+ *
+ */
+@Hidden
+@RestController//代表返回的是json格式的数据,这个注解是Spring4之后新加的注解
+@AccessRequired //注解标识是否需要验证登录token,放在这表示整个类的接口都要鉴权,也可以注释掉放在单独的接口上对指定接口鉴权
+@RequestMapping("/project") //http请求路径映射
+@Tag(name = "ProjectController", description = "项目管理模块的相关接口")
+@SuppressWarnings("unchecked")
+public class ProjectController {
+
+ private static Logger logger = LoggerFactory.getLogger(ProjectController.class);
+
+// @Autowired
+// private ProjectService projectService;
+//
+//// @AccessRequired
+// @Operation(summary = "添加项目")
+// @RequestMapping(value = "/add",method = RequestMethod.POST)
+// public SimpleDataResponse add(
+// @RequestBody OptProjectParams optProjectParams,
+// @ApiParam(name="LoginName",value="登录名",required=true,defaultValue = "admin") @RequestHeader(required=true) String LoginName,
+// @ApiParam(name="AccessToken",value="鉴权token",required=true) @RequestHeader(required=true) String AccessToken,
+// @ApiParam(name="UserId",value="用户ID",required=true,defaultValue = "1") @RequestHeader(required=true) Long UserId,
+// @ApiParam(name="CompanyId",value="用户所属企业ID",required=false,defaultValue = "1") @RequestHeader(required=false) Long CompanyId,
+// @ApiParam(name="LanguageType",value="语言类型 0:中文 1:英文 2:日文",required=true,defaultValue = "2") @RequestHeader(required=true) Integer LanguageType){
+// return projectService.add(optProjectParams, UserId, CompanyId, LanguageType);
+// }
+//
+// @Operation(summary = "编辑项目")
+// @RequestMapping(value = "/edit",method = RequestMethod.POST)
+// public SimpleDataResponse edit(
+// @RequestBody OptProjectParams optProjectParams,
+// @ApiParam(name="LoginName",value="登录名",required=true,defaultValue = "admin") @RequestHeader(required=true) String LoginName,
+// @ApiParam(name="AccessToken",value="鉴权token",required=true) @RequestHeader(required=true) String AccessToken,
+// @ApiParam(name="UserId",value="用户ID",required=true,defaultValue = "1") @RequestHeader(required=true) Long UserId,
+// @ApiParam(name="CompanyId",value="用户所属企业ID",required=false,defaultValue = "1") @RequestHeader(required=false) Long CompanyId,
+// @ApiParam(name="LanguageType",value="语言类型 0:中文 1:英文 2:日文",required=true,defaultValue = "2") @RequestHeader(required=true) Integer LanguageType){
+// return projectService.edit(optProjectParams, UserId, CompanyId, LanguageType);
+// }
+//
+// @Operation(summary = "删除项目")
+// @RequestMapping(value = "/batchDelete",method = RequestMethod.POST)
+// public SimpleDataResponse batchDelete(
+// @RequestBody DeleteProjectParams deleteProjectParams,
+// @ApiParam(name="LoginName",value="登录名",required=true,defaultValue = "admin") @RequestHeader(required=true) String LoginName,
+// @ApiParam(name="AccessToken",value="鉴权token",required=true) @RequestHeader(required=true) String AccessToken,
+// @ApiParam(name="UserId",value="用户ID",required=true,defaultValue = "1") @RequestHeader(required=true) Long UserId,
+// @ApiParam(name="CompanyId",value="用户所属企业ID",required=false,defaultValue = "1") @RequestHeader(required=false) Long CompanyId,
+// @ApiParam(name="LanguageType",value="语言类型 0:中文 1:英文 2:日文",required=true,defaultValue = "2") @RequestHeader(required=true) Integer LanguageType){
+// return projectService.batchDelete(deleteProjectParams, UserId, CompanyId, LanguageType);
+// }
+//
+// @Operation(summary = "获取项目列表")
+// @RequestMapping(value = "/getListPage",method = RequestMethod.GET)
+// public PageResponse> getListPage(
+// @ApiParam(name="LoginName",value="登录名",required=true,defaultValue = "admin") @RequestHeader(required=true) String LoginName,
+// @ApiParam(name="AccessToken",value="鉴权token",required=true) @RequestHeader(required=true) String AccessToken,
+// @ApiParam(name="UserId",value="用户ID",required=true,defaultValue = "1") @RequestHeader(required=true) Long UserId,
+// @ApiParam(name="CompanyId",value="用户所属企业ID",required=false,defaultValue = "1") @RequestHeader(required=false) Long CompanyId,
+// @ApiParam(name="LanguageType",value="语言类型 0:中文 1:英文 2:日文",required=true,defaultValue = "2") @RequestHeader(required=true) Integer LanguageType,
+// @ApiParam(name="UTCOffset",value="格林威治时间与本地时间的差值,单位是分钟,比如东八区是 -480",required=true,defaultValue = "-480") @RequestHeader(required=true) Integer UTCOffset,
+// ProjectSearchParams pageSearchParam
+// ) throws BusinessException {
+//
+// pageSearchParam.setUserId(UserId);
+//
+// PageResponse> pageResponse = new PageResponse>();
+// try{
+// pageResponse.setData(projectService.getListPage(pageSearchParam, CompanyId, UserId, LanguageType, UTCOffset));
+// pageResponse.setCode(ResponseCode.SUCCESS);
+// pageResponse.setMsg("success");
+// }catch (Exception e){
+// logger.error("查询列表报错",e);
+// pageResponse.setCode(ResponseCode.SERVER_ERROR);
+// pageResponse.setMsg("service error");
+// }
+// return pageResponse;
+// }
+
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/RoleController.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/RoleController.java
new file mode 100644
index 0000000..3cc9045
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/RoleController.java
@@ -0,0 +1,132 @@
+package com.dongjian.datacenter.admin.controller;
+
+
+import com.dongjian.datacenter.admin.common.exception.BusinessException;
+import com.dongjian.datacenter.admin.common.response.PageInfo;
+import com.dongjian.datacenter.admin.common.response.PageResponse;
+import com.dongjian.datacenter.admin.common.response.ResponseCode;
+import com.dongjian.datacenter.admin.common.response.SimpleDataResponse;
+import com.dongjian.datacenter.admin.configurator.interceptor.AccessRequired;
+import com.dongjian.datacenter.admin.dto.role.DeleteRoleParam;
+import com.dongjian.datacenter.admin.dto.role.OptRoleParam;
+import com.dongjian.datacenter.admin.dto.role.PageSearchParam;
+import com.dongjian.datacenter.admin.vo.TreeMenusDTO;
+import com.dongjian.datacenter.admin.vo.role.RolePageDTO;
+import com.dongjian.datacenter.admin.service.RoleService;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ *
+ * @author jwy-style
+ *
+ */
+@RestController//代表返回的是json格式的数据,这个注解是Spring4之后新加的注解
+@AccessRequired //注解标识是否需要验证token
+@RequestMapping("/role") //http请求路径映射
+@Tag(name = "RoleController",description = "角色权限的相关接口")
+@SuppressWarnings("unchecked")
+public class RoleController {
+
+ private static Logger logger = LoggerFactory.getLogger(RoleController.class);
+
+ @Autowired
+ private RoleService roleService;
+
+
+ @Operation(summary = "添加角色")
+ @RequestMapping(value = "/add",method = RequestMethod.POST)
+ public SimpleDataResponse add(
+ @RequestBody OptRoleParam optRoleParam,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return roleService.add(optRoleParam, CompanyId, UserId, LanguageType);
+ }
+
+ @Operation(summary = "编辑角色")
+ @RequestMapping(value = "/edit",method = RequestMethod.POST)
+ public SimpleDataResponse edit(
+ @RequestBody OptRoleParam optRoleParam,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return roleService.edit(optRoleParam, CompanyId, UserId, LanguageType);
+ }
+
+ @Operation(summary = "删除角色")
+ @RequestMapping(value = "/batchDelete",method = RequestMethod.POST)
+ public SimpleDataResponse batchDelete(
+ @RequestBody DeleteRoleParam deleteRoleParam,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return roleService.batchDelete(deleteRoleParam, CompanyId, UserId, LanguageType);
+ }
+
+ @Operation(summary = "获取角色列表")
+ @RequestMapping(value = "/getListPage",method = RequestMethod.GET)
+ public PageResponse> getListPage(
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
+ PageSearchParam pageSearchParam
+ ) throws BusinessException {
+
+ pageSearchParam.setUserId(UserId);
+// pageSearchParam.setCompanyId(CompanyId);
+ PageResponse> pageResponse = new PageResponse>();
+ try{
+ pageResponse.setData(roleService.getListPage(pageSearchParam, CompanyId, UserId, LanguageType));
+ pageResponse.setCode(ResponseCode.SUCCESS);
+ pageResponse.setMsg("success");
+ }catch (Exception e){
+ logger.error("查询列表报错",e);
+ pageResponse.setCode(ResponseCode.SERVER_ERROR);
+ pageResponse.setMsg("service error");
+ }
+ return pageResponse;
+ }
+
+ @Operation(summary = "获取当前登录用户拥有的权限菜单树")
+ @RequestMapping(value = "/getOwnMenuIds",method = RequestMethod.GET)
+ public SimpleDataResponse> getOwnMenuIds(
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return roleService.getOwnMenuIds(CompanyId, UserId, LanguageType);
+ }
+
+ @Operation(summary = "获取对应角色拥有的权限菜单ID")
+ @RequestMapping(value = "/getMenuIdsByRoleId",method = RequestMethod.GET)
+ public SimpleDataResponse getMenuIdsByRoleId(
+ @Parameter(name="roleId",description="角色ID",required=true, schema = @Schema(defaultValue = "28")) @RequestParam Long roleId,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return roleService.getMenuIdsByRoleId(roleId, CompanyId, UserId, LanguageType);
+ }
+
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/SysEnvController.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/SysEnvController.java
new file mode 100644
index 0000000..6639681
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/SysEnvController.java
@@ -0,0 +1,54 @@
+package com.dongjian.datacenter.admin.controller;
+
+
+import com.dongjian.datacenter.admin.common.response.SimpleDataResponse;
+import com.dongjian.datacenter.admin.dto.sysenv.SysEnvEditParam;
+import com.dongjian.datacenter.admin.dto.sysenv.SysEnvQueryParam;
+import com.dongjian.datacenter.admin.service.sysenv.SysEnvService;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+//@AccessRequired
+@RequestMapping("/sys/env")
+@Tag(name = "SysEnvController",description = "")
+@Slf4j
+public class SysEnvController {
+
+ @Autowired
+ private SysEnvService sysEnvService;
+
+ @Operation(summary = "edit", description = "")
+ @PostMapping(value = "/edit")
+ public SimpleDataResponse edit(
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType,
+ @Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset,
+ @RequestBody SysEnvEditParam param
+ ){
+ return sysEnvService.edit(param, UserId, CompanyId, LanguageType);
+ }
+
+ @Operation(summary = "query", description = "")
+ @PostMapping(value = "/query")
+ public SimpleDataResponse query(
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType,
+ @Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset,
+ @RequestBody SysEnvQueryParam param
+ ){
+ return SimpleDataResponse.success(sysEnvService.getValueByKey(param.getEnvKey()));
+ }
+
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/UserController.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/UserController.java
new file mode 100644
index 0000000..312876f
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/controller/UserController.java
@@ -0,0 +1,153 @@
+package com.dongjian.datacenter.admin.controller;
+
+
+import com.dongjian.datacenter.admin.common.exception.BusinessException;
+import com.dongjian.datacenter.admin.common.response.PageInfo;
+import com.dongjian.datacenter.admin.common.response.PageResponse;
+import com.dongjian.datacenter.admin.common.response.ResponseCode;
+import com.dongjian.datacenter.admin.common.response.SimpleDataResponse;
+import com.dongjian.datacenter.admin.configurator.interceptor.AccessRequired;
+import com.dongjian.datacenter.admin.dto.user.DeleteUserParam;
+import com.dongjian.datacenter.admin.dto.user.ModifyPassword;
+import com.dongjian.datacenter.admin.dto.user.OptUserParam;
+import com.dongjian.datacenter.admin.dto.user.PageSearchParam;
+import com.dongjian.datacenter.admin.dto.user.ResetPassword;
+import com.dongjian.datacenter.admin.dto.user.SwitchMfaBind;
+import com.dongjian.datacenter.admin.service.UserService;
+import com.dongjian.datacenter.admin.vo.user.UserPageDTO;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ *
+ * @author jwy-style
+ *
+ */
+@RestController//代表返回的是json格式的数据,这个注解是Spring4之后新加的注解
+//@AccessRequired //注解标识是否需要验证token
+@RequestMapping("/user") //http请求路径映射
+@Tag(name = "UserController",description = "用户管理的相关接口")
+@SuppressWarnings("unchecked")
+public class UserController {
+
+ private static Logger logger = LoggerFactory.getLogger(UserController.class);
+
+ @Autowired
+ private UserService userService;
+
+ @AccessRequired
+ @Operation(summary = "添加用户")
+ @RequestMapping(value = "/add",method = RequestMethod.POST)
+ public SimpleDataResponse add(
+ @RequestBody OptUserParam optUserParam,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return userService.add(optUserParam, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "编辑用户")
+ @RequestMapping(value = "/edit",method = RequestMethod.POST)
+ public SimpleDataResponse edit(
+ @RequestBody OptUserParam optUserParam,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return userService.edit(optUserParam, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "删除用户")
+ @RequestMapping(value = "/batchDelete",method = RequestMethod.POST)
+ public SimpleDataResponse batchDelete(
+ @RequestBody DeleteUserParam deleteUserParam,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return userService.batchDelete(deleteUserParam, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "重置密码")
+ @RequestMapping(value = "/batchResetPassword",method = RequestMethod.POST)
+ public SimpleDataResponse batchResetPassword(
+ @RequestBody ResetPassword resetPassword,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
+ return userService.batchResetPassword(resetPassword, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "修改密码")
+ @RequestMapping(value = "/modifyPassword",method = RequestMethod.POST)
+ public SimpleDataResponse modifyPassword(
+ @RequestBody ModifyPassword modifyPassword,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType
+ ) {
+ return userService.modifyPassword(modifyPassword, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "解绑MFA设备")
+ @RequestMapping(value = "/unbindMfa",method = RequestMethod.POST)
+ public SimpleDataResponse unbindMfa(
+ @RequestBody SwitchMfaBind switchMfaBind,
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType
+ ) {
+ return userService.unbindMfa(switchMfaBind, CompanyId, UserId, LanguageType);
+ }
+
+ @AccessRequired
+ @Operation(summary = "获取用户列表")
+ @RequestMapping(value = "/getListPage",method = RequestMethod.GET)
+ public PageResponse> getListPage(
+ @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
+ @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
+ @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
+ @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
+ @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
+ PageSearchParam pageSearchParam
+ ) throws BusinessException {
+
+ pageSearchParam.setUserId(UserId);
+// pageSearchParam.setCompanyId(CompanyId);
+ PageResponse> pageResponse = new PageResponse>();
+ try{
+ pageResponse.setData(userService.getListPage(pageSearchParam, CompanyId, UserId, LanguageType));
+ pageResponse.setCode(ResponseCode.SUCCESS);
+ pageResponse.setMsg("success");
+ }catch (Exception e){
+ logger.error("查询列表报错",e);
+ pageResponse.setCode(ResponseCode.SERVER_ERROR);
+ pageResponse.setMsg("service error");
+ }
+ return pageResponse;
+ }
+
+}
diff --git a/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/swagger/SwaggerConfig.java b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/swagger/SwaggerConfig.java
new file mode 100644
index 0000000..98c5351
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/java/com/dongjian/datacenter/admin/swagger/SwaggerConfig.java
@@ -0,0 +1,50 @@
+//package com.dongjian.datacenter.admin.swagger;
+//
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.Profile;
+//import springfox.documentation.builders.ApiInfoBuilder;
+//import springfox.documentation.builders.PathSelectors;
+//import springfox.documentation.service.ApiInfo;
+//import springfox.documentation.service.Contact;
+//import springfox.documentation.spi.DocumentationType;
+//import springfox.documentation.spring.web.plugins.Docket;
+//import springfox.documentation.swagger2.annotations.EnableSwagger2;
+//
+///**
+// * http://127.0.0.1:20002/swagger-ui.html
+//* @author 江武元
+// */
+//@Configuration
+//@EnableSwagger2
+//public class SwaggerConfig {
+//
+// @Value("${api.enable:false}")
+// private boolean enable;
+//
+//// @Profile({"dev","stg"})
+// @Bean
+// public Docket webApiConfig(){
+// return new Docket(DocumentationType.SWAGGER_2)
+// .groupName("webApi")
+// .apiInfo(webApiInfo())
+// .select()
+// //配置显示所有的URL
+// .paths(PathSelectors.any())
+// .build()
+// .enable(enable);
+// }
+//
+// private ApiInfo webApiInfo(){
+// return new ApiInfoBuilder()
+// //文档标题
+// .title("接口文档")
+// //文档描述
+// .description("接口文档")
+// //文档版本
+// .version("1.0")
+// .build();
+// }
+//}
+//
diff --git a/dongjian-center-admin-controller/src/main/resources/assembly.xml b/dongjian-center-admin-controller/src/main/resources/assembly.xml
new file mode 100644
index 0000000..3f6397b
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/assembly.xml
@@ -0,0 +1,59 @@
+
+
+
+ dongjian-center-admin
+
+
+ zip
+
+
+
+
+
+
+
+ ${project.build.directory}
+ /
+
+ *.jar
+
+
+
+
+
+ ${project.build.directory}/jar
+ /
+
+ lib/*.jar
+
+
+ *.jar
+
+
+
+
+
+ ${project.build.directory}/lib
+ /lib
+
+ *.jar
+
+
+
+
+
+ ${project.build.directory}/config
+ /config
+
+ application.properties
+
+
+
+
+
+ ${project.build.directory}/sql
+ /sql
+
+
+
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/main.tf
new file mode 100644
index 0000000..70acb20
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/main.tf
@@ -0,0 +1,175 @@
+provider "aws" {
+ region = "ap-northeast-1"
+ # shared_config_files = [var.aws_access_config_path]
+ # shared_credentials_files = [var.aws_access_credentials_path]
+ # profile = "tkbuild-stg"
+ access_key = var.access_key
+ secret_key = var.secret_key
+}
+# modules (vpc 共用)
+# 读取既有VPC和subnet信息
+module "network" {
+ source = "./modules/network"
+ vpc_name = "${var.project_name}-vpc"
+}
+
+# 读取 安全组 (security group 共用)
+module "securitygroup" {
+ source = "./modules/securitygroup"
+ vpc_id = module.network.vpc_id
+ project_name = var.project_name
+}
+
+# 读取redis和mysql
+module "rds_redis" {
+ source = "./modules/rds"
+ project_name = var.project_name
+ db_name = "tokyo-building-db"
+}
+
+# 创建新的aurora
+module "Aurora" {
+ source = "./modules/aurora"
+ project_name = var.project_name
+ company_name = var.company_name
+ # 与RDS共用subnet gp
+ # aurora-subnet-group = module.rds_redis.rds_subnet_gp
+ aurora_sg = [module.securitygroup.security_group_sg_db_id]
+}
+
+# # 创建新的Active MQ 规格后期需要修改
+# 压测性能跟不上,废弃
+# module "ActiveMQ" {
+# source = "./modules/mq"
+# project_name = var.company_name
+# subnet_mq_ids = module.network.protected_subnet_ids
+# sg_mq = module.securitygroup.security_group_mq_db_id
+# }
+
+# 创建新的alb,internal alb(新企業没有admin alb, nlb)
+module "alb_elb" {
+ source = "./modules/alb"
+ vpc_id = module.network.vpc_id
+ # project_name = company_name for one company
+ project_name = var.project_name
+ company_name = var.company_name
+ sg_alb_id = [module.securitygroup.security_group_sg_alb_id]
+ sg_internal_alb_id = [module.securitygroup.security_group_sg_internal_alb_id]
+ sub_public_ids = module.network.public_subnet_ids
+ sub_protect_ids = module.network.protected_subnet_ids
+}
+
+# 给新创建的alb添加dns解析
+# 新的企业不用域名,废弃
+# # alb ${company_name}.kr-sensor.net
+# # admin alb ${company_name}-admin.kr-sensor.net
+# module "route53" {
+# source = "./modules/dns"
+# company_name = var.company_name
+# admin_alb_name = module.alb_elb.alb_admin_domain_name
+# admin_alb_zone_id = module.alb_elb.alb_admin_zone_id
+# alb_name = module.alb_elb.alb_domain_name
+# alb_zone_id = module.alb_elb.alb_zone_id
+# }
+
+# 读取Image信息
+module "ecr" {
+ source = "./modules/ecr"
+ repo_business_web = "tokyo-build-business"
+ repo_business_back = "tokyo-build-business-web"
+ repo_receiver = "tokyo-build-receiver"
+ repo_sender = "tokyo-build-sender"
+ repo_mqtt = "tokyo-build-mqtt"
+ repo_adminback = "tokyo-build-admin"
+ repo_adminweb = "tokyo-build-admin-web"
+}
+
+# 构筑sender,recever
+module "ecs" {
+ source = "./modules/ecs_fargate"
+ # project_name = var.company_name when one company
+ project_name = var.project_name
+ company_name = var.company_name
+ autoscaling_subnet = module.network.protected_subnet_ids
+ sgapp_id = [ module.securitygroup.security_group_sg_app_id ]
+
+ business_name = module.ecr.business_name
+ business_image = module.ecr.business_uri
+ business_web_name = module.ecr.business-web_name
+ business_web_image = module.ecr.business-web_uri
+ sender_name = module.ecr.sender_name
+ sender_image = module.ecr.sender_uri
+ roid2Url = "https://api.public-api.kanri-roid.app/api/public/v1/targets/{targetId}/monitoring-status"
+ roidAlarmUrl = "https://api.public-api.kanri-roid.app/api/public/v1/problem-reports/alarm"
+ roidAlarmCancelUrl = "https://api.public-api.kanri-roid.app/api/public/v1/problem-reports/return-to-normal"
+ roidAuthorization = var.roidAuthorization
+ roid2Authorization = var.roid2Authorization
+ queryPushInfoUrl = "iothub-web.ttkdatatechbuild.com"
+ #kinesis stream
+ mqttNormalTopic = module.kinesis.aws_kinesis_stream_name
+ mqtt_name = module.ecr.mqtt_name
+ mqtt_image = module.ecr.mqtt_uri
+ adminback_name = module.ecr.adminback_name
+ adminback_image = module.ecr.adminback_uri
+ adminWeb_name = module.ecr.adminweb_name
+ adminWeb_image = module.ecr.adminweb_uri
+ receiver_name = module.ecr.receiver_name
+ receiver_image = module.ecr.receiver_uri
+ # redis mysql
+ redisHost = module.rds_redis.redis_address
+ redisDatabase = "0"
+ alarmRedisDatabase = var.alarmRedisDatabase
+ datasourceDNS = module.rds_redis.rds_address
+
+ # alb
+ receiver_tg_8200_arn = module.alb_elb.alb_8200_arn
+
+ # internal alb
+ sender_tg_8201_arn = module.alb_elb.alb_inter_8201_arn
+ sender_tg_8201_arn_suffix = module.alb_elb.alb_inter_8201_arn_suffix
+ dataCenterReceiverTargetUrl = module.alb_elb.alb_internal_dns
+}
+
+# kinesis stream
+module "kinesis" {
+ source = "./modules/kinesis"
+ company_name = var.company_name
+}
+
+module "lambda" {
+ source = "./modules/lambda"
+ company_name = var.company_name
+ AURORA_USERNAME = "techsor"
+ AURORA_PASSWORD = "Abc#123456xyz"
+ AURORA_URL = module.Aurora.cluster_endpoint
+ AWS_ACCESS = var.access_key
+ AWS_SECRET = var.secret_key
+ subnet_ids = module.network.protected_subnet_ids
+ sggroup_ids = [module.securitygroup.security_group_sg_app_id]
+ aws_kinesis_stream_name = module.kinesis.aws_kinesis_stream_name
+}
+
+module "eventbridge_pipe" {
+ source = "./modules/eventbridge"
+ company_name = var.company_name
+ aws_kinesis_stream_arn = module.kinesis.aws_kinesis_stream_arn
+ aws_lambda_arn = module.lambda.aws_lambda_arn
+}
+
+module "glue_job" {
+ source = "./modules/glue_job"
+ project_name = var.project_name
+ company_name = var.company_name
+
+ aurora_endpoint = module.Aurora.cluster_endpoint
+}
+
+
+# teffaform init
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
+# terraform refresh
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/main.tf
new file mode 100644
index 0000000..b233119
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/main.tf
@@ -0,0 +1,90 @@
+# Create target group 8200
+resource "aws_lb_target_group" "TG-TCP-8200" {
+ name = "prod-${var.company_name}-tg-8200"
+ port = 8200
+ protocol = "HTTP"
+ target_type = "ip"
+ vpc_id = var.vpc_id
+ # wait before changing the state of a deregistering target from draining to unused.
+ deregistration_delay = 60
+ health_check {
+ interval = 30
+ path = "/healthcheck"
+ port = 8200
+ protocol = "HTTP"
+ timeout = 5
+ unhealthy_threshold = 2
+ matcher = 200
+ }
+}
+
+# Create ALB
+resource "aws_lb" "ALB-prod-alb" {
+ name = "${var.company_name}-alb"
+ internal = false
+ load_balancer_type = "application"
+ security_groups = var.sg_alb_id
+ subnets = var.sub_public_ids
+ enable_deletion_protection = false
+}
+
+# Create ALB listener
+resource "aws_lb_listener" "ALB-prod-alb-listener-8200" {
+ load_balancer_arn = aws_lb.ALB-prod-alb.arn
+ port = 8200
+ protocol = "HTTP"
+ default_action {
+ type = "forward"
+ target_group_arn = aws_lb_target_group.TG-TCP-8200.arn
+ }
+}
+
+
+########################
+# Create target group 8201
+resource "aws_lb_target_group" "TG-TCP-8201" {
+ name = "prod-${var.company_name}-tg-8201"
+ port = 8201
+ protocol = "HTTP"
+ target_type = "ip"
+ vpc_id = var.vpc_id
+ # wait before changing the state of a deregistering target from draining to unused.
+ deregistration_delay = 60
+ health_check {
+ interval = 30
+ path = "/healthcheck"
+ port = 8201
+ protocol = "HTTP"
+ timeout = 5
+ unhealthy_threshold = 2
+ matcher = 200
+ }
+}
+
+# Create internal ALB
+resource "aws_lb" "ALB-prod-alb-internal" {
+ name = "${var.company_name}-alb-internal"
+ internal = true
+ load_balancer_type = "application"
+ security_groups = var.sg_internal_alb_id
+ subnets = var.sub_protect_ids
+ enable_deletion_protection = false
+}
+
+# Create ALB listener
+resource "aws_lb_listener" "ALB-prod-alb-listener-8201" {
+ load_balancer_arn = aws_lb.ALB-prod-alb-internal.arn
+ port = 8201
+ protocol = "HTTP"
+ default_action {
+ type = "forward"
+ target_group_arn = aws_lb_target_group.TG-TCP-8201.arn
+ }
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/output.tf
new file mode 100644
index 0000000..2033867
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/output.tf
@@ -0,0 +1,19 @@
+output "alb_8200_arn" {
+ value = aws_lb_target_group.TG-TCP-8200.arn
+}
+
+output "alb_inter_8201_arn" {
+ value = aws_lb_target_group.TG-TCP-8201.arn
+}
+
+output "alb_inter_8201_arn_suffix" {
+ value = aws_lb_target_group.TG-TCP-8201.arn_suffix
+}
+
+output "alb_internal_dns" {
+ value = aws_lb.ALB-prod-alb-internal.dns_name
+}
+
+output "alb_dns" {
+ value = aws_lb.ALB-prod-alb.dns_name
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/valiables.tf
new file mode 100644
index 0000000..ca21aa6
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/alb/valiables.tf
@@ -0,0 +1,31 @@
+
+
+variable "project_name" {
+ type = string
+}
+
+variable "company_name" {
+ type = string
+}
+
+variable "id" {
+ type = list(string)
+ default = ["01", "02", "03"]
+}
+
+variable "vpc_id" {
+ type = string
+}
+
+variable "sg_alb_id" {
+ type = list(string)
+}
+variable "sg_internal_alb_id" {
+ type = list(string)
+}
+variable "sub_public_ids" {
+ type = list(string)
+}
+variable "sub_protect_ids" {
+ type = list(string)
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/main.tf
new file mode 100644
index 0000000..7990cc2
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/main.tf
@@ -0,0 +1,63 @@
+# resource "aws_kms_key" "example" {
+# description = "AWS KMS Key to encrypt Database Activity Stream"
+# }
+
+# resource "aws_db_subnet_group" "rds-subnet-group" {
+# name = var.db_name
+# description = "rds subnet group for ${var.db_name}"
+# # subnet_ids = [var.aws_subnet.private[0].id, aws_subnet.private[1].id]
+# subnet_ids = var.aurora_sub_public_id
+# # subnet_ids = var.aurora_sub_public_id
+# }
+
+# data "aws_db_subnet_group" "rds-subnet-group" {
+
+# }
+# third-dev-subnet-gp
+# 取得既有的subnet
+data "aws_db_subnet_group" "rds-subnet-group" {
+ name = "${var.project_name}-db-subnet-gp"
+}
+# tokyo-build-prod-db-subnet-gp
+
+resource "aws_rds_cluster" "sensor" {
+ cluster_identifier = "${var.company_name}-aurora-cluster"
+ engine = "aurora-mysql"
+ engine_mode = "provisioned"
+ engine_version = var.aurora_engine_version
+ master_username = var.aurora_username
+ # master_user_secret_kms_key_id = aws_kms_key.example.key_id
+ # manage_master_user_password = true
+ master_password = var.aurora_passwd
+ availability_zones = var.availability_zones
+ backup_retention_period = 3
+ # preferred_backup_window = "00:00-01:00"
+ skip_final_snapshot = true
+ vpc_security_group_ids = var.aurora_sg
+ db_cluster_parameter_group_name = "tokyo-build-prod-db-cluster-param-gp"
+ db_instance_parameter_group_name = "tokyo-build-prod-db-param-gp"
+ # 和RDS共用
+ # db_subnet_group_name = var.aurora-subnet-group
+ db_subnet_group_name = data.aws_db_subnet_group.rds-subnet-group.name
+
+}
+
+resource "aws_rds_cluster_instance" "sensor" {
+ count = 1
+ identifier = "${var.company_name}-aurora-instance"
+ cluster_identifier = aws_rds_cluster.sensor.id
+ instance_class = "db.r6g.large"
+ engine = aws_rds_cluster.sensor.engine
+ engine_version = aws_rds_cluster.sensor.engine_version
+ # publicly_accessible = true
+ # db_subnet_group_name = aws_db_subnet_group.rds-subnet-group.name
+ db_subnet_group_name = data.aws_db_subnet_group.rds-subnet-group.name
+}
+
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/output.tf
new file mode 100644
index 0000000..8dc25ab
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/output.tf
@@ -0,0 +1,7 @@
+output "cluster_endpoint" {
+ value = aws_rds_cluster.sensor.endpoint
+}
+
+output "reader_endpoint" {
+ value = aws_rds_cluster.sensor.reader_endpoint
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/valiables.tf
new file mode 100644
index 0000000..bd507f7
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/aurora/valiables.tf
@@ -0,0 +1,44 @@
+
+
+variable "project_name" {
+ type = string
+}
+
+variable "company_name" {
+ type = string
+}
+
+# variable "aurora_sub_public_id" {
+# type = list(string)
+# }
+
+variable "db_name" {
+ type = string
+ default = "se"
+}
+variable "availability_zones" {
+ type = list(string)
+ default = ["ap-northeast-1a", "ap-northeast-1c"]
+}
+variable "aurora_engine_version" {
+ type = string
+ default = "8.0.mysql_aurora.3.04.1"
+}
+variable "aurora_username" {
+ type = string
+ default = "techsor"
+}
+variable "aurora_passwd" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "aurora_sg" {
+ type = list(string)
+}
+# variable "aurora-subnet-group" {
+# type = string
+# }
+# variable "aurora_zone" {
+# type = string
+# default = "ap-northeast-1a"
+# }
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dns/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dns/main.tf
new file mode 100644
index 0000000..1c6eb6d
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dns/main.tf
@@ -0,0 +1,28 @@
+data "aws_route53_zone" "selected" {
+ name = var.domain_name
+ private_zone = false
+}
+
+resource "aws_route53_record" "company-dns" {
+ zone_id = data.aws_route53_zone.selected.zone_id
+ name = "${var.company_name}.${data.aws_route53_zone.selected.name}"
+ type = "A"
+
+ alias {
+ name = var.alb_name
+ zone_id = var.alb_zone_id
+ evaluate_target_health = true
+ }
+}
+
+resource "aws_route53_record" "company-admin-dns" {
+ zone_id = data.aws_route53_zone.selected.zone_id
+ name = "${var.company_name}-admin.${data.aws_route53_zone.selected.name}"
+ type = "A"
+
+ alias {
+ name = var.admin_alb_name
+ zone_id = var.admin_alb_zone_id
+ evaluate_target_health = true
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dns/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dns/output.tf
new file mode 100644
index 0000000..e69de29
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dns/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dns/valiables.tf
new file mode 100644
index 0000000..0c4bd96
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dns/valiables.tf
@@ -0,0 +1,30 @@
+variable "domain_name" {
+ type = string
+ default = "kr-sensor.net"
+}
+
+variable "company_name" {
+ type = string
+ default = "new-company"
+}
+
+variable "alb_name" {
+ type = string
+ default = "kr-sensor.net"
+}
+
+variable "alb_zone_id" {
+ type = string
+ default = "kr-sensor.net"
+}
+
+variable "admin_alb_name" {
+ type = string
+ default = "kr-sensor.net"
+}
+
+variable "admin_alb_zone_id" {
+ type = string
+ default = "kr-sensor.net"
+}
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/main.tf
new file mode 100644
index 0000000..27c496b
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/main.tf
@@ -0,0 +1,52 @@
+### DynamoDB
+
+resource "aws_dynamodb_table" "alert_record_table" {
+ name = "alert_record_tokyo"
+ billing_mode = "PAY_PER_REQUEST" # 按需计费
+ stream_enabled = true
+ stream_view_type = "NEW_AND_OLD_IMAGES"
+ hash_key = "hashId"
+ range_key = "dateKey"
+ attribute { # attribute 块来定义表的属性
+ name = "hashId"
+ type = "S"
+ }
+
+ attribute {
+ name = "dateKey"
+ type = "N"
+ }
+
+ tags = {
+ Name = "dynamodb-tk-tatemono"
+ Environment = "production"
+ }
+}
+resource "aws_dynamodb_table" "common_data_center" {
+ name = "common_data_center_tokyo"
+ billing_mode = "PAY_PER_REQUEST" # 按需计费
+ stream_enabled = true
+ stream_view_type = "NEW_AND_OLD_IMAGES"
+ hash_key = "hashId"
+ range_key = "dateKey"
+ attribute { # attribute 块来定义表的属性
+ name = "hashId"
+ type = "S"
+ }
+
+ attribute {
+ name = "dateKey"
+ type = "N"
+ }
+
+ tags = {
+ Name = "dynamodb-tk-tatemono"
+ Environment = "production"
+ }
+}
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/output.tf
new file mode 100644
index 0000000..5c34478
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/output.tf
@@ -0,0 +1,6 @@
+output "alert_record_table_arn" {
+ value = aws_dynamodb_table.alert_record_table.stream_arn
+}
+output "common_data_center_arn" {
+ value = aws_dynamodb_table.common_data_center.stream_arn
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/variables.tf
new file mode 100644
index 0000000..9e747cf
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/dynamodb/variables.tf
@@ -0,0 +1,25 @@
+variable "aws_access_config_path" {
+ type = string
+ default = "/root/.aws/config"
+}
+
+variable "aws_access_credentials_path" {
+ type = string
+ default = "/root/.aws/credentials"
+}
+
+variable "project_name" {
+ type = string
+ default = "prod"
+}
+
+variable "region" {
+ type = string
+ default = "ap-northeast-1"
+}
+# variable "subnet_ids" {
+# type = list
+# }
+# variable "sggroup_ids" {
+# type = list
+# }
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/main.tf
new file mode 100644
index 0000000..e2e412a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/main.tf
@@ -0,0 +1,141 @@
+
+#data apolicy
+data aws_iam_policy AmazonEC2RoleforSSM{
+ name = "AmazonEC2RoleforSSM"
+}
+
+data aws_iam_policy AmazonS3FullAccess{
+ name = "AmazonS3FullAccess"
+}
+
+data aws_iam_policy CloudWatchAgentAdminPolicy{
+ name = "CloudWatchAgentAdminPolicy"
+}
+
+#Create a role
+#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role
+resource "aws_iam_role" "ec2_role" {
+ name = "access-ec2-role2"
+
+ # Terraform's "jsonencode" function converts a
+ # Terraform expression result to valid JSON syntax.
+ assume_role_policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = [
+ {
+ Action = "sts:AssumeRole"
+ Effect = "Allow"
+ Sid = ""
+ Principal = {
+ Service = "ec2.amazonaws.com"
+ }
+ },
+ ]
+ })
+}
+
+#Attach role to policy
+#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment
+resource "aws_iam_policy_attachment" "ec2_policy_role" {
+ name = "ec2_attachment"
+ roles = [aws_iam_role.ec2_role.name]
+ policy_arn = data.aws_iam_policy.AmazonEC2RoleforSSM.arn
+}
+
+resource "aws_iam_policy_attachment" "ec2_policy_role2" {
+ name = "ec2_attachment"
+ roles = [aws_iam_role.ec2_role.name]
+ policy_arn = data.aws_iam_policy.AmazonS3FullAccess.arn
+}
+
+resource "aws_iam_policy_attachment" "ec2_policy_role3" {
+ name = "ec2_attachment"
+ roles = [aws_iam_role.ec2_role.name]
+ policy_arn = data.aws_iam_policy.CloudWatchAgentAdminPolicy.arn
+}
+
+#Attach role to an instance profile
+#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile
+resource "aws_iam_instance_profile" "ec2_profile" {
+ name = "ec2-access-role"
+ role = aws_iam_role.ec2_role.name
+}
+# Create EC2 app 01
+resource "aws_instance" "app-server-01" {
+ # count = 2
+ ami = var.instance_ami
+ instance_type = var.instance_type[1]
+ # subnet_id = aws_subnet.protected[count.index].id
+ subnet_id = var.sub_protected_id_01
+
+ iam_instance_profile = aws_iam_instance_profile.ec2_profile.name
+
+ # vpc_security_group_ids = [aws_security_group.sg_app.id]
+ vpc_security_group_ids = var.security_group_sg_app
+
+
+ key_name = var.key_name
+ root_block_device {
+ volume_size = "${var.instance_ebs_size}"
+
+ }
+ tags = {
+ Name: "${var.project_name}-data-process-hub}"
+ }
+}
+# Create EC2 app 02 modules\ec2\main.tf
+resource "aws_instance" "app-server-02" {
+ # count = 2
+ ami = var.instance_ami
+ instance_type = var.instance_type[1]
+ # subnet_id = aws_subnet.protected[count.index].id
+ subnet_id = var.sub_protected_id_02
+
+ iam_instance_profile = aws_iam_instance_profile.ec2_profile.name
+
+ # vpc_security_group_ids = [aws_security_group.sg_app.id]
+ vpc_security_group_ids = var.security_group_sg_app
+ key_name = var.key_name
+ root_block_device {
+ volume_size = "${var.instance_ebs_size}"
+
+ }
+ tags = {
+ Name: "${var.project_name}-data-process-hub}"
+ }
+}
+
+# set public ip to bation
+resource "aws_eip" "lb" {
+ instance = aws_instance.bation-server.id
+ domain = "vpc"
+}
+
+# Create EC2 Bation
+resource "aws_instance" "bation-server" {
+ # count = 2
+ ami = var.instance_ami_bation
+ instance_type = var.instance_type[0]
+ # subnet_id = aws_subnet.public[0].id
+ subnet_id = var.sub_public_id
+
+
+ # vpc_security_group_ids = [aws_security_group.sg_bation.id]
+ vpc_security_group_ids = var.security_group_sg_bation
+
+ key_name = var.key_name
+ root_block_device {
+ volume_size = "8"
+
+ }
+ tags = {
+ Name: "${var.project_name}-bation"
+ }
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/output.tf
new file mode 100644
index 0000000..f850341
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/output.tf
@@ -0,0 +1,7 @@
+output "aws_instance_app_server_01" {
+ value = aws_instance.app-server-01.id
+}
+
+output "aws_instance_app_server_02" {
+ value = aws_instance.app-server-02.id
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/valiables.tf
new file mode 100644
index 0000000..51e0963
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ec2/valiables.tf
@@ -0,0 +1,68 @@
+variable "sub_protected_id_01" {
+ type = string
+}
+variable "sub_protected_id_02" {
+ type = string
+}
+variable "security_group_sg_app" {
+ type = list(string)
+}
+variable "sub_public_id" {
+ type = string
+}
+variable "security_group_sg_bation" {
+ type = list(string)
+}
+
+variable "project_name" {
+ type = string
+ default = "prod"
+}
+
+variable "id" {
+ type = list(string)
+ default = ["01", "02", "03"]
+}
+
+variable "availability_zones" {
+ type = list(string)
+ default = ["ap-northeast-1a", "ap-northeast-1c", "ap-northeast-1d"]
+}
+
+
+variable "instance_ami" {
+ type = string
+ default = "ami-0329eac6c5240c99d"
+}
+
+variable "instance_ami_bation" {
+ type = string
+ default = "ami-0329eac6c5240c99d"
+}
+
+variable "iam_instance_profile_name" {
+ type = string
+ default = "tokyo-building-ec2-access-role"
+}
+
+variable "key_name"{
+ type = string
+ default = "tk-Zeta"
+}
+variable "instance_type"{
+ type = list(string)
+ default = [ "t2.micro", "t3.medium", "m5.large"]
+}
+variable "instance_ebs_size" {
+ type = string
+ default = "40"
+}
+
+
+# variable "sg_env_name"{
+# type = list(string)
+# default = [ "bation", "app", "nat_03" ]
+# }
+
+# mysql
+#variable "app_name" {}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/main.tf
new file mode 100644
index 0000000..5146f08
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/main.tf
@@ -0,0 +1,132 @@
+
+
+# # arn - 存储库的完整 ARN。
+# # registry_id - 在其中创建存储库的注册表 ID。
+# # repository_url - 存储库的 URL(格式为 )。aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName
+# # tags_all - 分配给资源的标记映射,包括从提供程序default_tags配置块继承的标记。
+# resource "aws_iam_role" "ecr_get_role" {
+# name = "ecr_get_role"
+# assume_role_policy = jsonencode({
+# Version = "2012-10-17",
+# Statement = [
+# {
+# Action = "sts:AssumeRole",
+# Effect = "Allow",
+# Principal = {
+# Service = "ecs-tasks.amazonaws.com",
+# },
+# },
+# ],
+# })
+# }
+# data "aws_iam_policy_document" "ecr_access_policy" {
+# statement {
+# effect = "Allow"
+# actions = [
+# "ecr:GetAuthorizationToken"
+# ]
+# resources = ["*"]
+# }
+# }
+# resource "aws_iam_role_policy" "ecr_service_role_policy" {
+# name = "${var.project_name}_ECR_ServiceRolePolicy"
+# policy = data.aws_iam_policy_document.ecr_access_policy.json
+# role = aws_iam_role.ecr_get_role.name
+# }
+data "aws_ecr_repository" "business" {
+ # name = "business"
+ name = var.repo_business_back
+}
+data "aws_ecr_repository" "business-web" {
+ # name = "business-web"
+ name = var.repo_business_web
+}
+data "aws_ecr_repository" "receiver" {
+ # name = "receiver"
+ name = var.repo_receiver
+}
+data "aws_ecr_repository" "sender" {
+ # name = "sender"
+ name = var.repo_sender
+}
+data "aws_ecr_repository" "mqtt" {
+ # name = "sender"
+ name = var.repo_mqtt
+}
+data "aws_ecr_repository" "adminback" {
+ # name = "sender"
+ name = var.repo_adminback
+}
+data "aws_ecr_repository" "adminweb" {
+ # name = "sender"
+ name = var.repo_adminweb
+}
+
+# data "aws_ecr_image" "business" {
+# repository_name = "business"
+# image_tag = "latest"
+# }
+# data "aws_ecr_image" "business-web" {
+# repository_name = "business-web"
+# image_tag = "latest"
+# }
+# data "aws_ecr_image" "receiver" {
+# repository_name = "receiver"
+# image_tag = "latest"
+# }
+# data "aws_ecr_image" "sender" {
+# repository_name = "sender"
+# image_tag = "latest"
+# }
+
+# resource "aws_ecr_repository" "business" {
+# # name = "business"
+# name = "${var.repo_business_name}_${var.project_name}"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+
+# }
+# resource "aws_ecr_repository" "business-web" {
+# # name = "business-web"
+# name = "${var.repo_business_name_web}_${var.project_name}"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+
+# }
+# resource "aws_ecr_repository" "receiver" {
+# name = "${var.repo_business_receiver}_${var.project_name}"
+# # name = "receiver"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+# }
+# resource "aws_ecr_repository" "sender" {
+# # name = "sender"
+# name = "${var.repo_business_sender}_${var.project_name}"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+# }
+# resource "aws_ecr_repository" "mqtt" {
+# # name = "sender"
+# name = "${var.repo_business_mqtt}_${var.project_name}"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+# }
+
+
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/output.tf
new file mode 100644
index 0000000..72c9a9a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/output.tf
@@ -0,0 +1,42 @@
+output "business_uri" {
+ value = "${data.aws_ecr_repository.business.repository_url}:latest"
+}
+output "business_name" {
+ value = data.aws_ecr_repository.business.name
+}
+output "business-web_uri" {
+ value = "${data.aws_ecr_repository.business-web.repository_url}:latest"
+}
+output "business-web_name" {
+ value = data.aws_ecr_repository.business-web.name
+}
+output "receiver_uri" {
+ value = "${data.aws_ecr_repository.receiver.repository_url}:latest"
+}
+output "receiver_name" {
+ value = data.aws_ecr_repository.receiver.name
+}
+output "sender_uri" {
+ value = "${data.aws_ecr_repository.sender.repository_url}:latest"
+}
+output "sender_name" {
+ value = data.aws_ecr_repository.sender.name
+}
+output "mqtt_uri" {
+ value = "${data.aws_ecr_repository.mqtt.repository_url}:latest"
+}
+output "mqtt_name" {
+ value = data.aws_ecr_repository.mqtt.name
+}
+output "adminback_uri" {
+ value = "${data.aws_ecr_repository.adminback.repository_url}:latest"
+}
+output "adminback_name" {
+ value = data.aws_ecr_repository.adminback.name
+}
+output "adminweb_uri" {
+ value = "${data.aws_ecr_repository.adminweb.repository_url}:latest"
+}
+output "adminweb_name" {
+ value = data.aws_ecr_repository.adminweb.name
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/valiables.tf
new file mode 100644
index 0000000..09c6429
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecr/valiables.tf
@@ -0,0 +1,21 @@
+variable "repo_business_back" {
+ type = string
+}
+variable "repo_business_web" {
+ type = string
+}
+variable "repo_receiver" {
+ type = string
+}
+variable "repo_sender" {
+ type = string
+}
+variable "repo_mqtt" {
+ type = string
+}
+variable "repo_adminback" {
+ type = string
+}
+variable "repo_adminweb" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/main.tf
new file mode 100644
index 0000000..9a5f4fc
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/main.tf
@@ -0,0 +1,613 @@
+data aws_iam_role "ecs_task_role"{
+ name = "ecsTaskRole"
+}
+
+data aws_iam_role "ecs_task_execution_role"{
+ name = "ecsTaskExecutionRole"
+}
+
+resource "aws_cloudwatch_log_group" "ecs_task_logs" {
+ name = "/ecs/${var.company_name}-ecs-task"
+}
+
+resource "aws_ecs_cluster" "cluster" {
+ name = "${var.project_name}-${var.company_name}-cluster"
+}
+
+###### iotProcessEngine sender
+resource "aws_ecs_task_definition" "sender" {
+ family = "${var.project_name}-${var.company_name}-sender"
+ network_mode = "awsvpc"
+ requires_compatibilities = ["FARGATE"]
+ cpu = var.cpu_size[3]
+ memory = var.memory_size[3]
+ execution_role_arn = data.aws_iam_role.ecs_task_execution_role.arn
+ task_role_arn = data.aws_iam_role.ecs_task_role.arn
+
+ container_definitions = jsonencode([
+ {
+ name = "${var.sender_name}"
+ image = "${var.sender_image}"
+ logConfiguration = {
+ logDriver = "awslogs",
+ options = {
+ "awslogs-group" = "${aws_cloudwatch_log_group.ecs_task_logs.name}",
+ "awslogs-region" = "ap-northeast-1",
+ "awslogs-stream-prefix" = "${var.company_name}-sender-task"
+ }
+ }
+ essential = true
+ portMappings = [
+ {
+ containerPort = 8201
+ hostPort = 8201
+ Protocol = "http"
+ }
+ ]
+ environment = [
+ {
+ "name" = "awsAccesskey"
+ "value" = "${var.awsAccesskey}"
+ },
+ {
+ "name" = "dynamicJdbcUrl"
+ "value" = "jdbc:mysql://${var.datasourceDNS}/%s"
+ },
+ {
+ "name" = "dataCenterSenderTargetUrl"
+ "value" = "${var.dataCenterSenderTargetUrl}"
+ },
+ {
+ "name" = "defaultRedisCacheTTL"
+ "value" = "${var.defaultRedisCacheTTL}"
+ },
+ {
+ "name" = "env"
+ "value" = "${var.env}"
+ },
+ {
+ "name" = "java_opts"
+ "value" = "${var.java_opts}"
+ },
+ {
+ "name" = "jdbcPassword"
+ "value" = "${var.jdbcPassword}"
+ },
+ {
+ "name" = "jdbcUrl"
+ "value" = "jdbc:mysql://${var.datasourceDNS}/data_center_admin"
+ },
+ {
+ "name" = "jdbcUsername"
+ "value" = "${var.jdbcUsername}"
+ },
+ {
+ "name" = "logLevel"
+ "value" = "${var.logLevel}"
+ },
+ {
+ "name" = "redisDatabase"
+ "value" = "${var.redisDatabase}"
+ },
+ {
+ "name" = "redisHost"
+ "value" = "${var.redisHost}"
+ },
+ {
+ "name" = "redisLockExpire"
+ "value" = "${var.redisLockExpire}"
+ },
+ {
+ "name" = "redisMaxActive"
+ "value" = "${var.redisMaxActive}"
+ },
+ {
+ "name" = "redisMaxIdle"
+ "value" = "${var.redisMaxIdle}"
+ },
+ {
+ "name" = "redisMaxWait"
+ "value" = "${var.redisMaxWait}"
+ },
+ {
+ "name" = "redisMinIdle"
+ "value" = "${var.redisredisMinIdleMaxWait}"
+ },
+ {
+ "name" = "redisPassword"
+ "value" = "${var.redisPassword}"
+ },
+ {
+ "name" = "redisPort"
+ "value" = "${var.redisPort}"
+ },
+ {
+ "name" = "redisShutdownTimeout"
+ "value" = "${var.redisShutdownTimeout}"
+ },
+ {
+ "name" = "redisTimeout"
+ "value" = "${var.redisTimeout}"
+ },
+ {
+ "name" = "secretkey"
+ "value" = "${var.awsSecretkey}"
+ },
+ {
+ "name" = "stompUrl"
+ "value" = "${var.mqBrokerId}.mq.ap-northeast-1.amazonaws.com"
+ },
+ {
+ "name" = "mqttTopic"
+ "value" = "${var.mqttTopic}"
+ },
+ {
+ "name" = "messageProtocol"
+ "value" = "kinesis"
+ },
+ {
+ "name" = "stompPassword"
+ "value" = "${var.stompPassword}"
+ },
+ {
+ "name" = "mqttUrl"
+ "value" = "ssl://${var.mqBrokerId}.mq.ap-northeast-1.amazonaws.com:8883"
+ },
+ {
+ "name" = "stompPort"
+ "value" = "61614"
+ },
+ {
+ "name" = "mqttEnableLog"
+ "value" ="TRUE"
+ },
+ {
+ "name" = "alarmRedisPassword"
+ "value" ="${var.alarmRedisPassword}"
+ },
+ {
+ "name" = "alarmRedisDatabase"
+ "value" ="${var.alarmRedisDatabase}"
+ },
+ {
+ "name" = "mqttPassword"
+ "value" ="${var.mqttPassword}"
+ },
+ {
+ "name" = "alarmRedisPort"
+ "value" ="6379"
+ },
+ {
+ "name" = "alarmRedisHost"
+ "value" ="${var.redisHost}"
+ },
+ {
+ "name" = "roid2Url"
+ "value" ="${var.roid2Url}"
+ },
+ {
+ "name" = "mqttNormalTopic"
+ "value" ="${var.mqttNormalTopic}"
+ },
+ {
+ "name" = "keepAliveInterval"
+ "value" ="60"
+ },
+ {
+ "name" = "mqttUsername"
+ "value" ="${var.mqttUsername}"
+ },
+ {
+ "name" = "stompUsername"
+ "value" ="${var.stompUsername}"
+ },
+ {
+ "name" = "mqttAlertTopic"
+ "value" ="${var.mqttAlertTopic}"
+ },
+ {
+ "name" = "mqttConnectionTimeout"
+ "value" = "60"
+ },
+ {
+ "name" = "roidAuthorization"
+ "value" = "${var.roidAuthorization}"
+ },
+ {
+ "name" = "queryPushInfoUrl"
+ "value" = "https://${var.queryPushInfoUrl}/api/targetConfig/config/v2/queryAlertForwardConfigByDeviceId"
+ },
+ {
+ "name" = "roidAlarmCancelUrl"
+ "value" = "${var.roidAlarmCancelUrl}"
+ },
+ {
+ "name" = "roidAlarmUrl"
+ "value" = "${var.roidAlarmUrl}"
+ },
+ {
+ "name" = "roid2Authorization"
+ "value" = "${var.roid2Authorization}"
+ },
+ {
+ "name" = "endpoint"
+ "value" ="${var.endpoint}"
+ },
+ {
+ "name" = "maxThreads"
+ "value" ="200"
+ },
+ {
+ "name" = "maxAcceptCount"
+ "value" ="100"
+ },
+ {
+ "name" = "maxConnections"
+ "value" ="10000"
+ },
+ ]
+ }
+ ])
+}
+
+resource "aws_ecs_service" "iotProcessEngine" {
+ # name = "iotProcessEngine"
+ name = "${var.company_name}-${var.sender_name}-serv"
+ cluster = aws_ecs_cluster.cluster.id
+ task_definition = aws_ecs_task_definition.sender.arn
+ launch_type = "FARGATE"
+ desired_count = 1
+ network_configuration {
+ subnets = tolist(var.autoscaling_subnet)
+ security_groups = tolist(var.sgapp_id)
+ }
+ load_balancer {
+ target_group_arn = var.sender_tg_8201_arn
+ container_name = "${var.sender_name}"
+ container_port = 8201
+ }
+}
+
+# receiver
+resource "aws_ecs_task_definition" "receiver" {
+ family = "${var.project_name}-${var.company_name}-receiver"
+ network_mode = "awsvpc"
+ requires_compatibilities = ["FARGATE"]
+ cpu = var.cpu_size[3]
+ memory = var.memory_size[3]
+ execution_role_arn = data.aws_iam_role.ecs_task_execution_role.arn
+ task_role_arn = data.aws_iam_role.ecs_task_role.arn
+
+ container_definitions = jsonencode([
+ {
+ name = "${var.receiver_name}"
+ # image = "923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/business-web:latest"
+ image = "${var.receiver_image}"
+ logConfiguration = {
+ logDriver = "awslogs",
+ options = {
+ "awslogs-group" = "${aws_cloudwatch_log_group.ecs_task_logs.name}",
+ "awslogs-region" = "ap-northeast-1",
+ "awslogs-stream-prefix" = "${var.company_name}-receiver-task"
+ }
+ }
+ essential = true
+ portMappings = [
+ {
+ containerPort = 8200
+ hostPort = 8200
+ Protocol = "http"
+ }
+ ]
+ environment = [
+ {
+ "name" = "env"
+ "value" = "${var.env}"
+ },
+ {
+ "name" = "dynamicJdbcUrl"
+ "value" = "jdbc:mysql://${var.datasourceDNS}/%s"
+ },
+ {
+ "name" = "jdbcPassword"
+ "value" = "${var.jdbcPassword}"
+ },
+ {
+ "name" = "jdbcUrl"
+ "value" = "jdbc:mysql://${var.datasourceDNS}/data_center_admin"
+ },
+ {
+ "name" = "jdbcUsername"
+ "value" = "${var.jdbcUsername}"
+ },
+ {
+ "name" = "redisHost"
+ "value" = "${var.redisHost}"
+ },
+ {
+ "name" = "redisPassword"
+ "value" = "${var.redisPassword}"
+ },
+ {
+ "name" = "redisPort"
+ "value" = "${var.redisPort}"
+ },
+ {
+ "name" = "redisDatabase"
+ "value" = "${var.redisDatabase}"
+ },
+ {
+ "name" = "redisTimeout"
+ "value" = "${var.redisTimeout}"
+ },
+ {
+ "name" = "redisMaxActive"
+ "value" = "${var.redisMaxActive}"
+ },
+ {
+ "name" = "redisLockExpire"
+ "value" = "${var.redisLockExpire}"
+ },
+ {
+ "name" = "redisMinIdle"
+ "value" = "${var.redisMinIdle}"
+ },
+ {
+ "name" = "redisMaxIdle"
+ "value" = "${var.redisMaxIdle}"
+ },
+ {
+ "name" = "redisShutdownTimeout"
+ "value" = "${var.redisShutdownTimeout}"
+ },
+ {
+ "name" = "redisMaxWait"
+ "value" = "${var.redisMaxWait}"
+ },
+ {
+ "name" = "dataCenterReceiverTargetUrl"
+ "value" = "http://${var.dataCenterReceiverTargetUrl}:8201"
+ },
+ {
+ "name" = "awsaccesskey"
+ "value" = "${var.awsAccesskey}"
+ },
+ {
+ "name" = "secretkey"
+ "value" = "${var.awsSecretkey}"
+ },
+ {
+ "name" = "deltaTopic"
+ "value" = "${var.deltaTopic}"
+ },
+ {
+ "name" = "deltaTopicHost"
+ "value" = "${var.deltaTopicHost}"
+ },
+ {
+ "name" = "deltaUserName"
+ "value" = "${var.deltaUserName}"
+ },
+ {
+ "name" = "deltaUsePassWordrName"
+ "value" = "${var.deltaUsePassWordrName}"
+ },
+ {
+ "name" = "deltaEnableSSL"
+ "value" = "${var.deltaEnableSSL}"
+ },
+ {
+ "name" = "dynamoTableName"
+ "value" = "${var.dynamoTableName}"
+ },
+ {
+ "name" = "logLevel"
+ "value" = "${var.logLevel}"
+ },
+ {
+ "name" = "JAVA_OPTS"
+ "value" = "${var.JAVA_OPTS}"
+ },
+ {
+ "name" = "mqttUrl"
+ "value" = "ssl://${var.mqBrokerId}.mq.ap-northeast-1.amazonaws.com:8883"
+ },
+ {
+ "name" = "mqttUsername"
+ "value" = "${var.mqttUsername}"
+ },
+ {
+ "name" = "mqttPassword"
+ "value" = "${var.mqttPassword}"
+ },
+ {
+ "name" = "mqttTopic"
+ "value" = "${var.mqttTopic}"
+ },
+ {
+ "name" = "mqttEnableLog"
+ "value" = "${var.mqttEnableLog}"
+ },
+ {
+ "name" = "keepAliveInterval"
+ "value" = "${var.keepAliveInterval}"
+ },
+ {
+ "name" = "mqttConnectionTimeout"
+ "value" = "${var.mqttConnectionTimeout}"
+ },
+ {
+ "name" = "mqttAlertTopic"
+ "value" = "${var.mqttAlertTopic}"
+ },
+ {
+ "name" = "mqttNormalTopic"
+ "value" = "${var.mqttNormalTopic}"
+ },
+ ]
+ }
+ ])
+}
+
+resource "aws_ecs_service" "iotDatareceiver" {
+ # name = "iotDatareceiver"
+ name = "${var.company_name}-${var.receiver_name}-serv"
+ cluster = aws_ecs_cluster.cluster.id
+ task_definition = aws_ecs_task_definition.receiver.arn
+ launch_type = "FARGATE"
+ desired_count = 1
+ network_configuration {
+ subnets = tolist(var.autoscaling_subnet)
+ security_groups = tolist(var.sgapp_id)
+ }
+ load_balancer {
+ target_group_arn = var.receiver_tg_8200_arn
+ container_name = "${var.receiver_name}"
+ container_port = 8200
+ }
+}
+
+
+# 自动扩展的追加 sender
+resource "aws_appautoscaling_target" "ecs_target_sender" {
+ max_capacity = 12
+ min_capacity = 2
+ resource_id = "service/${aws_ecs_cluster.cluster.name}/${aws_ecs_service.iotProcessEngine.name}"
+ scalable_dimension = "ecs:service:DesiredCount"
+ service_namespace = "ecs"
+}
+
+#sender add
+resource "aws_appautoscaling_policy" "sender_scale_up" {
+ name = "${var.company_name}-sender-scale-up"
+ policy_type = "StepScaling"
+ resource_id = aws_appautoscaling_target.ecs_target_sender.resource_id
+ scalable_dimension = aws_appautoscaling_target.ecs_target_sender.scalable_dimension
+ service_namespace = aws_appautoscaling_target.ecs_target_sender.service_namespace
+
+ step_scaling_policy_configuration {
+ adjustment_type = "ChangeInCapacity"
+ cooldown = 60
+ metric_aggregation_type = "Maximum"
+
+ step_adjustment {
+ metric_interval_upper_bound = 0
+ scaling_adjustment = 1
+ }
+ }
+}
+
+resource "aws_appautoscaling_policy" "sender_scale_down" {
+ name = "${var.company_name}-sender-scale-down"
+ policy_type = "StepScaling"
+ resource_id = aws_appautoscaling_target.ecs_target_sender.resource_id
+ scalable_dimension = aws_appautoscaling_target.ecs_target_sender.scalable_dimension
+ service_namespace = aws_appautoscaling_target.ecs_target_sender.service_namespace
+
+ step_scaling_policy_configuration {
+ adjustment_type = "ChangeInCapacity"
+ cooldown = 60
+ metric_aggregation_type = "Maximum"
+
+ step_adjustment {
+ metric_interval_upper_bound = 0
+ scaling_adjustment = -1
+ }
+ }
+}
+
+#receiver add
+resource "aws_appautoscaling_target" "ecs_target_receiver" {
+ max_capacity = 12
+ min_capacity = 2
+ resource_id = "service/${aws_ecs_cluster.cluster.name}/${aws_ecs_service.iotDatareceiver.name}"
+ scalable_dimension = "ecs:service:DesiredCount"
+ service_namespace = "ecs"
+}
+
+resource "aws_appautoscaling_policy" "receiver_scale_up" {
+ name = "${var.company_name}-receiver-scale-up"
+ policy_type = "StepScaling"
+ resource_id = aws_appautoscaling_target.ecs_target_receiver.resource_id
+ scalable_dimension = aws_appautoscaling_target.ecs_target_receiver.scalable_dimension
+ service_namespace = aws_appautoscaling_target.ecs_target_receiver.service_namespace
+
+ step_scaling_policy_configuration {
+ adjustment_type = "ChangeInCapacity"
+ cooldown = 60
+ metric_aggregation_type = "Maximum"
+
+ step_adjustment {
+ metric_interval_upper_bound = 0
+ scaling_adjustment = 1
+ }
+ }
+}
+
+resource "aws_appautoscaling_policy" "receiver_scale_down" {
+ name = "${var.company_name}-receiver-scale-down"
+ policy_type = "StepScaling"
+ resource_id = aws_appautoscaling_target.ecs_target_receiver.resource_id
+ scalable_dimension = aws_appautoscaling_target.ecs_target_receiver.scalable_dimension
+ service_namespace = aws_appautoscaling_target.ecs_target_receiver.service_namespace
+
+ step_scaling_policy_configuration {
+ adjustment_type = "ChangeInCapacity"
+ cooldown = 60
+ metric_aggregation_type = "Maximum"
+
+ step_adjustment {
+ metric_interval_upper_bound = 0
+ scaling_adjustment = -1
+ }
+ }
+}
+
+# 监控条件的追加
+resource "aws_cloudwatch_metric_alarm" "high_request_count_per_target" {
+ alarm_name = "${var.project_name}-${var.company_name}-high-request"
+ comparison_operator = "GreaterThanOrEqualToThreshold"
+ evaluation_periods = 5
+ metric_name = "RequestCountPerTarget"
+ namespace = "AWS/ApplicationELB"
+ period = 60
+ statistic = "Average"
+ threshold = 20000
+ alarm_description = "Alarm when request count per target exceeds 20000 per minute"
+
+ dimensions = {
+ TargetGroup = var.sender_tg_8201_arn_suffix # Replace with your Target Group ARN suffix
+ }
+
+ actions_enabled = true
+ alarm_actions = [aws_appautoscaling_policy.sender_scale_up.arn, aws_appautoscaling_policy.receiver_scale_up.arn]
+}
+
+resource "aws_cloudwatch_metric_alarm" "low_request_count_per_target" {
+ alarm_name = "${var.project_name}-${var.company_name}-low-request"
+ comparison_operator = "LessThanThreshold"
+ evaluation_periods = 5
+ metric_name = "RequestCountPerTarget"
+ namespace = "AWS/ApplicationELB"
+ period = 60
+ statistic = "Average"
+ threshold = 15000
+ alarm_description = "Alarm when request count per target lower 15000 per minute"
+
+ dimensions = {
+ TargetGroup = var.sender_tg_8201_arn_suffix # Replace with your Target Group ARN suffix
+ }
+
+ actions_enabled = true
+ alarm_actions = [aws_appautoscaling_policy.sender_scale_down.arn, aws_appautoscaling_policy.receiver_scale_down.arn]
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
+
+
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/user_data.sh b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/user_data.sh
new file mode 100644
index 0000000..4400f9c
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/user_data.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+echo ECS_CLUSTER='${ecs_cluster_name}' >> /etc/ecs/ecs.config
+
+# sudo reboot
+# systemctl restart ecs
+# sudo yum install -y wget aws-cli
+sudo yum update -y ecs-init
+sudo systemctl restart docker
+# sleep 15
+# tg_arn='arn:aws:elasticloadbalancing:ap-northeast-1:923770123186:targetgroup/iot-process-engine-tg/8d2cd9d3ef4de6e3'
+# ec2_id=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)
+# aws --region ap-northeast-1 elbv2 deregister-targets --target-group-arn $tg_arn --targets Id=$ec2_id,Port=8201
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/valiables.tf
new file mode 100644
index 0000000..e0ad996
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/ecs_fargate/valiables.tf
@@ -0,0 +1,366 @@
+variable "project_name" {
+ type = string
+}
+variable "company_name" {
+ type = string
+}
+# variable "iotmqtt_tg_1883_arn" {
+# type = string
+# }
+# variable "iotmqtt_tg_8083_arn" {
+# type = string
+# }
+# variable "iotmqtt_tg_8883_arn" {
+# type = string
+# }
+# variable "businessBack_tg_20016_arn" {
+# type = string
+# }
+# variable "businessWeb_tg_80_arn" {
+# type = string
+# }
+variable "sender_tg_8201_arn" {
+ type = string
+}
+variable "sender_tg_8201_arn_suffix" {
+ type = string
+}
+# variable "iotmqtt_tg_8089_arn" {
+# type = string
+# }
+# variable "iotmqtt_tg_18083_arn" {
+# type = string
+# }
+# variable "adminBack_tg_20015_arn" {
+# type = string
+# }
+variable "receiver_tg_8200_arn" {
+ type = string
+}
+# variable "adminWeb_tg_80_arn" {
+# type = string
+# }
+variable "cpu_size" {
+ type = list(number)
+ default = [256, 512, 1024, 2048, 4096]
+}
+
+variable "memory_size" {
+ type = list(number)
+ default = [512, 1024, 2048, 4096, 8192]
+}
+
+# variable "container_name" {}
+variable "autoscaling_subnet" {}
+
+variable "sgapp_id" {}
+variable "sender_name" {
+ type = string
+}
+variable "sender_image" {
+ type = string
+}
+variable "receiver_name" {
+ type = string
+}
+variable "receiver_image" {
+ type = string
+}
+variable "business_name" {
+ type = string
+}
+variable "business_image" {
+ type = string
+}
+variable "business_web_name" {
+ type = string
+}
+variable "business_web_image" {
+ type = string
+}
+variable "adminWeb_name" {
+ type = string
+}
+variable "adminWeb_image" {
+ type = string
+}
+variable "adminback_name" {
+ type = string
+}
+variable "adminback_image" {
+ type = string
+}
+variable "mqtt_name" {
+ type = string
+}
+variable "mqtt_image" {
+ type = string
+}
+# variable "redisDatabase" {
+# type = string
+# default = "14"
+# }
+variable "awsAccesskey" {
+ type = string
+ default = "AKIA4MTWHEP3W7M4BGP5"
+}
+# variable "awsBucket" {
+# type = string
+# default = "databucket-381659385655"
+# }
+variable "mqttUrl" {
+ type = string
+ default = "tcp://106.75.71.119:1883"
+}
+
+variable "mqttUsername" {
+ type = string
+ default = "techsor"
+}
+
+variable "mqttPassword" {
+ type = string
+ default = "Abc#123456xyz"
+}
+
+variable "mqttTopic" {
+ type = string
+ default = "topic"
+}
+variable "mqttEnableLog" {
+ type = string
+ default = "true"
+}
+variable "keepAliveInterval" {
+ type = string
+ default = "60"
+}
+variable "mqttConnectionTimeout" {
+ type = string
+ default = "60"
+}
+variable "mqttAlertTopic" {
+ type = string
+ default = "alertTopic"
+}
+variable "mqttNormalTopic" {
+ type = string
+}
+variable "apiEnable" {
+ type = string
+ default = "false"
+}
+variable "webLoginUrl" {
+ type = string
+ default = "http://www-stg.kr-sensor.net/#/user/login"
+}
+variable "thirdBusinessHost" {
+ type = string
+ default = "http://www-stg.kr-sensor.net/api"
+}
+variable "awsSecretkey" {
+ type = string
+ default = "FY1nQm6nQg1GxDcyIzk0rQRMiYwSoc4GkLZrVwNr"
+}
+variable "datacenterV1QueryUrl" {
+ type = string
+ default = "https://api-stg.ttkdatatechbuild.com/datacenter/v1/query"
+}
+variable "mybatisLogLevel" {
+ type = string
+ default = "ERROR"
+}
+variable "datasourceDNS" {
+ type = string
+ default = ""
+}
+variable "datasourcePassword" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "datasourceTimeZone" {
+ type = string
+ default = "Asia/Tokyo"
+}
+variable "datasourceUsername" {
+ type = string
+ default = "techsor"
+}
+variable "ibatisLoggingLog" {
+ type = string
+ default = "ERROR"
+}
+variable "ibatisLoggingLogFactory" {
+ type = string
+ default = "ERROR"
+}
+variable "loggingAppender" {
+ type = string
+ default = "CONSOLELOG"
+}
+variable "loggingLevel" {
+ type = string
+ default = "DEBUG"
+}
+variable "loggingPath" {
+ type = string
+ default = "/home/data-center-business/log"
+}
+variable "redisHost" {
+ type = string
+ default = "replication-group-tokyo-build.ncvpel.ng.0001.apne1.cache.amazonaws.com"
+}
+variable "redisPassword" {
+ type = string
+ default = ""
+}
+variable "dataCenterSenderTargetUrl" {
+ type = string
+ default = "http://43.163.243.201:8030/nesic/deviceId/"
+}
+variable "defaultRedisCacheTTL" {
+ type = string
+ default = "3600000"
+}
+variable "env" {
+ type = string
+ default = "prd"
+}
+
+variable "java_opts" {
+ type = string
+ default = "-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:G1NewSizePercent=20 -XX:G1MaxNewSizePercent=60 -XX:InitialHeapSize=2g -Xmx2500m -XX:MetaspaceSize=128m -XX:+PrintGCDetails -XX:+PrintGCDatestamps -Xloggc:/app/gc.log"
+}
+variable "jdbcPassword" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "jdbcUsername" {
+ type = string
+ default = "techsor"
+}
+variable "logLevel" {
+ type = string
+ default = "ERROR"
+}
+variable "redisDatabase" {
+ type = string
+ default = "14"
+}
+variable "redisLockExpire" {
+ type = string
+ default = "500"
+}
+variable "redisMaxActive" {
+ type = string
+ default = "7000"
+}
+variable "redisMaxIdle" {
+ type = string
+ default = "7000"
+}
+variable "redisMaxWait" {
+ type = string
+ default = "10000"
+}
+variable "redisredisMinIdleMaxWait" {
+ type = string
+ default = "0"
+}
+variable "redisPort" {
+ type = string
+ default = "6379"
+}
+variable "redisShutdownTimeout" {
+ type = string
+ default = "30000"
+}
+variable "redisTimeout" {
+ type = string
+ default = "30000"
+}
+# variable "dynamicJdbcUrl" {
+# type = string
+# default = "jdbc:mysql://rm-bp11k2zm2fr7864428o.mysql.rds.aliyuncs.com/"
+# }
+variable "redisMinIdle" {
+ type = string
+ default = "0"
+}
+variable "dataCenterReceiverTargetUrl" {
+ type = string
+ default = "http://39.107.211.201:820"
+}
+variable "deltaTopic" {
+ type = string
+ default = "Publish_Topic"
+}
+variable "deltaTopicHost" {
+ type = string
+ default = "tcp://:1883"
+}
+variable "deltaUserName" {
+ type = string
+ default = "techsor23"
+}
+variable "deltaUsePassWordrName" {
+ type = string
+ default = "techsorAsd123456"
+}
+variable "deltaEnableSSL" {
+ type = string
+ default = "false"
+}
+variable "dynamoTableName" {
+ type = string
+ default = "tokyo-building"
+}
+variable "JAVA_OPTS" {
+ type = string
+ default = "-XX:+UseZGC -Xms1g -Xmx2g -XX:MetaspaceSize=256m -Xlog:gc*:file=/app/gc.log:time,level,tags"
+}
+variable "mqBrokerId" {
+ type = string
+ default = "b-f5eeb911-97dd-4457-8321-185bc4aa5666-1"
+}
+# variable "stompUrl" {
+# type = string
+# default = "b-xxxx-xxxx-xxxx-xxxx-xxxx-1.mq.ap-northeast-1.amazonaws.com"
+# }
+variable "endpoint" {
+ type = string
+ default = "test"
+}
+variable "stompPassword" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "alarmRedisPassword" {
+ type = string
+ default = ""
+}
+variable "alarmRedisDatabase" {
+ type = string
+}
+variable "roid2Url" {
+ type = string
+}
+variable "roidAlarmUrl" {
+ type = string
+}
+variable "roidAlarmCancelUrl" {
+ type = string
+}
+variable "stompUsername" {
+ type = string
+ default = "techsor"
+}
+variable "queryPushInfoUrl" {
+ type = string
+}
+variable "roidAuthorization" {
+ type = string
+}
+variable "roid2Authorization" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/eventbridge/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/eventbridge/main.tf
new file mode 100644
index 0000000..913831c
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/eventbridge/main.tf
@@ -0,0 +1,118 @@
+data "aws_caller_identity" "current" {}
+
+resource "aws_iam_role" "pipes-role" {
+ name = "${var.company_name}_pipes_role"
+ assume_role_policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = {
+ Effect = "Allow"
+ Action = "sts:AssumeRole"
+ Principal = {
+ Service = "pipes.amazonaws.com"
+ }
+ Condition = {
+ StringEquals = {
+ "aws:SourceAccount" = "${data.aws_caller_identity.current.id}"
+ }
+ }
+ }
+ })
+}
+
+resource "aws_iam_role_policy" "source-policy" {
+ role = aws_iam_role.pipes-role.id
+ name = "${var.company_name}_source-policy"
+ policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = [
+ {
+ Effect = "Allow"
+ Action = [
+ "kinesis:DescribeStream",
+ "kinesis:DescribeStreamSummary",
+ "kinesis:GetRecords",
+ "kinesis:GetShardIterator",
+ "kinesis:ListStreams",
+ "kinesis:ListShards"
+ ],
+ Resource = [
+ "${var.aws_kinesis_stream_arn}",
+ ]
+ },
+ ]
+ })
+}
+
+resource "aws_iam_role_policy" "target-policy" {
+ role = aws_iam_role.pipes-role.id
+ name = "${var.company_name}_target-policy"
+ policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = [
+ {
+ Effect = "Allow"
+ Action = [
+ "lambda:InvokeFunction"
+ ],
+ Resource = [
+ "${var.aws_lambda_arn}",
+ ]
+ },
+ ]
+ })
+}
+
+# resource "aws_sqs_queue" "source" {}
+
+# resource "aws_iam_role_policy" "target" {
+# role = aws_iam_role.example.id
+# policy = jsonencode({
+# Version = "2012-10-17"
+# Statement = [
+# {
+# Effect = "Allow"
+# Action = [
+# "sqs:SendMessage",
+# ],
+# Resource = [
+# aws_sqs_queue.target.arn,
+# ]
+# },
+# ]
+# })
+# }
+
+resource "aws_pipes_pipe" "example" {
+ depends_on = [aws_iam_role_policy.source-policy, aws_iam_role_policy.target-policy]
+ name = "${var.company_name}-kinesis-lambda-pipes"
+ role_arn = aws_iam_role.pipes-role.arn
+ source = var.aws_kinesis_stream_arn
+ target = var.aws_lambda_arn
+
+ source_parameters {
+ kinesis_stream_parameters {
+ starting_position = "LATEST"
+ batch_size = 100
+ maximum_record_age_in_seconds = 3600
+ maximum_retry_attempts = 3
+ parallelization_factor = 10
+ }
+ }
+
+ target_parameters {
+ lambda_function_parameters {
+ invocation_type = "FIRE_AND_FORGET"
+ }
+ }
+}
+
+
+
+# data "aws_caller_identity" "current" {}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/eventbridge/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/eventbridge/output.tf
new file mode 100644
index 0000000..e69de29
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/eventbridge/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/eventbridge/valiables.tf
new file mode 100644
index 0000000..aa9fa7a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/eventbridge/valiables.tf
@@ -0,0 +1,13 @@
+
+
+variable "company_name" {
+ type = string
+}
+
+variable "aws_kinesis_stream_arn" {
+ type = string
+}
+
+variable "aws_lambda_arn" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/glue_job/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/glue_job/main.tf
new file mode 100644
index 0000000..8b6171e
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/glue_job/main.tf
@@ -0,0 +1,42 @@
+data aws_iam_role "gluejob_role"{
+ name = "AWSGlueServiceRole"
+}
+
+resource "aws_glue_job" "example" {
+ name = "${var.project_name}-${var.company_name}-job"
+ role_arn = data.aws_iam_role.gluejob_role.arn
+
+ command {
+ # name = "pythonshell"
+ script_location = "s3://aws-glue-assets-381659385655-ap-northeast-1/scripts/tokyobuild-gluejob.py"
+ python_version = "3"
+ }
+
+ default_arguments = {
+ "--jdbcUrl" = "jdbc:mysql://${var.aurora_endpoint}:3306/third"
+ }
+
+ connections = ["Mysql"]
+
+ worker_type = "G.1X"
+ number_of_workers = 4
+
+}
+
+resource "aws_glue_trigger" "example_trigger" {
+ name = "${var.project_name}-${var.company_name}-trigger"
+ type = "SCHEDULED"
+
+ schedule = "cron(0 15 * * ? *)"
+
+ actions {
+ job_name = aws_glue_job.example.name
+ }
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/glue_job/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/glue_job/output.tf
new file mode 100644
index 0000000..e69de29
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/glue_job/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/glue_job/valiables.tf
new file mode 100644
index 0000000..02c15b2
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/glue_job/valiables.tf
@@ -0,0 +1,12 @@
+variable "project_name" {
+ type = string
+}
+
+variable "company_name" {
+ type = string
+}
+
+variable "aurora_endpoint" {
+ type = string
+ # default = "sensor-plantform.cluster-cde6q2assvmn.ap-northeast-1.rds.amazonaws.com"
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/main.tf
new file mode 100644
index 0000000..e741512
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/main.tf
@@ -0,0 +1,89 @@
+# 创建kinesis data stream
+resource "aws_kinesis_stream" "kinesis" {
+ name = "${var.company_name}-stream"
+ stream_mode_details {
+ stream_mode = "ON_DEMAND"
+ }
+}
+
+# data "aws_caller_identity" "current" {}
+
+# # 创建datalake
+# resource "aws_s3_bucket" "bucket" {
+# bucket = "${var.project_name}-datalake-${data.aws_caller_identity.current.account_id}"
+# }
+
+# resource "aws_kinesis_firehose_delivery_stream" "extended_s3_stream" {
+# name = "${var.project_name}-to-s3-stream"
+# destination = "extended_s3"
+
+# extended_s3_configuration {
+# role_arn = aws_iam_role.firehose_role.arn
+# bucket_arn = aws_s3_bucket.bucket.arn
+# # buffering_size = 128
+# dynamic_partitioning_configuration {
+# enabled = true
+# }
+# prefix = "firehosepart/date=!{partitionKeyFromQuery:dateKey}/"
+# error_output_prefix = "errorpart/"
+# processing_configuration {
+# enabled = "true"
+# processors {
+# type = "MetadataExtraction"
+# # parameters {
+# # parameter_name = "JsonParsingEngine"
+# # parameter_value = "JQ-1.6"
+# # }
+# parameters {
+# parameter_name = "MetadataExtractionQuery"
+# parameter_value = "{dateKey:.dateKey}"
+# }
+# }
+# }
+# }
+# }
+
+# data "aws_iam_policy_document" "firehose_assume_role" {
+# statement {
+# effect = "Allow"
+
+# principals {
+# type = "Service"
+# identifiers = ["firehose.amazonaws.com"]
+# }
+
+# actions = ["sts:AssumeRole"]
+# }
+# }
+
+# resource "aws_iam_role" "firehose_role" {
+# name = "firehose_test_role"
+# assume_role_policy = data.aws_iam_policy_document.firehose_assume_role.json
+# }
+
+# data "aws_iam_policy_document" "lambda_assume_role" {
+# statement {
+# effect = "Allow"
+
+# principals {
+# type = "Service"
+# identifiers = ["lambda.amazonaws.com"]
+# }
+
+# actions = ["sts:AssumeRole"]
+# }
+# }
+
+# resource "aws_iam_role" "lambda_iam" {
+# name = "lambda_iam"
+# assume_role_policy = data.aws_iam_policy_document.lambda_assume_role.json
+# }
+
+
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/output.tf
new file mode 100644
index 0000000..67e3c0f
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/output.tf
@@ -0,0 +1,7 @@
+output "aws_kinesis_stream_name" {
+ value = aws_kinesis_stream.kinesis.name
+}
+
+output "aws_kinesis_stream_arn" {
+ value = aws_kinesis_stream.kinesis.arn
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/valiables.tf
new file mode 100644
index 0000000..4f2c94e
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/kinesis/valiables.tf
@@ -0,0 +1,6 @@
+
+
+variable "company_name" {
+ type = string
+}
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/kinesisStreamToLambdaDemo-b9494dc1-fa94-4184-ab34-2707c917b543.zip b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/kinesisStreamToLambdaDemo-b9494dc1-fa94-4184-ab34-2707c917b543.zip
new file mode 100644
index 0000000..ddeb36e
Binary files /dev/null and b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/kinesisStreamToLambdaDemo-b9494dc1-fa94-4184-ab34-2707c917b543.zip differ
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/main.tf
new file mode 100644
index 0000000..93673fa
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/main.tf
@@ -0,0 +1,140 @@
+# aws role
+resource "aws_iam_role" "lambda_role" {
+ name = "kinesisToLambda_${var.company_name}_role"
+
+ assume_role_policy = jsonencode({
+ Version = "2012-10-17",
+ Statement = [
+ {
+ Action = "sts:AssumeRole",
+ Effect = "Allow",
+ Principal = {
+ Service = "lambda.amazonaws.com",
+ },
+ },
+ ],
+ })
+}
+
+data "aws_iam_policy" "AWSLambdaBasicExecutionRole" {
+ name = "AWSLambdaBasicExecutionRole"
+}
+
+data "aws_iam_policy" "AWSLambdaKinesisExecutionRole" {
+ name = "AWSLambdaKinesisExecutionRole"
+}
+
+data "aws_iam_policy" "AWSLambdaVPCAccessExecutionRole" {
+ name = "AWSLambdaVPCAccessExecutionRole"
+}
+
+resource "aws_iam_role_policy_attachment" "lambda_execution_policy_attachment" {
+ policy_arn = data.aws_iam_policy.AWSLambdaBasicExecutionRole.arn
+ role = aws_iam_role.lambda_role.name
+}
+
+resource "aws_iam_role_policy_attachment" "lambda_execution_policy_attachment2" {
+ policy_arn = data.aws_iam_policy.AWSLambdaKinesisExecutionRole.arn
+ role = aws_iam_role.lambda_role.name
+}
+
+resource "aws_iam_role_policy_attachment" "lambda_execution_policy_attachment3" {
+ policy_arn = data.aws_iam_policy.AWSLambdaVPCAccessExecutionRole.arn
+ role = aws_iam_role.lambda_role.name
+}
+
+resource "aws_lambda_function" "kinesisStreamToLambda" {
+ function_name = "kinesisToLambda_${var.company_name}"
+ runtime = "java11"
+ handler = "com.techsensor.aws.mqtt.lambda.handler.AwsMqttHandler::handleRequest"
+ filename = "./modules/lambda/kinesisStreamToLambdaDemo-b9494dc1-fa94-4184-ab34-2707c917b543.zip"
+ role = aws_iam_role.lambda_role.arn # 使用你已有的 Lambda 角色或创建一个新的
+ memory_size = 512
+ timeout = 900
+
+ snap_start {
+ apply_on = "PublishedVersions"
+ }
+
+ vpc_config {
+ subnet_ids = var.subnet_ids # 替换为你的子网 ID
+ security_group_ids = var.sggroup_ids # 替换为你的安全组 ID
+ }
+
+ environment {
+ variables = {
+ AURORA_PASSWORD = "${var.AURORA_PASSWORD}",
+ AURORA_URL = "jdbc:mysql://${var.AURORA_URL}:3306/third",
+ AURORA_USERNAME = "${var.AURORA_USERNAME}",
+ AWS_ACCESS = "${var.AWS_ACCESS}",
+ AWS_SECRET = "${var.AWS_SECRET}",
+ FIREHOSE_DELIVERY_STREAM_NAME="${var.aws_kinesis_stream_name}",
+ PUSH_URL_METCOM = "http://47.74.30.186:8080/rawJson/post/metcom",
+ QUERY_PUSH_INFO = "https://iothub-web-stg.ttkdatatechbuild.com/api/targetConfig/config/v2/queryByDeviceId?deviceId="
+ SINGLE_ID_TABLE_NAME = "rawData_single_id"
+ TABLE_NAME = "rawData",
+ }
+ }
+}
+
+
+
+# resource "aws_lambda_event_source_mapping" "alert_record_dynamodb_trigger" {
+# event_source_arn = var.alert_record_stream_arn_tk
+# function_name = aws_lambda_function.sensorAlermTransfer_tk.arn
+# starting_position = "LATEST"
+
+# }
+
+######################
+
+# resource "aws_lambda_function" "ddb_to_filehorse_iot_tk" {
+# function_name = "ddb_to_filehorse_iot_tk"
+# runtime = "python3.11"
+# handler = "index.handler"
+# filename = "./modules/lambda/ddb-to-filehorse-iot.zip"
+# role = aws_iam_role.lambda_role.arn # 使用你已有的 Lambda 角色或创建一个新的
+
+# environment {
+# variables = {
+# DeliveryStreamName = "ddb-to-s3-stream"
+# }
+# }
+# }
+# resource "aws_lambda_event_source_mapping" "ddb_to_filehorse_iot_dynamodb_trigger" {
+# event_source_arn = var.common_data_stream_arn_tk
+# function_name = aws_lambda_function.ddb_to_filehorse_iot_tk.arn
+# starting_position = "LATEST"
+
+# }
+# #######################
+# resource "aws_lambda_function" "dynamodbStreamsToDbm_tk" {
+# function_name = "dynamodbStreamsToDbm_tk"
+# runtime = "java11"
+# handler = "index.handler"
+# filename = "./modules/lambda/dynamodbStreamsToDbm.zip"
+# role = aws_iam_role.lambda_role.arn # 使用你已有的 Lambda 角色或创建一个新的
+# vpc_config {
+# subnet_ids = var.subnet_ids # 替换为你的子网 ID
+# security_group_ids = var.sggroup_ids # 替换为你的安全组 ID
+# }
+# environment {
+# variables = {
+# PUSH_URL_METCOM = "http://47.74.30.186:8080/rawJson/post/metcom"
+# QUERY_PUSH_INFO = "http://web-alb-481573367.ap-northeast-1.elb.amazonaws.com:20008/api/targetConfig/config/v2/queryByDeviceId?deviceId="
+# }
+# }
+# }
+# resource "aws_lambda_event_source_mapping" "dynamodbStreamsToDbm_dynamodb_trigger" {
+# event_source_arn = var.common_data_stream_arn_tk
+# function_name = aws_lambda_function.dynamodbStreamsToDbm_tk.arn
+# starting_position = "LATEST"
+
+# }
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/output.tf
new file mode 100644
index 0000000..aebd8a5
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/output.tf
@@ -0,0 +1,3 @@
+output "aws_lambda_arn" {
+ value = aws_lambda_function.kinesisStreamToLambda.arn
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/variables.tf
new file mode 100644
index 0000000..6ba5eb8
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/lambda/variables.tf
@@ -0,0 +1,31 @@
+variable "company_name" {
+ type = string
+}
+
+variable "subnet_ids" {
+ type = list
+}
+variable "sggroup_ids" {
+ type = list
+}
+variable "AURORA_PASSWORD" {
+ type = string
+ default = "Abc#123456xyz"
+
+}
+variable "AURORA_USERNAME" {
+ type = string
+ default = "techsor"
+}
+variable "AURORA_URL" {
+ type = string
+}
+variable "AWS_ACCESS" {
+ type = string
+}
+variable "AWS_SECRET" {
+ type = string
+}
+variable "aws_kinesis_stream_name" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/main.tf
new file mode 100644
index 0000000..cc1561a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/main.tf
@@ -0,0 +1,217 @@
+resource "aws_mq_configuration" "sensor" {
+ description = "Example Configuration"
+ name = "${var.project_name}-config"
+ engine_type = "ActiveMQ"
+ engine_version = "5.17.6"
+
+ data = <
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+DATA
+}
+
+resource "aws_mq_broker" "ActiveMQ" {
+ broker_name = "${var.project_name}-mq"
+
+ # configuration {
+ # id = aws_mq_configuration.sensor.id
+ # revision = aws_mq_configuration.sensor.latest_revision
+ # }
+ subnet_ids = var.subnet_mq_ids
+ publicly_accessible = false
+ engine_type = "ActiveMQ"
+ engine_version = "5.17.6"
+ host_instance_type = "mq.t3.micro"
+ security_groups = [ "${var.sg_mq}"]
+
+ user {
+ username = var.username
+ password = var.password
+ }
+ logs {
+ general = true
+ }
+}
+
+
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/output.tf
new file mode 100644
index 0000000..62f5823
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/output.tf
@@ -0,0 +1,3 @@
+output "ActiveMQBrokerId" {
+ value = aws_mq_broker.ActiveMQ.id
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/valiables.tf
new file mode 100644
index 0000000..c3614b8
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/mq/valiables.tf
@@ -0,0 +1,18 @@
+variable "project_name" {
+ type = string
+ default = "prod"
+}
+variable "username" {
+ type = string
+ default = "techsor"
+}
+variable "password" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "subnet_mq_ids" {
+ type = list(string)
+}
+variable "sg_mq" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/main.tf
new file mode 100644
index 0000000..e46d8db
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/main.tf
@@ -0,0 +1,68 @@
+# data exist vpc
+data "aws_vpc" "vpc_sensor_plantform" {
+
+ filter {
+ name = "tag:Name"
+ values = ["${var.vpc_name}"]
+ }
+}
+
+# data "aws_subnets" "public"
+data "aws_subnets" "public_subnets" {
+ filter {
+ name = "vpc-id"
+ values = [data.aws_vpc.vpc_sensor_plantform.id]
+ }
+
+ tags = {
+ Tier = "public"
+ }
+}
+
+# # data "aws_subnet" "public"
+# data "aws_subnet" "public_subnet"{
+# for_each = toset(data.aws_subnets.public_subnets.ids)
+# id = each.value
+# }
+
+# data "aws_subnet" "protected"
+data "aws_subnets" "protected_subnets" {
+ filter {
+ name = "vpc-id"
+ values = [data.aws_vpc.vpc_sensor_plantform.id]
+ }
+
+ tags = {
+ Tier = "protected"
+ }
+}
+
+# # data "aws_subnet" "protected"
+# data "aws_subnets" "mqtt_protected_subnets" {
+# filter {
+# name = "vpc-id"
+# values = [data.aws_vpc.vpc_sensor_plantform.id]
+# }
+
+# tags = {
+# Tier = "mqtt"
+# }
+# }
+
+# # data "aws_subnet" "protected"
+# data "aws_subnet" "protected_subnet"{
+# for_each = toset(data.aws_subnets.protected_subnets.ids)
+# id = each.value
+# }
+
+# data "aws_subnet" "private"
+data "aws_subnets" "private_subnets" {
+ filter {
+ name = "vpc-id"
+ values = [data.aws_vpc.vpc_sensor_plantform.id]
+ }
+
+ tags = {
+ Tier = "private"
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/output.tf
new file mode 100644
index 0000000..52b62b9
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/output.tf
@@ -0,0 +1,44 @@
+output "vpc_id" {
+ value = data.aws_vpc.vpc_sensor_plantform.id
+}
+# output "public_subnet" {
+# value = data.aws_subnet.public_subnet
+# }
+# output "protected_subnet" {
+# value = data.aws_subnet.protected_subnet
+# }
+# output "private_subnet" {
+# value = data.aws_subnet.private_subnet
+# }
+
+output "public_subnet_ids" {
+ value = data.aws_subnets.public_subnets.ids
+}
+output "protected_subnet_ids" {
+ value = data.aws_subnets.protected_subnets.ids
+}
+# output "mqtt_protected_subnet_ids" {
+# value = data.aws_subnets.mqtt_protected_subnets
+# }
+output "private_subnet_ids" {
+ value = data.aws_subnets.private_subnets.ids
+}
+# output "public_subnet_01" {
+# value = data.aws_subnet.public_subnet[0].id
+# }
+# output "public_subnet_02" {
+# value = data.aws_subnet.public_subnet[1].id
+# }
+# output "protected_subnet_01" {
+# value = data.aws_subnet.protected_subnet[0].id
+# }
+# output "protected_subnet_02" {
+# value = data.aws_subnet.protected_subnet[1].id
+# }
+output "vpc_cidr_block" {
+ value = data.aws_vpc.vpc_sensor_plantform.cidr_block
+}
+
+# output "subnet_cidr_blocks" {
+# value = [for s in data.aws_subnet.public_subnet : s.cidr_block]
+# }
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/variables.tf
new file mode 100644
index 0000000..910f4cc
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/network/variables.tf
@@ -0,0 +1,69 @@
+
+variable "company_name" {
+ type = string
+ default = "prod"
+}
+
+variable "vpc_name" {
+ type = string
+}
+
+variable "id" {
+ type = list(string)
+ default = ["01", "02", "03"]
+}
+
+variable "vpc_cidr_block" {
+ type = string
+ default = "172.200.0.0/16"
+}
+
+variable "availability_zones" {
+ type = list(string)
+ default = ["ap-northeast-1a", "ap-northeast-1c", "ap-northeast-1d"]
+}
+
+variable "public_subnet" {
+ type = list(string)
+ default = ["public_01", "public_02", "public_03"]
+}
+
+variable "public_subnet_cidr_block" {
+ type = list(string)
+ default = ["172.200.16.0/20", "172.200.32.0/20", "172.200.48.0/20"]
+}
+
+variable "protected_subnet" {
+ type = list(string)
+ default = ["protected_01", "protected_02", "protected_03"]
+}
+
+variable "protected_subnet_cidr_block" {
+ type = list(string)
+ default = ["172.200.64.0/20", "172.200.80.0/20", "172.200.96.0/20"]
+}
+
+variable "private_subnet" {
+ type = list(string)
+ default = ["private_01", "private_02", "private_03"]
+}
+
+variable "private_subnet_cidr_block" {
+ type = list(string)
+ default = ["172.200.112.0/20", "172.200.128.0/20", "172.200.144.0/20"]
+}
+
+# variable "public_eip" {
+# type = list(string)
+# default = ["172.100.10.5", "172.100.20.5", "172.100.30.5"]
+# }
+
+variable "protected_rtb_name" {
+ type = list(string)
+ default = ["protected_01_rtb", "protected_02_rtb", "protected_03_rtb"]
+}
+
+variable "aws_nat_gateway_name"{
+ type = list(string)
+ default = [ "nat_01", "nat_02", "nat_03" ]
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/init.sql b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/init.sql
new file mode 100644
index 0000000..5f2cee6
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/init.sql
@@ -0,0 +1,145 @@
+/*
+SQLyog 企业版 - MySQL GUI v8.14
+MySQL - 8.0.28 : Database - data_center_admin
+*********************************************************************
+*/
+
+
+/*!40101 SET NAMES utf8 */;
+
+/*!40101 SET SQL_MODE=''*/;
+
+/*!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 /*!32312 IF NOT EXISTS*/`data_center_admin` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
+
+USE `data_center_admin`;
+
+/*Table structure for table `basic_company` */
+
+DROP TABLE IF EXISTS `basic_company`;
+
+CREATE TABLE `basic_company` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_id` bigint DEFAULT NULL,
+ `company_name` varchar(500) DEFAULT NULL,
+ `mfa_switch` int DEFAULT '0' COMMENT '谷歌mfa服务开关。0-关闭,1-开启',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_company` */
+
+insert into `basic_company`(`id`,`parent_id`,`company_name`,`mfa_switch`,`flag`,`create_time`,`modify_time`) values (1,-1,'MiniSolution',0,0,1658978002231,1658978002231);
+
+/*Table structure for table `basic_menu` */
+
+DROP TABLE IF EXISTS `basic_menu`;
+
+CREATE TABLE `basic_menu` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_menu_id` bigint DEFAULT NULL,
+ `menu_name` varchar(100) DEFAULT NULL,
+ `menu_name_en` varchar(100) DEFAULT NULL,
+ `menu_name_jp` varchar(100) DEFAULT NULL,
+ `remark` varchar(100) DEFAULT NULL,
+ `menu_level` int DEFAULT '1' COMMENT '菜单级别',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_menu` */
+
+insert into `basic_menu`(`id`,`parent_menu_id`,`menu_name`,`menu_name_en`,`menu_name_jp`,`remark`,`menu_level`,`flag`,`create_time`) values (1,-1,'项目管理','项目管理','项目管理','项目管理',1,0,1659079777164),(2,-1,'楼宇模块','楼宇模块','楼宇模块','楼宇模块',1,0,1659079777164),(3,-1,'设备模块','设备模块','设备模块','设备模块',1,0,1659079777164),(4,-1,'转发管理','转发管理','转发管理','转发管理',1,0,1659079777164),(5,-1,'数据来源管理','数据来源管理','数据来源管理','数据来源管理',1,0,1659079777164),(6,1,'添加','添加','添加','项目管理-添加',2,0,1659079777164),(7,1,'编辑','编辑','编辑','项目管理-编辑',2,0,1659079777164),(8,1,'删除','删除','删除','项目管理-删除',2,0,1659079777164),(9,1,'批量添加','批量添加','批量添加','项目管理-批量添加',2,0,1659079777164),(10,2,'楼宇管理','楼宇管理','楼宇管理','楼宇管理',2,0,1659079777164),(11,2,'楼层管理','楼层管理','楼层管理','楼层管理',2,0,1659079777164),(12,2,'房间管理','房间管理','房间管理','房间管理',2,0,1659079777164),(13,2,'资产管理','资产管理','资产管理','资产管理',2,0,1659079777164),(14,10,'添加','添加','添加','楼宇管理-添加',3,0,1659079777164),(15,10,'编辑','编辑','编辑','楼宇管理-编辑',3,0,1659079777164),(16,10,'删除','删除','删除','楼宇管理-删除',3,0,1659079777164),(17,11,'添加','添加','添加','楼层管理-添加',3,0,1659079777164),(18,11,'编辑','编辑','编辑','楼层管理-编辑',3,0,1659079777164),(19,11,'删除','删除','删除','楼层管理-删除',3,0,1659079777164),(20,12,'添加','添加','添加','房间管理-添加',3,0,1659079777164),(21,12,'编辑','编辑','编辑','房间管理-编辑',3,0,1659079777164),(22,12,'删除','删除','删除','房间管理-删除',3,0,1659079777164),(23,13,'添加','添加','添加','资产管理-添加',3,0,1659079777164),(24,13,'编辑','编辑','编辑','资产管理-编辑',3,0,1659079777164),(25,13,'删除','删除','删除','资产管理-删除',3,0,1659079777164),(26,3,'设备管理','设备管理','设备管理','设备管理',2,0,1659079777164),(27,26,'添加','添加','添加','设备管理-添加',3,0,1659079777164),(28,26,'编辑','编辑','编辑','设备管理-编辑',3,0,1659079777164),(29,26,'删除','删除','删除','设备管理-删除',3,0,1659079777164),(30,26,'批量添加','批量添加','批量添加','设备管理-批量添加',3,0,1659079777164),(31,26,'批量删除','批量删除','批量删除','设备管理-批量删除',3,0,1659079777164),(32,3,'设备类别管理','设备类别管理','设备类别管理','设备类别管理',2,0,1659079777164),(33,32,'添加','添加','添加','设备类别管理-添加',3,0,1659079777164),(34,32,'编辑','编辑','编辑','设备类别管理-编辑',3,0,1659079777164),(35,32,'删除','删除','删除','设备类别管理-删除',3,0,1659079777164),(36,4,'添加','添加','添加','转发管理-添加',3,0,1659079777164),(37,4,'编辑','编辑','编辑','转发管理-编辑',3,0,1659079777164),(38,4,'删除','删除','删除','转发管理-删除',3,0,1659079777164),(39,5,'添加','添加','添加','数据来源管理-添加',3,0,1659079777164),(40,5,'编辑','编辑','编辑','数据来源管理-编辑',3,0,1659079777164),(41,5,'删除','删除','删除','数据来源管理-删除',3,0,1659079777164);
+
+/*Table structure for table `basic_role` */
+
+DROP TABLE IF EXISTS `basic_role`;
+
+CREATE TABLE `basic_role` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `role_name` varchar(100) DEFAULT NULL,
+ `description` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_menu_relation` */
+
+DROP TABLE IF EXISTS `basic_role_menu_relation`;
+
+CREATE TABLE `basic_role_menu_relation` (
+ `role_id` bigint DEFAULT NULL,
+ `menu_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_user_relation` */
+
+DROP TABLE IF EXISTS `basic_role_user_relation`;
+
+CREATE TABLE `basic_role_user_relation` (
+ `user_id` bigint DEFAULT NULL,
+ `role_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_user` */
+
+DROP TABLE IF EXISTS `basic_user`;
+
+CREATE TABLE `basic_user` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_type` int DEFAULT '0' COMMENT '0-未知,1-管理平台用户,2-普通平台用户',
+ `company_id` bigint NOT NULL,
+ `username` varchar(255) DEFAULT NULL,
+ `login_name` varchar(255) DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `password_modify_time` bigint DEFAULT NULL,
+ `salt` varchar(255) DEFAULT NULL,
+ `email` varchar(255) DEFAULT NULL,
+ `mobile_number` varchar(255) DEFAULT NULL,
+ `mfa_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `mfa_bind` int DEFAULT '0' COMMENT '用户是否绑定了mfa设备。0-未绑定,1-已绑定',
+ `last_login_time` bigint DEFAULT NULL,
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `expire_time` bigint DEFAULT '4114487556000',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_user` */
+
+insert into `basic_user`(`id`,`user_type`,`company_id`,`username`,`login_name`,`password`,`password_modify_time`,`salt`,`email`,`mobile_number`,`mfa_secret`,`mfa_bind`,`last_login_time`,`flag`,`expire_time`,`create_time`,`creator_id`,`modify_time`,`modifier_id`) values (1,1,1,'admin','admin','nVg+buw0YAs=',1670312031273,'09bc3a7898','1053492832@qq.com',NULL,NULL,0,1706177793183,0,4114487556000,4114487556000,NULL,1670312031273,NULL);
+
+/*Table structure for table `login_history` */
+
+DROP TABLE IF EXISTS `login_history`;
+
+CREATE TABLE `login_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_id` bigint DEFAULT NULL,
+ `request_ip` varchar(255) DEFAULT NULL,
+ `login_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/main.tf
new file mode 100644
index 0000000..ad9bc0d
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/main.tf
@@ -0,0 +1,14 @@
+data "aws_db_instance" "rds" {
+ db_instance_identifier = var.db_name
+}
+
+data "aws_elasticache_replication_group" "redis" {
+ replication_group_id = "replication-group-tokyo-build"
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/output.tf
new file mode 100644
index 0000000..4cbbbfd
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/output.tf
@@ -0,0 +1,7 @@
+output "rds_address" {
+ value = data.aws_db_instance.rds.address
+}
+
+output "redis_address" {
+ value = data.aws_elasticache_replication_group.redis.primary_endpoint_address
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/valiables.tf
new file mode 100644
index 0000000..3ebec69
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/rds/valiables.tf
@@ -0,0 +1,8 @@
+variable "project_name" {
+ type = string
+ default = "prod"
+}
+
+variable "db_name" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/output.tf
new file mode 100644
index 0000000..5c43043
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/output.tf
@@ -0,0 +1,15 @@
+output "security_group_sg_alb_id" {
+ value = data.aws_security_group.sg_alb.id
+}
+output "security_group_sg_internal_alb_id" {
+ value = data.aws_security_group.sg_internal_alb.id
+}
+# output "security_group_sg_nlb_id" {
+# value = aws_security_group.sg_nlb.id
+# }
+output "security_group_sg_app_id" {
+ value = data.aws_security_group.sg_app.id
+}
+output "security_group_sg_db_id" {
+ value = data.aws_security_group.sg_db.id
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/security_group.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/security_group.tf
new file mode 100644
index 0000000..1073a4c
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/security_group.tf
@@ -0,0 +1,430 @@
+
+# # Create security bation
+# resource "aws_security_group" "sg_bation" {
+# name = "${var.project_name}_bation_sg"
+# description = "Allow bation inbound traffic"
+# vpc_id = var.vpc_id
+
+# ingress = [
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "tmp"
+# from_port = 22
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 22
+# }
+# ]
+
+# egress {
+# from_port = 0
+# to_port = 0
+# protocol = "-1"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
+# }
+
+# Create security alb
+# resource "aws_security_group" "sg_alb" {
+# name = "${var.project_name}_alb_sg"
+# description = "Allow alb inbound traffic"
+# vpc_id = var.vpc_id
+
+# ingress = [
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "https access"
+# from_port = 443
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 443
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "http access"
+# from_port = 80
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 80
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "http access"
+# from_port = 20008
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 20008
+# },
+# # {
+# # cidr_blocks = [
+# # "0.0.0.0/0",
+# # ]
+# # description = "http access"
+# # from_port = 8089
+# # ipv6_cidr_blocks = []
+# # prefix_list_ids = []
+# # protocol = "tcp"
+# # security_groups = []
+# # self = false
+# # to_port = 8089
+# # },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "http access"
+# from_port = 20015
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 20015
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "http access"
+# from_port = 18083
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 18083
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "http access"
+# from_port = 8201
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 8201
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "http access"
+# from_port = 8200
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 8200
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "http access"
+# from_port = 20016
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 20016
+# },
+# ]
+# egress {
+# from_port = 0
+# to_port = 0
+# protocol = "-1"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
+# }
+
+# Create security nlb
+# resource "aws_security_group" "sg_nlb" {
+# name = "${var.project_name}_nlb_sg"
+# description = "Allow nlb inbound traffic"
+# vpc_id = var.vpc_id
+
+# ingress = [
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "https access"
+# from_port = 443
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 443
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "http access"
+# from_port = 80
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 80
+# },
+# ]
+# egress {
+# from_port = 0
+# to_port = 0
+# protocol = "-1"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
+# }
+
+# Create security app
+# resource "aws_security_group" "sg_app" {
+# name = "${var.project_name}_app_sg"
+# description = "Allow internal ip inbound traffic"
+# vpc_id = var.vpc_id
+# ingress = [
+# {
+# cidr_blocks = [
+# "${var.vpc_cidr_block}",
+# ]
+# description = "vpc"
+# from_port = 0
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "-1"
+# security_groups = []
+# self = false
+# to_port = 0
+# }
+# ]
+# egress {
+# from_port = 0
+# to_port = 0
+# protocol = "-1"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
+# }
+
+# resource "aws_security_group_rule" "sec_group_allow_bation" {
+# type = "ingress"
+# from_port = 22 // first part of port range
+# to_port = 22 // second part of port range
+# protocol = "tcp" // Protocol, could be "tcp" "udp" etc.
+# security_group_id = "${aws_security_group.sg_app.id}" // Which group to attach it to
+# source_security_group_id = "${aws_security_group.sg_bation.id}" // Which group to specify as source
+# }
+
+# resource "aws_security_group_rule" "sec_group_allow_alb" {
+# type = "ingress"
+# from_port = 0 // first part of port range
+# to_port = 0 // second part of port range
+# protocol = "-1" // Protocol, could be "tcp" "udp" etc.
+# security_group_id = "${aws_security_group.sg_app.id}" // Which group to attach it to
+# source_security_group_id = "${aws_security_group.sg_alb.id}" // Which group to specify as source
+# }
+
+# resource "aws_security_group_rule" "sec_group_allow_alb" {
+# type = "ingress"
+# from_port = 0 // first part of port range
+# to_port = 0 // second part of port range
+# protocol = "-1" // Protocol, could be "tcp" "udp" etc.
+# security_group_id = "${aws_security_group.sg_app.id}" // Which group to attach it to
+# source_security_group_id = "${aws_security_group.sg_alb.id}" // Which group to specify as source
+# }
+
+# resource "aws_security_group_rule" "sec_group_allow_nlb" {
+# type = "ingress"
+# from_port = 8000 // first part of port range
+# to_port = 8000 // second part of port range
+# protocol = "tcp" // Protocol, could be "tcp" "udp" etc.
+# security_group_id = "${aws_security_group.sg_app.id}" // Which group to attach it to
+# source_security_group_id = "${aws_security_group.sg_nlb.id}" // Which group to specify as source
+# }
+
+# Create security db
+# resource "aws_security_group" "sg_db" {
+# name = "${var.project_name}_db_sg"
+# description = "Allow db inbound traffic"
+# vpc_id = var.vpc_id
+# depends_on = [aws_security_group.sg_app, aws_security_group.sg_bation]
+
+# ingress {
+# description = "mysql access"
+# from_port = 3306
+# to_port = 3306
+# protocol = "tcp"
+# # need to custm
+# security_groups = [aws_security_group.sg_app.id, aws_security_group.sg_bation.id]
+# }
+# # ingress = [
+# # {
+# # cidr_blocks = [ "${var.vpc_cidr_block}", ]
+# # description = "https access"
+# # from_port = 443
+# # ipv6_cidr_blocks = []
+# # prefix_list_ids = []
+# # protocol = "tcp"
+# # security_groups = []
+# # self = false
+# # to_port = 443
+# # },
+# # ]
+# egress {
+# from_port = 0
+# to_port = 0
+# protocol = "-1"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
+# }
+# resource "aws_security_group_rule" "sec_group_allow_app_redis" {
+# type = "ingress"
+# from_port = 6379 // first part of port range
+# to_port = 6379 // second part of port range
+# protocol = "tcp" // Protocol, could be "tcp" "udp" etc.
+# security_group_id = "${aws_security_group.sg_db.id}" // Which group to attach it to
+# source_security_group_id = "${aws_security_group.sg_app.id}" // Which group to specify as source
+# }
+# resource "aws_security_group_rule" "sec_group_allow_bation_redis" {
+# type = "ingress"
+# from_port = 6379 // first part of port range
+# to_port = 6379 // second part of port range
+# protocol = "tcp" // Protocol, could be "tcp" "udp" etc.
+# security_group_id = "${aws_security_group.sg_db.id}" // Which group to attach it to
+# source_security_group_id = "${aws_security_group.sg_bation.id}" // Which group to specify as source
+# }
+
+# resource "aws_security_group" "sg_mq" {
+# name = "${var.project_name}_sg_mq"
+# description = "Allow bation inbound traffic"
+# vpc_id = var.vpc_id
+
+# ingress = [
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "mq access"
+# from_port = 61614
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 61619
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "mq access"
+
+# from_port = 5617
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 5617
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "mq access"
+
+# from_port = 8883
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 8883
+# },
+# {
+# cidr_blocks = [
+# "0.0.0.0/0",
+# ]
+# description = "mq access"
+
+# from_port = 8162
+# ipv6_cidr_blocks = []
+# prefix_list_ids = []
+# protocol = "tcp"
+# security_groups = []
+# self = false
+# to_port = 8162
+# },
+# ]
+
+# egress {
+# from_port = 0
+# to_port = 0
+# protocol = "-1"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
+# }
+
+# resource "aws_security_group" "sg_aurora_db" {
+# name = "${var.project_name}_aurora_sg"
+# description = "Allow db inbound traffic"
+# vpc_id = var.vpc_id
+# ingress {
+# from_port = 3306
+# to_port = 3306
+# protocol = "tcp"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
+# egress {
+# from_port = 0
+# to_port = 0
+# protocol = "-1"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
+# }
+
+# alb
+data "aws_security_group" "sg_alb"{
+ name = "${var.project_name}_alb_sg"
+}
+
+# internal alb
+data "aws_security_group" "sg_internal_alb"{
+ name = "${var.project_name}_internal_alb_sg"
+}
+
+# ecs app sender receiver
+data "aws_security_group" "sg_app"{
+ name = "${var.project_name}_app_sg"
+}
+
+# aurora用
+data "aws_security_group" "sg_db"{
+ name = "${var.project_name}_db_sg"
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/variables.tf
new file mode 100644
index 0000000..f5138d7
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/modules/securitygroup/variables.tf
@@ -0,0 +1,10 @@
+variable "project_name" {
+ type = string
+}
+
+variable "vpc_id" {}
+
+# variable "vpc_cidr_block" {
+# type = string
+# default = "172.110.0.0/16"
+# }
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/output.tf
new file mode 100644
index 0000000..db7e843
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/output.tf
@@ -0,0 +1,15 @@
+output "aurora_cluster_endpoint" {
+ value = module.Aurora.cluster_endpoint
+}
+
+output "aurora_reader_endpoint" {
+ value = module.Aurora.reader_endpoint
+}
+
+output "alb_sender_dns" {
+ value = module.alb_elb.alb_internal_dns
+}
+
+output "alb_receiver_dns" {
+ value = module.alb_elb.alb_dns
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/variables.tf
new file mode 100644
index 0000000..854b51f
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform/variables.tf
@@ -0,0 +1,52 @@
+
+#需要按实际情况修改命名,最好能做成入力参数
+variable "project_name" {
+ type = string
+ default = "tokyo-build-prod"
+}
+
+# #需要按实际情况修改路径,最好能做成入力参数
+# variable "aws_access_config_path" {
+# type = string
+# default = "C:\\Users\\86150\\.aws\\config"
+# }
+
+# #需要按实际情况修改路径,最好能做成入力参数
+# variable "aws_access_credentials_path" {
+# type = string
+# default = "C:\\Users\\86150\\.aws\\credentials"
+# }
+
+variable "access_key" {
+ type = string
+ default = "placeholder_access_key"
+ # default = "access_key"
+
+}
+
+variable "secret_key" {
+ type = string
+ default = "placeholder_secret_key"
+ # default = "secret_key"
+}
+
+#需要按实际情况修改命名,最好能做成入力参数
+variable "company_name" {
+ type = string
+ default = "new-company"
+}
+
+variable "alarmRedisDatabase" {
+ type = string
+ default = "redis_db_id"
+}
+
+variable "roidAuthorization" {
+ type = string
+ default = "placeholder_roidAuthorization"
+}
+
+variable "roid2Authorization" {
+ type = string
+ default = "placeholder_roid2Authorization"
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/main.tf
new file mode 100644
index 0000000..16fa474
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/main.tf
@@ -0,0 +1,176 @@
+provider "aws" {
+ region = var.region
+ # shared_config_files = [var.aws_access_config_path]
+ # shared_credentials_files = [var.aws_access_credentials_path]
+ # profile = "tkbuild-stg"
+ access_key = var.access_key
+ secret_key = var.secret_key
+}
+# modules (vpc 共用)
+# 读取既有VPC和subnet信息
+module "network" {
+ source = "./modules/network"
+ vpc_name = "${var.project_name}-vpc"
+}
+
+# 读取 安全组 (security group 共用)
+module "securitygroup" {
+ source = "./modules/securitygroup"
+ vpc_id = module.network.vpc_id
+ project_name = var.project_name
+}
+
+# 读取redis和mysql
+module "rds_redis" {
+ source = "./modules/rds"
+ project_name = var.project_name
+ db_name = "${var.project_name}-db"
+}
+
+# 创建新的aurora
+module "Aurora" {
+ source = "./modules/aurora"
+ project_name = var.project_name
+ company_name = var.company_name
+ # 与RDS共用subnet gp
+ # aurora-subnet-group = module.rds_redis.rds_subnet_gp
+ aurora_sg = [module.securitygroup.security_group_sg_db_id]
+}
+
+# # 创建新的Active MQ 规格后期需要修改
+# 压测性能跟不上,废弃
+# module "ActiveMQ" {
+# source = "./modules/mq"
+# project_name = var.company_name
+# subnet_mq_ids = module.network.protected_subnet_ids
+# sg_mq = module.securitygroup.security_group_mq_db_id
+# }
+
+# 创建新的alb,internal alb(新企業没有admin alb, nlb)
+module "alb_elb" {
+ source = "./modules/alb"
+ vpc_id = module.network.vpc_id
+ # project_name = company_name for one company
+ project_name = var.project_name
+ company_name = var.company_name
+ sg_alb_id = [module.securitygroup.security_group_sg_alb_id]
+ sg_internal_alb_id = [module.securitygroup.security_group_sg_internal_alb_id]
+ sub_public_ids = module.network.public_subnet_ids
+ sub_protect_ids = module.network.protected_subnet_ids
+}
+
+# 给新创建的alb添加dns解析
+# 新的企业不用域名,废弃
+# # alb ${company_name}.kr-sensor.net
+# # admin alb ${company_name}-admin.kr-sensor.net
+# module "route53" {
+# source = "./modules/dns"
+# company_name = var.company_name
+# admin_alb_name = module.alb_elb.alb_admin_domain_name
+# admin_alb_zone_id = module.alb_elb.alb_admin_zone_id
+# alb_name = module.alb_elb.alb_domain_name
+# alb_zone_id = module.alb_elb.alb_zone_id
+# }
+
+# 读取Image信息
+module "ecr" {
+ source = "./modules/ecr"
+ repo_business_web = "tokyo-build-business"
+ repo_business_back = "tokyo-build-business-web"
+ repo_receiver = "tokyo-build-receiver"
+ repo_sender = "tokyo-build-sender"
+ repo_mqtt = "tokyo-build-mqtt"
+ repo_adminback = "tokyo-build-admin"
+ repo_adminweb = "tokyo-build-admin-web"
+}
+
+# 构筑sender,recever
+module "ecs" {
+ source = "./modules/ecs_fargate"
+ # project_name = var.company_name when one company
+ project_name = var.project_name
+ company_name = var.company_name
+ region = var.region
+ autoscaling_subnet = module.network.protected_subnet_ids
+ sgapp_id = [ module.securitygroup.security_group_sg_app_id ]
+
+ business_name = module.ecr.business_name
+ business_image = module.ecr.business_uri
+ business_web_name = module.ecr.business-web_name
+ business_web_image = module.ecr.business-web_uri
+ sender_name = module.ecr.sender_name
+ sender_image = module.ecr.sender_uri
+ roid2Url = "https://api.public-api.kanri-roid.app/api/public/v1/targets/{targetId}/monitoring-status"
+ roidAlarmUrl = "https://api.public-api.kanri-roid.app/api/public/v1/problem-reports/alarm"
+ roidAlarmCancelUrl = "https://api.public-api.kanri-roid.app/api/public/v1/problem-reports/return-to-normal"
+ roidAuthorization = var.roidAuthorization
+ roid2Authorization = var.roid2Authorization
+ queryPushInfoUrl = "iothub-web.ttkdatatechbuild.com"
+ #kinesis stream
+ mqttNormalTopic = module.kinesis.aws_kinesis_stream_name
+ mqtt_name = module.ecr.mqtt_name
+ mqtt_image = module.ecr.mqtt_uri
+ adminback_name = module.ecr.adminback_name
+ adminback_image = module.ecr.adminback_uri
+ adminWeb_name = module.ecr.adminweb_name
+ adminWeb_image = module.ecr.adminweb_uri
+ receiver_name = module.ecr.receiver_name
+ receiver_image = module.ecr.receiver_uri
+ # redis mysql
+ redisHost = module.rds_redis.redis_address
+ redisDatabase = "0"
+ alarmRedisDatabase = var.alarmRedisDatabase
+ datasourceDNS = module.rds_redis.rds_address
+
+ # alb
+ receiver_tg_8200_arn = module.alb_elb.alb_8200_arn
+
+ # internal alb
+ sender_tg_8201_arn = module.alb_elb.alb_inter_8201_arn
+ sender_tg_8201_arn_suffix = module.alb_elb.alb_inter_8201_arn_suffix
+ dataCenterReceiverTargetUrl = module.alb_elb.alb_internal_dns
+}
+
+# kinesis stream
+module "kinesis" {
+ source = "./modules/kinesis"
+ company_name = var.company_name
+}
+
+module "lambda" {
+ source = "./modules/lambda"
+ company_name = var.company_name
+ AURORA_USERNAME = "techsor"
+ AURORA_PASSWORD = "Abc#123456xyz"
+ AURORA_URL = module.Aurora.cluster_endpoint
+ AWS_ACCESS = var.access_key
+ AWS_SECRET = var.secret_key
+ subnet_ids = module.network.protected_subnet_ids
+ sggroup_ids = [module.securitygroup.security_group_sg_app_id]
+ aws_kinesis_stream_name = module.kinesis.aws_kinesis_stream_name
+}
+
+module "eventbridge_pipe" {
+ source = "./modules/eventbridge"
+ company_name = var.company_name
+ aws_kinesis_stream_arn = module.kinesis.aws_kinesis_stream_arn
+ aws_lambda_arn = module.lambda.aws_lambda_arn
+}
+
+module "glue_job" {
+ source = "./modules/glue_job"
+ project_name = var.project_name
+ company_name = var.company_name
+
+ aurora_endpoint = module.Aurora.cluster_endpoint
+}
+
+
+# teffaform init
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
+# terraform refresh
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/main.tf
new file mode 100644
index 0000000..b233119
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/main.tf
@@ -0,0 +1,90 @@
+# Create target group 8200
+resource "aws_lb_target_group" "TG-TCP-8200" {
+ name = "prod-${var.company_name}-tg-8200"
+ port = 8200
+ protocol = "HTTP"
+ target_type = "ip"
+ vpc_id = var.vpc_id
+ # wait before changing the state of a deregistering target from draining to unused.
+ deregistration_delay = 60
+ health_check {
+ interval = 30
+ path = "/healthcheck"
+ port = 8200
+ protocol = "HTTP"
+ timeout = 5
+ unhealthy_threshold = 2
+ matcher = 200
+ }
+}
+
+# Create ALB
+resource "aws_lb" "ALB-prod-alb" {
+ name = "${var.company_name}-alb"
+ internal = false
+ load_balancer_type = "application"
+ security_groups = var.sg_alb_id
+ subnets = var.sub_public_ids
+ enable_deletion_protection = false
+}
+
+# Create ALB listener
+resource "aws_lb_listener" "ALB-prod-alb-listener-8200" {
+ load_balancer_arn = aws_lb.ALB-prod-alb.arn
+ port = 8200
+ protocol = "HTTP"
+ default_action {
+ type = "forward"
+ target_group_arn = aws_lb_target_group.TG-TCP-8200.arn
+ }
+}
+
+
+########################
+# Create target group 8201
+resource "aws_lb_target_group" "TG-TCP-8201" {
+ name = "prod-${var.company_name}-tg-8201"
+ port = 8201
+ protocol = "HTTP"
+ target_type = "ip"
+ vpc_id = var.vpc_id
+ # wait before changing the state of a deregistering target from draining to unused.
+ deregistration_delay = 60
+ health_check {
+ interval = 30
+ path = "/healthcheck"
+ port = 8201
+ protocol = "HTTP"
+ timeout = 5
+ unhealthy_threshold = 2
+ matcher = 200
+ }
+}
+
+# Create internal ALB
+resource "aws_lb" "ALB-prod-alb-internal" {
+ name = "${var.company_name}-alb-internal"
+ internal = true
+ load_balancer_type = "application"
+ security_groups = var.sg_internal_alb_id
+ subnets = var.sub_protect_ids
+ enable_deletion_protection = false
+}
+
+# Create ALB listener
+resource "aws_lb_listener" "ALB-prod-alb-listener-8201" {
+ load_balancer_arn = aws_lb.ALB-prod-alb-internal.arn
+ port = 8201
+ protocol = "HTTP"
+ default_action {
+ type = "forward"
+ target_group_arn = aws_lb_target_group.TG-TCP-8201.arn
+ }
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/output.tf
new file mode 100644
index 0000000..2033867
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/output.tf
@@ -0,0 +1,19 @@
+output "alb_8200_arn" {
+ value = aws_lb_target_group.TG-TCP-8200.arn
+}
+
+output "alb_inter_8201_arn" {
+ value = aws_lb_target_group.TG-TCP-8201.arn
+}
+
+output "alb_inter_8201_arn_suffix" {
+ value = aws_lb_target_group.TG-TCP-8201.arn_suffix
+}
+
+output "alb_internal_dns" {
+ value = aws_lb.ALB-prod-alb-internal.dns_name
+}
+
+output "alb_dns" {
+ value = aws_lb.ALB-prod-alb.dns_name
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/valiables.tf
new file mode 100644
index 0000000..ca21aa6
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/alb/valiables.tf
@@ -0,0 +1,31 @@
+
+
+variable "project_name" {
+ type = string
+}
+
+variable "company_name" {
+ type = string
+}
+
+variable "id" {
+ type = list(string)
+ default = ["01", "02", "03"]
+}
+
+variable "vpc_id" {
+ type = string
+}
+
+variable "sg_alb_id" {
+ type = list(string)
+}
+variable "sg_internal_alb_id" {
+ type = list(string)
+}
+variable "sub_public_ids" {
+ type = list(string)
+}
+variable "sub_protect_ids" {
+ type = list(string)
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/main.tf
new file mode 100644
index 0000000..53b2416
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/main.tf
@@ -0,0 +1,63 @@
+# resource "aws_kms_key" "example" {
+# description = "AWS KMS Key to encrypt Database Activity Stream"
+# }
+
+# resource "aws_db_subnet_group" "rds-subnet-group" {
+# name = var.db_name
+# description = "rds subnet group for ${var.db_name}"
+# # subnet_ids = [var.aws_subnet.private[0].id, aws_subnet.private[1].id]
+# subnet_ids = var.aurora_sub_public_id
+# # subnet_ids = var.aurora_sub_public_id
+# }
+
+# data "aws_db_subnet_group" "rds-subnet-group" {
+
+# }
+# third-dev-subnet-gp
+# 取得既有的subnet
+data "aws_db_subnet_group" "rds-subnet-group" {
+ name = "${var.project_name}-db-subnet-gp"
+}
+# tokyo-build-prod-db-subnet-gp
+
+resource "aws_rds_cluster" "sensor" {
+ cluster_identifier = "${var.company_name}-aurora-cluster"
+ engine = "aurora-mysql"
+ engine_mode = "provisioned"
+ engine_version = var.aurora_engine_version
+ master_username = var.aurora_username
+ # master_user_secret_kms_key_id = aws_kms_key.example.key_id
+ # manage_master_user_password = true
+ master_password = var.aurora_passwd
+ availability_zones = var.availability_zones
+ backup_retention_period = 3
+ # preferred_backup_window = "00:00-01:00"
+ storage_encrypted = true # 启用加密
+ skip_final_snapshot = true
+ vpc_security_group_ids = var.aurora_sg
+ db_cluster_parameter_group_name = "tkbuild-oosaka-db-cluster-param-gp"
+ db_instance_parameter_group_name = "tkbuild-oosaka-db-param-gp"
+ # 和RDS共用
+ db_subnet_group_name = data.aws_db_subnet_group.rds-subnet-group.name
+
+}
+
+resource "aws_rds_cluster_instance" "sensor" {
+ count = 1
+ identifier = "${var.company_name}-aurora-db"
+ cluster_identifier = aws_rds_cluster.sensor.id
+ instance_class = "db.r6g.large"
+ engine = aws_rds_cluster.sensor.engine
+ engine_version = aws_rds_cluster.sensor.engine_version
+ # publicly_accessible = true
+ # db_subnet_group_name = aws_db_subnet_group.rds-subnet-group.name
+ db_subnet_group_name = data.aws_db_subnet_group.rds-subnet-group.name
+}
+
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/output.tf
new file mode 100644
index 0000000..8dc25ab
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/output.tf
@@ -0,0 +1,7 @@
+output "cluster_endpoint" {
+ value = aws_rds_cluster.sensor.endpoint
+}
+
+output "reader_endpoint" {
+ value = aws_rds_cluster.sensor.reader_endpoint
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/valiables.tf
new file mode 100644
index 0000000..6858314
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/aurora/valiables.tf
@@ -0,0 +1,38 @@
+
+
+variable "project_name" {
+ type = string
+}
+
+variable "company_name" {
+ type = string
+}
+
+# variable "aurora_sub_public_id" {
+# type = list(string)
+# }
+
+variable "db_name" {
+ type = string
+ default = "se"
+}
+variable "availability_zones" {
+ type = list(string)
+ default = ["ap-northeast-3a", "ap-northeast-3c"]
+}
+variable "aurora_engine_version" {
+ type = string
+ default = "8.0.mysql_aurora.3.04.1"
+}
+variable "aurora_username" {
+ type = string
+ default = "techsor"
+}
+variable "aurora_passwd" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "aurora_sg" {
+ type = list(string)
+}
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dns/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dns/main.tf
new file mode 100644
index 0000000..1c6eb6d
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dns/main.tf
@@ -0,0 +1,28 @@
+data "aws_route53_zone" "selected" {
+ name = var.domain_name
+ private_zone = false
+}
+
+resource "aws_route53_record" "company-dns" {
+ zone_id = data.aws_route53_zone.selected.zone_id
+ name = "${var.company_name}.${data.aws_route53_zone.selected.name}"
+ type = "A"
+
+ alias {
+ name = var.alb_name
+ zone_id = var.alb_zone_id
+ evaluate_target_health = true
+ }
+}
+
+resource "aws_route53_record" "company-admin-dns" {
+ zone_id = data.aws_route53_zone.selected.zone_id
+ name = "${var.company_name}-admin.${data.aws_route53_zone.selected.name}"
+ type = "A"
+
+ alias {
+ name = var.admin_alb_name
+ zone_id = var.admin_alb_zone_id
+ evaluate_target_health = true
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dns/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dns/output.tf
new file mode 100644
index 0000000..e69de29
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dns/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dns/valiables.tf
new file mode 100644
index 0000000..0c4bd96
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dns/valiables.tf
@@ -0,0 +1,30 @@
+variable "domain_name" {
+ type = string
+ default = "kr-sensor.net"
+}
+
+variable "company_name" {
+ type = string
+ default = "new-company"
+}
+
+variable "alb_name" {
+ type = string
+ default = "kr-sensor.net"
+}
+
+variable "alb_zone_id" {
+ type = string
+ default = "kr-sensor.net"
+}
+
+variable "admin_alb_name" {
+ type = string
+ default = "kr-sensor.net"
+}
+
+variable "admin_alb_zone_id" {
+ type = string
+ default = "kr-sensor.net"
+}
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/main.tf
new file mode 100644
index 0000000..27c496b
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/main.tf
@@ -0,0 +1,52 @@
+### DynamoDB
+
+resource "aws_dynamodb_table" "alert_record_table" {
+ name = "alert_record_tokyo"
+ billing_mode = "PAY_PER_REQUEST" # 按需计费
+ stream_enabled = true
+ stream_view_type = "NEW_AND_OLD_IMAGES"
+ hash_key = "hashId"
+ range_key = "dateKey"
+ attribute { # attribute 块来定义表的属性
+ name = "hashId"
+ type = "S"
+ }
+
+ attribute {
+ name = "dateKey"
+ type = "N"
+ }
+
+ tags = {
+ Name = "dynamodb-tk-tatemono"
+ Environment = "production"
+ }
+}
+resource "aws_dynamodb_table" "common_data_center" {
+ name = "common_data_center_tokyo"
+ billing_mode = "PAY_PER_REQUEST" # 按需计费
+ stream_enabled = true
+ stream_view_type = "NEW_AND_OLD_IMAGES"
+ hash_key = "hashId"
+ range_key = "dateKey"
+ attribute { # attribute 块来定义表的属性
+ name = "hashId"
+ type = "S"
+ }
+
+ attribute {
+ name = "dateKey"
+ type = "N"
+ }
+
+ tags = {
+ Name = "dynamodb-tk-tatemono"
+ Environment = "production"
+ }
+}
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/output.tf
new file mode 100644
index 0000000..5c34478
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/output.tf
@@ -0,0 +1,6 @@
+output "alert_record_table_arn" {
+ value = aws_dynamodb_table.alert_record_table.stream_arn
+}
+output "common_data_center_arn" {
+ value = aws_dynamodb_table.common_data_center.stream_arn
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/variables.tf
new file mode 100644
index 0000000..461cb1b
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/dynamodb/variables.tf
@@ -0,0 +1,25 @@
+variable "aws_access_config_path" {
+ type = string
+ default = "/root/.aws/config"
+}
+
+variable "aws_access_credentials_path" {
+ type = string
+ default = "/root/.aws/credentials"
+}
+
+variable "project_name" {
+ type = string
+ default = "prod"
+}
+
+variable "region" {
+ type = string
+ default = "ap-northeast-3"
+}
+# variable "subnet_ids" {
+# type = list
+# }
+# variable "sggroup_ids" {
+# type = list
+# }
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/main.tf
new file mode 100644
index 0000000..e2e412a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/main.tf
@@ -0,0 +1,141 @@
+
+#data apolicy
+data aws_iam_policy AmazonEC2RoleforSSM{
+ name = "AmazonEC2RoleforSSM"
+}
+
+data aws_iam_policy AmazonS3FullAccess{
+ name = "AmazonS3FullAccess"
+}
+
+data aws_iam_policy CloudWatchAgentAdminPolicy{
+ name = "CloudWatchAgentAdminPolicy"
+}
+
+#Create a role
+#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role
+resource "aws_iam_role" "ec2_role" {
+ name = "access-ec2-role2"
+
+ # Terraform's "jsonencode" function converts a
+ # Terraform expression result to valid JSON syntax.
+ assume_role_policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = [
+ {
+ Action = "sts:AssumeRole"
+ Effect = "Allow"
+ Sid = ""
+ Principal = {
+ Service = "ec2.amazonaws.com"
+ }
+ },
+ ]
+ })
+}
+
+#Attach role to policy
+#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment
+resource "aws_iam_policy_attachment" "ec2_policy_role" {
+ name = "ec2_attachment"
+ roles = [aws_iam_role.ec2_role.name]
+ policy_arn = data.aws_iam_policy.AmazonEC2RoleforSSM.arn
+}
+
+resource "aws_iam_policy_attachment" "ec2_policy_role2" {
+ name = "ec2_attachment"
+ roles = [aws_iam_role.ec2_role.name]
+ policy_arn = data.aws_iam_policy.AmazonS3FullAccess.arn
+}
+
+resource "aws_iam_policy_attachment" "ec2_policy_role3" {
+ name = "ec2_attachment"
+ roles = [aws_iam_role.ec2_role.name]
+ policy_arn = data.aws_iam_policy.CloudWatchAgentAdminPolicy.arn
+}
+
+#Attach role to an instance profile
+#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile
+resource "aws_iam_instance_profile" "ec2_profile" {
+ name = "ec2-access-role"
+ role = aws_iam_role.ec2_role.name
+}
+# Create EC2 app 01
+resource "aws_instance" "app-server-01" {
+ # count = 2
+ ami = var.instance_ami
+ instance_type = var.instance_type[1]
+ # subnet_id = aws_subnet.protected[count.index].id
+ subnet_id = var.sub_protected_id_01
+
+ iam_instance_profile = aws_iam_instance_profile.ec2_profile.name
+
+ # vpc_security_group_ids = [aws_security_group.sg_app.id]
+ vpc_security_group_ids = var.security_group_sg_app
+
+
+ key_name = var.key_name
+ root_block_device {
+ volume_size = "${var.instance_ebs_size}"
+
+ }
+ tags = {
+ Name: "${var.project_name}-data-process-hub}"
+ }
+}
+# Create EC2 app 02 modules\ec2\main.tf
+resource "aws_instance" "app-server-02" {
+ # count = 2
+ ami = var.instance_ami
+ instance_type = var.instance_type[1]
+ # subnet_id = aws_subnet.protected[count.index].id
+ subnet_id = var.sub_protected_id_02
+
+ iam_instance_profile = aws_iam_instance_profile.ec2_profile.name
+
+ # vpc_security_group_ids = [aws_security_group.sg_app.id]
+ vpc_security_group_ids = var.security_group_sg_app
+ key_name = var.key_name
+ root_block_device {
+ volume_size = "${var.instance_ebs_size}"
+
+ }
+ tags = {
+ Name: "${var.project_name}-data-process-hub}"
+ }
+}
+
+# set public ip to bation
+resource "aws_eip" "lb" {
+ instance = aws_instance.bation-server.id
+ domain = "vpc"
+}
+
+# Create EC2 Bation
+resource "aws_instance" "bation-server" {
+ # count = 2
+ ami = var.instance_ami_bation
+ instance_type = var.instance_type[0]
+ # subnet_id = aws_subnet.public[0].id
+ subnet_id = var.sub_public_id
+
+
+ # vpc_security_group_ids = [aws_security_group.sg_bation.id]
+ vpc_security_group_ids = var.security_group_sg_bation
+
+ key_name = var.key_name
+ root_block_device {
+ volume_size = "8"
+
+ }
+ tags = {
+ Name: "${var.project_name}-bation"
+ }
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/output.tf
new file mode 100644
index 0000000..f850341
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/output.tf
@@ -0,0 +1,7 @@
+output "aws_instance_app_server_01" {
+ value = aws_instance.app-server-01.id
+}
+
+output "aws_instance_app_server_02" {
+ value = aws_instance.app-server-02.id
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/valiables.tf
new file mode 100644
index 0000000..05f7bac
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ec2/valiables.tf
@@ -0,0 +1,68 @@
+variable "sub_protected_id_01" {
+ type = string
+}
+variable "sub_protected_id_02" {
+ type = string
+}
+variable "security_group_sg_app" {
+ type = list(string)
+}
+variable "sub_public_id" {
+ type = string
+}
+variable "security_group_sg_bation" {
+ type = list(string)
+}
+
+variable "project_name" {
+ type = string
+ default = "prod"
+}
+
+variable "id" {
+ type = list(string)
+ default = ["01", "02", "03"]
+}
+
+variable "availability_zones" {
+ type = list(string)
+ default = ["ap-northeast-3a", "ap-northeast-3c", "ap-northeast-3d"]
+}
+
+
+variable "instance_ami" {
+ type = string
+ default = "ami-0329eac6c5240c99d"
+}
+
+variable "instance_ami_bation" {
+ type = string
+ default = "ami-0329eac6c5240c99d"
+}
+
+variable "iam_instance_profile_name" {
+ type = string
+ default = "tokyo-building-ec2-access-role"
+}
+
+variable "key_name"{
+ type = string
+ default = "tk-Zeta"
+}
+variable "instance_type"{
+ type = list(string)
+ default = [ "t2.micro", "t3.medium", "m5.large"]
+}
+variable "instance_ebs_size" {
+ type = string
+ default = "40"
+}
+
+
+# variable "sg_env_name"{
+# type = list(string)
+# default = [ "bation", "app", "nat_03" ]
+# }
+
+# mysql
+#variable "app_name" {}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/main.tf
new file mode 100644
index 0000000..5146f08
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/main.tf
@@ -0,0 +1,132 @@
+
+
+# # arn - 存储库的完整 ARN。
+# # registry_id - 在其中创建存储库的注册表 ID。
+# # repository_url - 存储库的 URL(格式为 )。aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName
+# # tags_all - 分配给资源的标记映射,包括从提供程序default_tags配置块继承的标记。
+# resource "aws_iam_role" "ecr_get_role" {
+# name = "ecr_get_role"
+# assume_role_policy = jsonencode({
+# Version = "2012-10-17",
+# Statement = [
+# {
+# Action = "sts:AssumeRole",
+# Effect = "Allow",
+# Principal = {
+# Service = "ecs-tasks.amazonaws.com",
+# },
+# },
+# ],
+# })
+# }
+# data "aws_iam_policy_document" "ecr_access_policy" {
+# statement {
+# effect = "Allow"
+# actions = [
+# "ecr:GetAuthorizationToken"
+# ]
+# resources = ["*"]
+# }
+# }
+# resource "aws_iam_role_policy" "ecr_service_role_policy" {
+# name = "${var.project_name}_ECR_ServiceRolePolicy"
+# policy = data.aws_iam_policy_document.ecr_access_policy.json
+# role = aws_iam_role.ecr_get_role.name
+# }
+data "aws_ecr_repository" "business" {
+ # name = "business"
+ name = var.repo_business_back
+}
+data "aws_ecr_repository" "business-web" {
+ # name = "business-web"
+ name = var.repo_business_web
+}
+data "aws_ecr_repository" "receiver" {
+ # name = "receiver"
+ name = var.repo_receiver
+}
+data "aws_ecr_repository" "sender" {
+ # name = "sender"
+ name = var.repo_sender
+}
+data "aws_ecr_repository" "mqtt" {
+ # name = "sender"
+ name = var.repo_mqtt
+}
+data "aws_ecr_repository" "adminback" {
+ # name = "sender"
+ name = var.repo_adminback
+}
+data "aws_ecr_repository" "adminweb" {
+ # name = "sender"
+ name = var.repo_adminweb
+}
+
+# data "aws_ecr_image" "business" {
+# repository_name = "business"
+# image_tag = "latest"
+# }
+# data "aws_ecr_image" "business-web" {
+# repository_name = "business-web"
+# image_tag = "latest"
+# }
+# data "aws_ecr_image" "receiver" {
+# repository_name = "receiver"
+# image_tag = "latest"
+# }
+# data "aws_ecr_image" "sender" {
+# repository_name = "sender"
+# image_tag = "latest"
+# }
+
+# resource "aws_ecr_repository" "business" {
+# # name = "business"
+# name = "${var.repo_business_name}_${var.project_name}"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+
+# }
+# resource "aws_ecr_repository" "business-web" {
+# # name = "business-web"
+# name = "${var.repo_business_name_web}_${var.project_name}"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+
+# }
+# resource "aws_ecr_repository" "receiver" {
+# name = "${var.repo_business_receiver}_${var.project_name}"
+# # name = "receiver"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+# }
+# resource "aws_ecr_repository" "sender" {
+# # name = "sender"
+# name = "${var.repo_business_sender}_${var.project_name}"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+# }
+# resource "aws_ecr_repository" "mqtt" {
+# # name = "sender"
+# name = "${var.repo_business_mqtt}_${var.project_name}"
+# image_scanning_configuration {
+# scan_on_push = true
+# }
+# image_tag_mutability = "MUTABLE"
+# }
+
+
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/output.tf
new file mode 100644
index 0000000..72c9a9a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/output.tf
@@ -0,0 +1,42 @@
+output "business_uri" {
+ value = "${data.aws_ecr_repository.business.repository_url}:latest"
+}
+output "business_name" {
+ value = data.aws_ecr_repository.business.name
+}
+output "business-web_uri" {
+ value = "${data.aws_ecr_repository.business-web.repository_url}:latest"
+}
+output "business-web_name" {
+ value = data.aws_ecr_repository.business-web.name
+}
+output "receiver_uri" {
+ value = "${data.aws_ecr_repository.receiver.repository_url}:latest"
+}
+output "receiver_name" {
+ value = data.aws_ecr_repository.receiver.name
+}
+output "sender_uri" {
+ value = "${data.aws_ecr_repository.sender.repository_url}:latest"
+}
+output "sender_name" {
+ value = data.aws_ecr_repository.sender.name
+}
+output "mqtt_uri" {
+ value = "${data.aws_ecr_repository.mqtt.repository_url}:latest"
+}
+output "mqtt_name" {
+ value = data.aws_ecr_repository.mqtt.name
+}
+output "adminback_uri" {
+ value = "${data.aws_ecr_repository.adminback.repository_url}:latest"
+}
+output "adminback_name" {
+ value = data.aws_ecr_repository.adminback.name
+}
+output "adminweb_uri" {
+ value = "${data.aws_ecr_repository.adminweb.repository_url}:latest"
+}
+output "adminweb_name" {
+ value = data.aws_ecr_repository.adminweb.name
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/valiables.tf
new file mode 100644
index 0000000..09c6429
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecr/valiables.tf
@@ -0,0 +1,21 @@
+variable "repo_business_back" {
+ type = string
+}
+variable "repo_business_web" {
+ type = string
+}
+variable "repo_receiver" {
+ type = string
+}
+variable "repo_sender" {
+ type = string
+}
+variable "repo_mqtt" {
+ type = string
+}
+variable "repo_adminback" {
+ type = string
+}
+variable "repo_adminweb" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/main.tf
new file mode 100644
index 0000000..5f65f52
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/main.tf
@@ -0,0 +1,613 @@
+data aws_iam_role "ecs_task_role"{
+ name = "${var.project_name}-ecs-task-role"
+}
+
+data aws_iam_role "ecs_task_execution_role"{
+ name = "${var.project_name}-ecs-task-execution-role"
+}
+
+resource "aws_cloudwatch_log_group" "ecs_task_logs" {
+ name = "/ecs/${var.company_name}-ecs-task"
+}
+
+resource "aws_ecs_cluster" "cluster" {
+ name = "${var.project_name}-${var.company_name}-cluster"
+}
+
+###### iotProcessEngine sender
+resource "aws_ecs_task_definition" "sender" {
+ family = "${var.project_name}-${var.company_name}-sender"
+ network_mode = "awsvpc"
+ requires_compatibilities = ["FARGATE"]
+ cpu = var.cpu_size[3]
+ memory = var.memory_size[4]
+ execution_role_arn = data.aws_iam_role.ecs_task_execution_role.arn
+ task_role_arn = data.aws_iam_role.ecs_task_role.arn
+
+ container_definitions = jsonencode([
+ {
+ name = "${var.sender_name}"
+ image = "${var.sender_image}"
+ logConfiguration = {
+ logDriver = "awslogs",
+ options = {
+ "awslogs-group" = "${aws_cloudwatch_log_group.ecs_task_logs.name}",
+ "awslogs-region" = "${var.region}",
+ "awslogs-stream-prefix" = "${var.company_name}-sender-task"
+ }
+ }
+ essential = true
+ portMappings = [
+ {
+ containerPort = 8201
+ hostPort = 8201
+ Protocol = "http"
+ }
+ ]
+ environment = [
+ {
+ "name" = "awsAccesskey"
+ "value" = "${var.awsAccesskey}"
+ },
+ {
+ "name" = "dynamicJdbcUrl"
+ "value" = "jdbc:mysql://${var.datasourceDNS}/%s"
+ },
+ {
+ "name" = "dataCenterSenderTargetUrl"
+ "value" = "${var.dataCenterSenderTargetUrl}"
+ },
+ {
+ "name" = "defaultRedisCacheTTL"
+ "value" = "${var.defaultRedisCacheTTL}"
+ },
+ {
+ "name" = "env"
+ "value" = "${var.env}"
+ },
+ {
+ "name" = "java_opts"
+ "value" = "${var.java_opts}"
+ },
+ {
+ "name" = "jdbcPassword"
+ "value" = "${var.jdbcPassword}"
+ },
+ {
+ "name" = "jdbcUrl"
+ "value" = "jdbc:mysql://${var.datasourceDNS}/data_center_admin"
+ },
+ {
+ "name" = "jdbcUsername"
+ "value" = "${var.jdbcUsername}"
+ },
+ {
+ "name" = "logLevel"
+ "value" = "${var.logLevel}"
+ },
+ {
+ "name" = "redisDatabase"
+ "value" = "${var.redisDatabase}"
+ },
+ {
+ "name" = "redisHost"
+ "value" = "${var.redisHost}"
+ },
+ {
+ "name" = "redisLockExpire"
+ "value" = "${var.redisLockExpire}"
+ },
+ {
+ "name" = "redisMaxActive"
+ "value" = "${var.redisMaxActive}"
+ },
+ {
+ "name" = "redisMaxIdle"
+ "value" = "${var.redisMaxIdle}"
+ },
+ {
+ "name" = "redisMaxWait"
+ "value" = "${var.redisMaxWait}"
+ },
+ {
+ "name" = "redisMinIdle"
+ "value" = "${var.redisredisMinIdleMaxWait}"
+ },
+ {
+ "name" = "redisPassword"
+ "value" = "${var.redisPassword}"
+ },
+ {
+ "name" = "redisPort"
+ "value" = "${var.redisPort}"
+ },
+ {
+ "name" = "redisShutdownTimeout"
+ "value" = "${var.redisShutdownTimeout}"
+ },
+ {
+ "name" = "redisTimeout"
+ "value" = "${var.redisTimeout}"
+ },
+ {
+ "name" = "secretkey"
+ "value" = "${var.awsSecretkey}"
+ },
+ {
+ "name" = "stompUrl"
+ "value" = "${var.mqBrokerId}.mq.ap-northeast-1.amazonaws.com"
+ },
+ {
+ "name" = "mqttTopic"
+ "value" = "${var.mqttTopic}"
+ },
+ {
+ "name" = "messageProtocol"
+ "value" = "kinesis"
+ },
+ {
+ "name" = "stompPassword"
+ "value" = "${var.stompPassword}"
+ },
+ {
+ "name" = "mqttUrl"
+ "value" = "ssl://${var.mqBrokerId}.mq.ap-northeast-1.amazonaws.com:8883"
+ },
+ {
+ "name" = "stompPort"
+ "value" = "61614"
+ },
+ {
+ "name" = "mqttEnableLog"
+ "value" ="TRUE"
+ },
+ {
+ "name" = "alarmRedisPassword"
+ "value" ="${var.alarmRedisPassword}"
+ },
+ {
+ "name" = "alarmRedisDatabase"
+ "value" ="${var.alarmRedisDatabase}"
+ },
+ {
+ "name" = "mqttPassword"
+ "value" ="${var.mqttPassword}"
+ },
+ {
+ "name" = "alarmRedisPort"
+ "value" ="6379"
+ },
+ {
+ "name" = "alarmRedisHost"
+ "value" ="${var.redisHost}"
+ },
+ {
+ "name" = "roid2Url"
+ "value" ="${var.roid2Url}"
+ },
+ {
+ "name" = "mqttNormalTopic"
+ "value" ="${var.mqttNormalTopic}"
+ },
+ {
+ "name" = "keepAliveInterval"
+ "value" ="60"
+ },
+ {
+ "name" = "mqttUsername"
+ "value" ="${var.mqttUsername}"
+ },
+ {
+ "name" = "stompUsername"
+ "value" ="${var.stompUsername}"
+ },
+ {
+ "name" = "mqttAlertTopic"
+ "value" ="${var.mqttAlertTopic}"
+ },
+ {
+ "name" = "mqttConnectionTimeout"
+ "value" = "60"
+ },
+ {
+ "name" = "roidAuthorization"
+ "value" = "${var.roidAuthorization}"
+ },
+ {
+ "name" = "queryPushInfoUrl"
+ "value" = "https://${var.queryPushInfoUrl}/api/targetConfig/config/v2/queryAlertForwardConfigByDeviceId"
+ },
+ {
+ "name" = "roidAlarmCancelUrl"
+ "value" = "${var.roidAlarmCancelUrl}"
+ },
+ {
+ "name" = "roidAlarmUrl"
+ "value" = "${var.roidAlarmUrl}"
+ },
+ {
+ "name" = "roid2Authorization"
+ "value" = "${var.roid2Authorization}"
+ },
+ {
+ "name" = "endpoint"
+ "value" ="${var.endpoint}"
+ },
+ {
+ "name" = "maxThreads"
+ "value" ="200"
+ },
+ {
+ "name" = "maxAcceptCount"
+ "value" ="100"
+ },
+ {
+ "name" = "maxConnections"
+ "value" ="10000"
+ },
+ ]
+ }
+ ])
+}
+
+resource "aws_ecs_service" "iotProcessEngine" {
+ # name = "iotProcessEngine"
+ name = "${var.company_name}-${var.sender_name}-serv"
+ cluster = aws_ecs_cluster.cluster.id
+ task_definition = aws_ecs_task_definition.sender.arn
+ launch_type = "FARGATE"
+ desired_count = 1
+ network_configuration {
+ subnets = tolist(var.autoscaling_subnet)
+ security_groups = tolist(var.sgapp_id)
+ }
+ load_balancer {
+ target_group_arn = var.sender_tg_8201_arn
+ container_name = "${var.sender_name}"
+ container_port = 8201
+ }
+}
+
+# receiver
+resource "aws_ecs_task_definition" "receiver" {
+ family = "${var.project_name}-${var.company_name}-receiver"
+ network_mode = "awsvpc"
+ requires_compatibilities = ["FARGATE"]
+ cpu = var.cpu_size[3]
+ memory = var.memory_size[3]
+ execution_role_arn = data.aws_iam_role.ecs_task_execution_role.arn
+ task_role_arn = data.aws_iam_role.ecs_task_role.arn
+
+ container_definitions = jsonencode([
+ {
+ name = "${var.receiver_name}"
+ # image = "923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/business-web:latest"
+ image = "${var.receiver_image}"
+ logConfiguration = {
+ logDriver = "awslogs",
+ options = {
+ "awslogs-group" = "${aws_cloudwatch_log_group.ecs_task_logs.name}",
+ "awslogs-region" = "${var.region}",
+ "awslogs-stream-prefix" = "${var.company_name}-receiver-task"
+ }
+ }
+ essential = true
+ portMappings = [
+ {
+ containerPort = 8200
+ hostPort = 8200
+ Protocol = "http"
+ }
+ ]
+ environment = [
+ {
+ "name" = "env"
+ "value" = "${var.env}"
+ },
+ {
+ "name" = "dynamicJdbcUrl"
+ "value" = "jdbc:mysql://${var.datasourceDNS}/%s"
+ },
+ {
+ "name" = "jdbcPassword"
+ "value" = "${var.jdbcPassword}"
+ },
+ {
+ "name" = "jdbcUrl"
+ "value" = "jdbc:mysql://${var.datasourceDNS}/data_center_admin"
+ },
+ {
+ "name" = "jdbcUsername"
+ "value" = "${var.jdbcUsername}"
+ },
+ {
+ "name" = "redisHost"
+ "value" = "${var.redisHost}"
+ },
+ {
+ "name" = "redisPassword"
+ "value" = "${var.redisPassword}"
+ },
+ {
+ "name" = "redisPort"
+ "value" = "${var.redisPort}"
+ },
+ {
+ "name" = "redisDatabase"
+ "value" = "${var.redisDatabase}"
+ },
+ {
+ "name" = "redisTimeout"
+ "value" = "${var.redisTimeout}"
+ },
+ {
+ "name" = "redisMaxActive"
+ "value" = "${var.redisMaxActive}"
+ },
+ {
+ "name" = "redisLockExpire"
+ "value" = "${var.redisLockExpire}"
+ },
+ {
+ "name" = "redisMinIdle"
+ "value" = "${var.redisMinIdle}"
+ },
+ {
+ "name" = "redisMaxIdle"
+ "value" = "${var.redisMaxIdle}"
+ },
+ {
+ "name" = "redisShutdownTimeout"
+ "value" = "${var.redisShutdownTimeout}"
+ },
+ {
+ "name" = "redisMaxWait"
+ "value" = "${var.redisMaxWait}"
+ },
+ {
+ "name" = "dataCenterReceiverTargetUrl"
+ "value" = "http://${var.dataCenterReceiverTargetUrl}:8201"
+ },
+ {
+ "name" = "awsaccesskey"
+ "value" = "${var.awsAccesskey}"
+ },
+ {
+ "name" = "secretkey"
+ "value" = "${var.awsSecretkey}"
+ },
+ {
+ "name" = "deltaTopic"
+ "value" = "${var.deltaTopic}"
+ },
+ {
+ "name" = "deltaTopicHost"
+ "value" = "${var.deltaTopicHost}"
+ },
+ {
+ "name" = "deltaUserName"
+ "value" = "${var.deltaUserName}"
+ },
+ {
+ "name" = "deltaUsePassWordrName"
+ "value" = "${var.deltaUsePassWordrName}"
+ },
+ {
+ "name" = "deltaEnableSSL"
+ "value" = "${var.deltaEnableSSL}"
+ },
+ {
+ "name" = "dynamoTableName"
+ "value" = "${var.dynamoTableName}"
+ },
+ {
+ "name" = "logLevel"
+ "value" = "${var.logLevel}"
+ },
+ {
+ "name" = "JAVA_OPTS"
+ "value" = "${var.JAVA_OPTS}"
+ },
+ {
+ "name" = "mqttUrl"
+ "value" = "ssl://${var.mqBrokerId}.mq.ap-northeast-1.amazonaws.com:8883"
+ },
+ {
+ "name" = "mqttUsername"
+ "value" = "${var.mqttUsername}"
+ },
+ {
+ "name" = "mqttPassword"
+ "value" = "${var.mqttPassword}"
+ },
+ {
+ "name" = "mqttTopic"
+ "value" = "${var.mqttTopic}"
+ },
+ {
+ "name" = "mqttEnableLog"
+ "value" = "${var.mqttEnableLog}"
+ },
+ {
+ "name" = "keepAliveInterval"
+ "value" = "${var.keepAliveInterval}"
+ },
+ {
+ "name" = "mqttConnectionTimeout"
+ "value" = "${var.mqttConnectionTimeout}"
+ },
+ {
+ "name" = "mqttAlertTopic"
+ "value" = "${var.mqttAlertTopic}"
+ },
+ {
+ "name" = "mqttNormalTopic"
+ "value" = "${var.mqttNormalTopic}"
+ },
+ ]
+ }
+ ])
+}
+
+resource "aws_ecs_service" "iotDatareceiver" {
+ # name = "iotDatareceiver"
+ name = "${var.company_name}-${var.receiver_name}-serv"
+ cluster = aws_ecs_cluster.cluster.id
+ task_definition = aws_ecs_task_definition.receiver.arn
+ launch_type = "FARGATE"
+ desired_count = 1
+ network_configuration {
+ subnets = tolist(var.autoscaling_subnet)
+ security_groups = tolist(var.sgapp_id)
+ }
+ load_balancer {
+ target_group_arn = var.receiver_tg_8200_arn
+ container_name = "${var.receiver_name}"
+ container_port = 8200
+ }
+}
+
+
+# 自动扩展的追加 sender
+resource "aws_appautoscaling_target" "ecs_target_sender" {
+ max_capacity = 12
+ min_capacity = 2
+ resource_id = "service/${aws_ecs_cluster.cluster.name}/${aws_ecs_service.iotProcessEngine.name}"
+ scalable_dimension = "ecs:service:DesiredCount"
+ service_namespace = "ecs"
+}
+
+#sender add
+resource "aws_appautoscaling_policy" "sender_scale_up" {
+ name = "${var.company_name}-sender-scale-up"
+ policy_type = "StepScaling"
+ resource_id = aws_appautoscaling_target.ecs_target_sender.resource_id
+ scalable_dimension = aws_appautoscaling_target.ecs_target_sender.scalable_dimension
+ service_namespace = aws_appautoscaling_target.ecs_target_sender.service_namespace
+
+ step_scaling_policy_configuration {
+ adjustment_type = "ChangeInCapacity"
+ cooldown = 60
+ metric_aggregation_type = "Maximum"
+
+ step_adjustment {
+ metric_interval_upper_bound = 0
+ scaling_adjustment = 1
+ }
+ }
+}
+
+resource "aws_appautoscaling_policy" "sender_scale_down" {
+ name = "${var.company_name}-sender-scale-down"
+ policy_type = "StepScaling"
+ resource_id = aws_appautoscaling_target.ecs_target_sender.resource_id
+ scalable_dimension = aws_appautoscaling_target.ecs_target_sender.scalable_dimension
+ service_namespace = aws_appautoscaling_target.ecs_target_sender.service_namespace
+
+ step_scaling_policy_configuration {
+ adjustment_type = "ChangeInCapacity"
+ cooldown = 60
+ metric_aggregation_type = "Maximum"
+
+ step_adjustment {
+ metric_interval_upper_bound = 0
+ scaling_adjustment = -1
+ }
+ }
+}
+
+#receiver add
+resource "aws_appautoscaling_target" "ecs_target_receiver" {
+ max_capacity = 12
+ min_capacity = 2
+ resource_id = "service/${aws_ecs_cluster.cluster.name}/${aws_ecs_service.iotDatareceiver.name}"
+ scalable_dimension = "ecs:service:DesiredCount"
+ service_namespace = "ecs"
+}
+
+resource "aws_appautoscaling_policy" "receiver_scale_up" {
+ name = "${var.company_name}-receiver-scale-up"
+ policy_type = "StepScaling"
+ resource_id = aws_appautoscaling_target.ecs_target_receiver.resource_id
+ scalable_dimension = aws_appautoscaling_target.ecs_target_receiver.scalable_dimension
+ service_namespace = aws_appautoscaling_target.ecs_target_receiver.service_namespace
+
+ step_scaling_policy_configuration {
+ adjustment_type = "ChangeInCapacity"
+ cooldown = 60
+ metric_aggregation_type = "Maximum"
+
+ step_adjustment {
+ metric_interval_upper_bound = 0
+ scaling_adjustment = 1
+ }
+ }
+}
+
+resource "aws_appautoscaling_policy" "receiver_scale_down" {
+ name = "${var.company_name}-receiver-scale-down"
+ policy_type = "StepScaling"
+ resource_id = aws_appautoscaling_target.ecs_target_receiver.resource_id
+ scalable_dimension = aws_appautoscaling_target.ecs_target_receiver.scalable_dimension
+ service_namespace = aws_appautoscaling_target.ecs_target_receiver.service_namespace
+
+ step_scaling_policy_configuration {
+ adjustment_type = "ChangeInCapacity"
+ cooldown = 60
+ metric_aggregation_type = "Maximum"
+
+ step_adjustment {
+ metric_interval_upper_bound = 0
+ scaling_adjustment = -1
+ }
+ }
+}
+
+# 监控条件的追加
+resource "aws_cloudwatch_metric_alarm" "high_request_count_per_target" {
+ alarm_name = "${var.project_name}-${var.company_name}-high-request"
+ comparison_operator = "GreaterThanOrEqualToThreshold"
+ evaluation_periods = 5
+ metric_name = "RequestCountPerTarget"
+ namespace = "AWS/ApplicationELB"
+ period = 60
+ statistic = "Average"
+ threshold = 20000
+ alarm_description = "Alarm when request count per target exceeds 20000 per minute"
+
+ dimensions = {
+ TargetGroup = var.sender_tg_8201_arn_suffix # Replace with your Target Group ARN suffix
+ }
+
+ actions_enabled = true
+ alarm_actions = [aws_appautoscaling_policy.sender_scale_up.arn, aws_appautoscaling_policy.receiver_scale_up.arn]
+}
+
+resource "aws_cloudwatch_metric_alarm" "low_request_count_per_target" {
+ alarm_name = "${var.project_name}-${var.company_name}-low-request"
+ comparison_operator = "LessThanThreshold"
+ evaluation_periods = 5
+ metric_name = "RequestCountPerTarget"
+ namespace = "AWS/ApplicationELB"
+ period = 60
+ statistic = "Average"
+ threshold = 15000
+ alarm_description = "Alarm when request count per target lower 15000 per minute"
+
+ dimensions = {
+ TargetGroup = var.sender_tg_8201_arn_suffix # Replace with your Target Group ARN suffix
+ }
+
+ actions_enabled = true
+ alarm_actions = [aws_appautoscaling_policy.sender_scale_down.arn, aws_appautoscaling_policy.receiver_scale_down.arn]
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
+
+
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/user_data.sh b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/user_data.sh
new file mode 100644
index 0000000..4400f9c
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/user_data.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+echo ECS_CLUSTER='${ecs_cluster_name}' >> /etc/ecs/ecs.config
+
+# sudo reboot
+# systemctl restart ecs
+# sudo yum install -y wget aws-cli
+sudo yum update -y ecs-init
+sudo systemctl restart docker
+# sleep 15
+# tg_arn='arn:aws:elasticloadbalancing:ap-northeast-1:923770123186:targetgroup/iot-process-engine-tg/8d2cd9d3ef4de6e3'
+# ec2_id=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)
+# aws --region ap-northeast-1 elbv2 deregister-targets --target-group-arn $tg_arn --targets Id=$ec2_id,Port=8201
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/valiables.tf
new file mode 100644
index 0000000..80d572c
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/ecs_fargate/valiables.tf
@@ -0,0 +1,369 @@
+variable "project_name" {
+ type = string
+}
+variable "company_name" {
+ type = string
+}
+variable "region" {
+ type = string
+}
+# variable "iotmqtt_tg_1883_arn" {
+# type = string
+# }
+# variable "iotmqtt_tg_8083_arn" {
+# type = string
+# }
+# variable "iotmqtt_tg_8883_arn" {
+# type = string
+# }
+# variable "businessBack_tg_20016_arn" {
+# type = string
+# }
+# variable "businessWeb_tg_80_arn" {
+# type = string
+# }
+variable "sender_tg_8201_arn" {
+ type = string
+}
+variable "sender_tg_8201_arn_suffix" {
+ type = string
+}
+# variable "iotmqtt_tg_8089_arn" {
+# type = string
+# }
+# variable "iotmqtt_tg_18083_arn" {
+# type = string
+# }
+# variable "adminBack_tg_20015_arn" {
+# type = string
+# }
+variable "receiver_tg_8200_arn" {
+ type = string
+}
+# variable "adminWeb_tg_80_arn" {
+# type = string
+# }
+variable "cpu_size" {
+ type = list(number)
+ default = [256, 512, 1024, 2048, 4096]
+}
+
+variable "memory_size" {
+ type = list(number)
+ default = [512, 1024, 2048, 4096, 6144, 8192]
+}
+
+# variable "container_name" {}
+variable "autoscaling_subnet" {}
+
+variable "sgapp_id" {}
+variable "sender_name" {
+ type = string
+}
+variable "sender_image" {
+ type = string
+}
+variable "receiver_name" {
+ type = string
+}
+variable "receiver_image" {
+ type = string
+}
+variable "business_name" {
+ type = string
+}
+variable "business_image" {
+ type = string
+}
+variable "business_web_name" {
+ type = string
+}
+variable "business_web_image" {
+ type = string
+}
+variable "adminWeb_name" {
+ type = string
+}
+variable "adminWeb_image" {
+ type = string
+}
+variable "adminback_name" {
+ type = string
+}
+variable "adminback_image" {
+ type = string
+}
+variable "mqtt_name" {
+ type = string
+}
+variable "mqtt_image" {
+ type = string
+}
+# variable "redisDatabase" {
+# type = string
+# default = "14"
+# }
+variable "awsAccesskey" {
+ type = string
+ default = "AKIA4MTWHEP3W7M4BGP5"
+}
+# variable "awsBucket" {
+# type = string
+# default = "databucket-381659385655"
+# }
+variable "mqttUrl" {
+ type = string
+ default = "tcp://106.75.71.119:1883"
+}
+
+variable "mqttUsername" {
+ type = string
+ default = "techsor"
+}
+
+variable "mqttPassword" {
+ type = string
+ default = "Abc#123456xyz"
+}
+
+variable "mqttTopic" {
+ type = string
+ default = "topic"
+}
+variable "mqttEnableLog" {
+ type = string
+ default = "true"
+}
+variable "keepAliveInterval" {
+ type = string
+ default = "60"
+}
+variable "mqttConnectionTimeout" {
+ type = string
+ default = "60"
+}
+variable "mqttAlertTopic" {
+ type = string
+ default = "alertTopic"
+}
+variable "mqttNormalTopic" {
+ type = string
+}
+variable "apiEnable" {
+ type = string
+ default = "false"
+}
+variable "webLoginUrl" {
+ type = string
+ default = "http://www-stg.kr-sensor.net/#/user/login"
+}
+variable "thirdBusinessHost" {
+ type = string
+ default = "http://www-stg.kr-sensor.net/api"
+}
+variable "awsSecretkey" {
+ type = string
+ default = "FY1nQm6nQg1GxDcyIzk0rQRMiYwSoc4GkLZrVwNr"
+}
+variable "datacenterV1QueryUrl" {
+ type = string
+ default = "https://api-stg.ttkdatatechbuild.com/datacenter/v1/query"
+}
+variable "mybatisLogLevel" {
+ type = string
+ default = "ERROR"
+}
+variable "datasourceDNS" {
+ type = string
+ default = ""
+}
+variable "datasourcePassword" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "datasourceTimeZone" {
+ type = string
+ default = "Asia/Tokyo"
+}
+variable "datasourceUsername" {
+ type = string
+ default = "techsor"
+}
+variable "ibatisLoggingLog" {
+ type = string
+ default = "ERROR"
+}
+variable "ibatisLoggingLogFactory" {
+ type = string
+ default = "ERROR"
+}
+variable "loggingAppender" {
+ type = string
+ default = "CONSOLELOG"
+}
+variable "loggingLevel" {
+ type = string
+ default = "DEBUG"
+}
+variable "loggingPath" {
+ type = string
+ default = "/home/data-center-business/log"
+}
+variable "redisHost" {
+ type = string
+ default = "replication-group-tokyo-build.ncvpel.ng.0001.apne1.cache.amazonaws.com"
+}
+variable "redisPassword" {
+ type = string
+ default = ""
+}
+variable "dataCenterSenderTargetUrl" {
+ type = string
+ default = "http://43.163.243.201:8030/nesic/deviceId/"
+}
+variable "defaultRedisCacheTTL" {
+ type = string
+ default = "3600000"
+}
+variable "env" {
+ type = string
+ default = "prd"
+}
+
+variable "java_opts" {
+ type = string
+ default = "-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:G1NewSizePercent=20 -XX:G1MaxNewSizePercent=60 -XX:InitialHeapSize=2g -Xmx2500m -XX:MetaspaceSize=128m -XX:+PrintGCDetails -XX:+PrintGCDatestamps -Xloggc:/app/gc.log"
+}
+variable "jdbcPassword" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "jdbcUsername" {
+ type = string
+ default = "techsor"
+}
+variable "logLevel" {
+ type = string
+ default = "ERROR"
+}
+variable "redisDatabase" {
+ type = string
+ default = "14"
+}
+variable "redisLockExpire" {
+ type = string
+ default = "500"
+}
+variable "redisMaxActive" {
+ type = string
+ default = "7000"
+}
+variable "redisMaxIdle" {
+ type = string
+ default = "7000"
+}
+variable "redisMaxWait" {
+ type = string
+ default = "10000"
+}
+variable "redisredisMinIdleMaxWait" {
+ type = string
+ default = "0"
+}
+variable "redisPort" {
+ type = string
+ default = "6379"
+}
+variable "redisShutdownTimeout" {
+ type = string
+ default = "30000"
+}
+variable "redisTimeout" {
+ type = string
+ default = "30000"
+}
+# variable "dynamicJdbcUrl" {
+# type = string
+# default = "jdbc:mysql://rm-bp11k2zm2fr7864428o.mysql.rds.aliyuncs.com/"
+# }
+variable "redisMinIdle" {
+ type = string
+ default = "0"
+}
+variable "dataCenterReceiverTargetUrl" {
+ type = string
+ default = "http://39.107.211.201:820"
+}
+variable "deltaTopic" {
+ type = string
+ default = "Publish_Topic"
+}
+variable "deltaTopicHost" {
+ type = string
+ default = "tcp://:1883"
+}
+variable "deltaUserName" {
+ type = string
+ default = "techsor23"
+}
+variable "deltaUsePassWordrName" {
+ type = string
+ default = "techsorAsd123456"
+}
+variable "deltaEnableSSL" {
+ type = string
+ default = "false"
+}
+variable "dynamoTableName" {
+ type = string
+ default = "tokyo-building"
+}
+variable "JAVA_OPTS" {
+ type = string
+ default = "-XX:+UseZGC -Xms1g -Xmx2g -XX:MetaspaceSize=256m -Xlog:gc*:file=/app/gc.log:time,level,tags"
+}
+variable "mqBrokerId" {
+ type = string
+ default = "b-f5eeb911-97dd-4457-8321-185bc4aa5666-1"
+}
+# variable "stompUrl" {
+# type = string
+# default = "b-xxxx-xxxx-xxxx-xxxx-xxxx-1.mq.ap-northeast-1.amazonaws.com"
+# }
+variable "endpoint" {
+ type = string
+ default = "test"
+}
+variable "stompPassword" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "alarmRedisPassword" {
+ type = string
+ default = ""
+}
+variable "alarmRedisDatabase" {
+ type = string
+}
+variable "roid2Url" {
+ type = string
+}
+variable "roidAlarmUrl" {
+ type = string
+}
+variable "roidAlarmCancelUrl" {
+ type = string
+}
+variable "stompUsername" {
+ type = string
+ default = "techsor"
+}
+variable "queryPushInfoUrl" {
+ type = string
+}
+variable "roidAuthorization" {
+ type = string
+}
+variable "roid2Authorization" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/eventbridge/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/eventbridge/main.tf
new file mode 100644
index 0000000..913831c
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/eventbridge/main.tf
@@ -0,0 +1,118 @@
+data "aws_caller_identity" "current" {}
+
+resource "aws_iam_role" "pipes-role" {
+ name = "${var.company_name}_pipes_role"
+ assume_role_policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = {
+ Effect = "Allow"
+ Action = "sts:AssumeRole"
+ Principal = {
+ Service = "pipes.amazonaws.com"
+ }
+ Condition = {
+ StringEquals = {
+ "aws:SourceAccount" = "${data.aws_caller_identity.current.id}"
+ }
+ }
+ }
+ })
+}
+
+resource "aws_iam_role_policy" "source-policy" {
+ role = aws_iam_role.pipes-role.id
+ name = "${var.company_name}_source-policy"
+ policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = [
+ {
+ Effect = "Allow"
+ Action = [
+ "kinesis:DescribeStream",
+ "kinesis:DescribeStreamSummary",
+ "kinesis:GetRecords",
+ "kinesis:GetShardIterator",
+ "kinesis:ListStreams",
+ "kinesis:ListShards"
+ ],
+ Resource = [
+ "${var.aws_kinesis_stream_arn}",
+ ]
+ },
+ ]
+ })
+}
+
+resource "aws_iam_role_policy" "target-policy" {
+ role = aws_iam_role.pipes-role.id
+ name = "${var.company_name}_target-policy"
+ policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = [
+ {
+ Effect = "Allow"
+ Action = [
+ "lambda:InvokeFunction"
+ ],
+ Resource = [
+ "${var.aws_lambda_arn}",
+ ]
+ },
+ ]
+ })
+}
+
+# resource "aws_sqs_queue" "source" {}
+
+# resource "aws_iam_role_policy" "target" {
+# role = aws_iam_role.example.id
+# policy = jsonencode({
+# Version = "2012-10-17"
+# Statement = [
+# {
+# Effect = "Allow"
+# Action = [
+# "sqs:SendMessage",
+# ],
+# Resource = [
+# aws_sqs_queue.target.arn,
+# ]
+# },
+# ]
+# })
+# }
+
+resource "aws_pipes_pipe" "example" {
+ depends_on = [aws_iam_role_policy.source-policy, aws_iam_role_policy.target-policy]
+ name = "${var.company_name}-kinesis-lambda-pipes"
+ role_arn = aws_iam_role.pipes-role.arn
+ source = var.aws_kinesis_stream_arn
+ target = var.aws_lambda_arn
+
+ source_parameters {
+ kinesis_stream_parameters {
+ starting_position = "LATEST"
+ batch_size = 100
+ maximum_record_age_in_seconds = 3600
+ maximum_retry_attempts = 3
+ parallelization_factor = 10
+ }
+ }
+
+ target_parameters {
+ lambda_function_parameters {
+ invocation_type = "FIRE_AND_FORGET"
+ }
+ }
+}
+
+
+
+# data "aws_caller_identity" "current" {}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/eventbridge/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/eventbridge/output.tf
new file mode 100644
index 0000000..e69de29
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/eventbridge/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/eventbridge/valiables.tf
new file mode 100644
index 0000000..aa9fa7a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/eventbridge/valiables.tf
@@ -0,0 +1,13 @@
+
+
+variable "company_name" {
+ type = string
+}
+
+variable "aws_kinesis_stream_arn" {
+ type = string
+}
+
+variable "aws_lambda_arn" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/glue_job/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/glue_job/main.tf
new file mode 100644
index 0000000..7cc8ecb
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/glue_job/main.tf
@@ -0,0 +1,42 @@
+data aws_iam_role "gluejob_role"{
+ name = "AWSGlueServiceRole"
+}
+
+resource "aws_glue_job" "example" {
+ name = "${var.project_name}-${var.company_name}-job"
+ role_arn = data.aws_iam_role.gluejob_role.arn
+
+ command {
+ # name = "pythonshell"
+ script_location = "s3://aws-glue-assets-381659385655-ap-northeast-1/scripts/tokyobuild-gluejob.py"
+ python_version = "3"
+ }
+
+ default_arguments = {
+ "--jdbcUrl" = "jdbc:mysql://${var.aurora_endpoint}:3306/third"
+ }
+
+ connections = ["Mysql"]
+
+ worker_type = "G.1X"
+ number_of_workers = 4
+
+}
+
+resource "aws_glue_trigger" "example_trigger" {
+ name = "${var.project_name}-${var.company_name}-trigger"
+ type = "SCHEDULED"
+
+ schedule = "cron(30 15 * * ? *)"
+
+ actions {
+ job_name = aws_glue_job.example.name
+ }
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/glue_job/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/glue_job/output.tf
new file mode 100644
index 0000000..e69de29
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/glue_job/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/glue_job/valiables.tf
new file mode 100644
index 0000000..02c15b2
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/glue_job/valiables.tf
@@ -0,0 +1,12 @@
+variable "project_name" {
+ type = string
+}
+
+variable "company_name" {
+ type = string
+}
+
+variable "aurora_endpoint" {
+ type = string
+ # default = "sensor-plantform.cluster-cde6q2assvmn.ap-northeast-1.rds.amazonaws.com"
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/main.tf
new file mode 100644
index 0000000..e741512
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/main.tf
@@ -0,0 +1,89 @@
+# 创建kinesis data stream
+resource "aws_kinesis_stream" "kinesis" {
+ name = "${var.company_name}-stream"
+ stream_mode_details {
+ stream_mode = "ON_DEMAND"
+ }
+}
+
+# data "aws_caller_identity" "current" {}
+
+# # 创建datalake
+# resource "aws_s3_bucket" "bucket" {
+# bucket = "${var.project_name}-datalake-${data.aws_caller_identity.current.account_id}"
+# }
+
+# resource "aws_kinesis_firehose_delivery_stream" "extended_s3_stream" {
+# name = "${var.project_name}-to-s3-stream"
+# destination = "extended_s3"
+
+# extended_s3_configuration {
+# role_arn = aws_iam_role.firehose_role.arn
+# bucket_arn = aws_s3_bucket.bucket.arn
+# # buffering_size = 128
+# dynamic_partitioning_configuration {
+# enabled = true
+# }
+# prefix = "firehosepart/date=!{partitionKeyFromQuery:dateKey}/"
+# error_output_prefix = "errorpart/"
+# processing_configuration {
+# enabled = "true"
+# processors {
+# type = "MetadataExtraction"
+# # parameters {
+# # parameter_name = "JsonParsingEngine"
+# # parameter_value = "JQ-1.6"
+# # }
+# parameters {
+# parameter_name = "MetadataExtractionQuery"
+# parameter_value = "{dateKey:.dateKey}"
+# }
+# }
+# }
+# }
+# }
+
+# data "aws_iam_policy_document" "firehose_assume_role" {
+# statement {
+# effect = "Allow"
+
+# principals {
+# type = "Service"
+# identifiers = ["firehose.amazonaws.com"]
+# }
+
+# actions = ["sts:AssumeRole"]
+# }
+# }
+
+# resource "aws_iam_role" "firehose_role" {
+# name = "firehose_test_role"
+# assume_role_policy = data.aws_iam_policy_document.firehose_assume_role.json
+# }
+
+# data "aws_iam_policy_document" "lambda_assume_role" {
+# statement {
+# effect = "Allow"
+
+# principals {
+# type = "Service"
+# identifiers = ["lambda.amazonaws.com"]
+# }
+
+# actions = ["sts:AssumeRole"]
+# }
+# }
+
+# resource "aws_iam_role" "lambda_iam" {
+# name = "lambda_iam"
+# assume_role_policy = data.aws_iam_policy_document.lambda_assume_role.json
+# }
+
+
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/output.tf
new file mode 100644
index 0000000..67e3c0f
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/output.tf
@@ -0,0 +1,7 @@
+output "aws_kinesis_stream_name" {
+ value = aws_kinesis_stream.kinesis.name
+}
+
+output "aws_kinesis_stream_arn" {
+ value = aws_kinesis_stream.kinesis.arn
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/valiables.tf
new file mode 100644
index 0000000..4f2c94e
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/kinesis/valiables.tf
@@ -0,0 +1,6 @@
+
+
+variable "company_name" {
+ type = string
+}
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/kinesisStreamToLambdaDemo-b9494dc1-fa94-4184-ab34-2707c917b543.zip b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/kinesisStreamToLambdaDemo-b9494dc1-fa94-4184-ab34-2707c917b543.zip
new file mode 100644
index 0000000..ddeb36e
Binary files /dev/null and b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/kinesisStreamToLambdaDemo-b9494dc1-fa94-4184-ab34-2707c917b543.zip differ
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/main.tf
new file mode 100644
index 0000000..6155e44
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/main.tf
@@ -0,0 +1,140 @@
+# aws role
+resource "aws_iam_role" "lambda_role" {
+ name = "kinesisToLambda_${var.company_name}_role"
+
+ assume_role_policy = jsonencode({
+ Version = "2012-10-17",
+ Statement = [
+ {
+ Action = "sts:AssumeRole",
+ Effect = "Allow",
+ Principal = {
+ Service = "lambda.amazonaws.com",
+ },
+ },
+ ],
+ })
+}
+
+data "aws_iam_policy" "AWSLambdaBasicExecutionRole" {
+ name = "AWSLambdaBasicExecutionRole"
+}
+
+data "aws_iam_policy" "AWSLambdaKinesisExecutionRole" {
+ name = "AWSLambdaKinesisExecutionRole"
+}
+
+data "aws_iam_policy" "AWSLambdaVPCAccessExecutionRole" {
+ name = "AWSLambdaVPCAccessExecutionRole"
+}
+
+resource "aws_iam_role_policy_attachment" "lambda_execution_policy_attachment" {
+ policy_arn = data.aws_iam_policy.AWSLambdaBasicExecutionRole.arn
+ role = aws_iam_role.lambda_role.name
+}
+
+resource "aws_iam_role_policy_attachment" "lambda_execution_policy_attachment2" {
+ policy_arn = data.aws_iam_policy.AWSLambdaKinesisExecutionRole.arn
+ role = aws_iam_role.lambda_role.name
+}
+
+resource "aws_iam_role_policy_attachment" "lambda_execution_policy_attachment3" {
+ policy_arn = data.aws_iam_policy.AWSLambdaVPCAccessExecutionRole.arn
+ role = aws_iam_role.lambda_role.name
+}
+
+resource "aws_lambda_function" "kinesisStreamToLambda" {
+ function_name = "kinesisToLambda_${var.company_name}"
+ runtime = "java11"
+ handler = "com.techsensor.aws.mqtt.lambda.handler.AwsMqttHandler::handleRequest"
+ filename = "./modules/lambda/kinesisStreamToLambdaDemo-b9494dc1-fa94-4184-ab34-2707c917b543.zip"
+ role = aws_iam_role.lambda_role.arn # 使用你已有的 Lambda 角色或创建一个新的
+ memory_size = 512
+ timeout = 900
+
+ snap_start {
+ apply_on = "PublishedVersions"
+ }
+
+ vpc_config {
+ subnet_ids = var.subnet_ids # 替换为你的子网 ID
+ security_group_ids = var.sggroup_ids # 替换为你的安全组 ID
+ }
+
+ environment {
+ variables = {
+ AURORA_PASSWORD = "${var.AURORA_PASSWORD}",
+ AURORA_URL = "jdbc:mysql://${var.AURORA_URL}:3306/third",
+ AURORA_USERNAME = "${var.AURORA_USERNAME}",
+ AWS_ACCESS = "${var.AWS_ACCESS}",
+ AWS_SECRET = "${var.AWS_SECRET}",
+ # FIREHOSE_DELIVERY_STREAM_NAME="${var.aws_kinesis_stream_name}",
+ PUSH_URL_METCOM = "http://47.74.30.186:8080/rawJson/post/metcom",
+ QUERY_PUSH_INFO = "https://iothub-web.ttkdatatechbuild.com/api/targetConfig/config/v2/queryByDeviceId?deviceId="
+ SINGLE_ID_TABLE_NAME = "rawData_single_id"
+ TABLE_NAME = "rawData",
+ }
+ }
+}
+
+
+
+# resource "aws_lambda_event_source_mapping" "alert_record_dynamodb_trigger" {
+# event_source_arn = var.alert_record_stream_arn_tk
+# function_name = aws_lambda_function.sensorAlermTransfer_tk.arn
+# starting_position = "LATEST"
+
+# }
+
+######################
+
+# resource "aws_lambda_function" "ddb_to_filehorse_iot_tk" {
+# function_name = "ddb_to_filehorse_iot_tk"
+# runtime = "python3.11"
+# handler = "index.handler"
+# filename = "./modules/lambda/ddb-to-filehorse-iot.zip"
+# role = aws_iam_role.lambda_role.arn # 使用你已有的 Lambda 角色或创建一个新的
+
+# environment {
+# variables = {
+# DeliveryStreamName = "ddb-to-s3-stream"
+# }
+# }
+# }
+# resource "aws_lambda_event_source_mapping" "ddb_to_filehorse_iot_dynamodb_trigger" {
+# event_source_arn = var.common_data_stream_arn_tk
+# function_name = aws_lambda_function.ddb_to_filehorse_iot_tk.arn
+# starting_position = "LATEST"
+
+# }
+# #######################
+# resource "aws_lambda_function" "dynamodbStreamsToDbm_tk" {
+# function_name = "dynamodbStreamsToDbm_tk"
+# runtime = "java11"
+# handler = "index.handler"
+# filename = "./modules/lambda/dynamodbStreamsToDbm.zip"
+# role = aws_iam_role.lambda_role.arn # 使用你已有的 Lambda 角色或创建一个新的
+# vpc_config {
+# subnet_ids = var.subnet_ids # 替换为你的子网 ID
+# security_group_ids = var.sggroup_ids # 替换为你的安全组 ID
+# }
+# environment {
+# variables = {
+# PUSH_URL_METCOM = "http://47.74.30.186:8080/rawJson/post/metcom"
+# QUERY_PUSH_INFO = "http://web-alb-481573367.ap-northeast-1.elb.amazonaws.com:20008/api/targetConfig/config/v2/queryByDeviceId?deviceId="
+# }
+# }
+# }
+# resource "aws_lambda_event_source_mapping" "dynamodbStreamsToDbm_dynamodb_trigger" {
+# event_source_arn = var.common_data_stream_arn_tk
+# function_name = aws_lambda_function.dynamodbStreamsToDbm_tk.arn
+# starting_position = "LATEST"
+
+# }
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/output.tf
new file mode 100644
index 0000000..aebd8a5
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/output.tf
@@ -0,0 +1,3 @@
+output "aws_lambda_arn" {
+ value = aws_lambda_function.kinesisStreamToLambda.arn
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/variables.tf
new file mode 100644
index 0000000..6ba5eb8
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/lambda/variables.tf
@@ -0,0 +1,31 @@
+variable "company_name" {
+ type = string
+}
+
+variable "subnet_ids" {
+ type = list
+}
+variable "sggroup_ids" {
+ type = list
+}
+variable "AURORA_PASSWORD" {
+ type = string
+ default = "Abc#123456xyz"
+
+}
+variable "AURORA_USERNAME" {
+ type = string
+ default = "techsor"
+}
+variable "AURORA_URL" {
+ type = string
+}
+variable "AWS_ACCESS" {
+ type = string
+}
+variable "AWS_SECRET" {
+ type = string
+}
+variable "aws_kinesis_stream_name" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/main.tf
new file mode 100644
index 0000000..cc1561a
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/main.tf
@@ -0,0 +1,217 @@
+resource "aws_mq_configuration" "sensor" {
+ description = "Example Configuration"
+ name = "${var.project_name}-config"
+ engine_type = "ActiveMQ"
+ engine_version = "5.17.6"
+
+ data = <
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+DATA
+}
+
+resource "aws_mq_broker" "ActiveMQ" {
+ broker_name = "${var.project_name}-mq"
+
+ # configuration {
+ # id = aws_mq_configuration.sensor.id
+ # revision = aws_mq_configuration.sensor.latest_revision
+ # }
+ subnet_ids = var.subnet_mq_ids
+ publicly_accessible = false
+ engine_type = "ActiveMQ"
+ engine_version = "5.17.6"
+ host_instance_type = "mq.t3.micro"
+ security_groups = [ "${var.sg_mq}"]
+
+ user {
+ username = var.username
+ password = var.password
+ }
+ logs {
+ general = true
+ }
+}
+
+
+
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/output.tf
new file mode 100644
index 0000000..62f5823
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/output.tf
@@ -0,0 +1,3 @@
+output "ActiveMQBrokerId" {
+ value = aws_mq_broker.ActiveMQ.id
+}
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/valiables.tf
new file mode 100644
index 0000000..c3614b8
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/mq/valiables.tf
@@ -0,0 +1,18 @@
+variable "project_name" {
+ type = string
+ default = "prod"
+}
+variable "username" {
+ type = string
+ default = "techsor"
+}
+variable "password" {
+ type = string
+ default = "Abc#123456xyz"
+}
+variable "subnet_mq_ids" {
+ type = list(string)
+}
+variable "sg_mq" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/main.tf
new file mode 100644
index 0000000..e46d8db
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/main.tf
@@ -0,0 +1,68 @@
+# data exist vpc
+data "aws_vpc" "vpc_sensor_plantform" {
+
+ filter {
+ name = "tag:Name"
+ values = ["${var.vpc_name}"]
+ }
+}
+
+# data "aws_subnets" "public"
+data "aws_subnets" "public_subnets" {
+ filter {
+ name = "vpc-id"
+ values = [data.aws_vpc.vpc_sensor_plantform.id]
+ }
+
+ tags = {
+ Tier = "public"
+ }
+}
+
+# # data "aws_subnet" "public"
+# data "aws_subnet" "public_subnet"{
+# for_each = toset(data.aws_subnets.public_subnets.ids)
+# id = each.value
+# }
+
+# data "aws_subnet" "protected"
+data "aws_subnets" "protected_subnets" {
+ filter {
+ name = "vpc-id"
+ values = [data.aws_vpc.vpc_sensor_plantform.id]
+ }
+
+ tags = {
+ Tier = "protected"
+ }
+}
+
+# # data "aws_subnet" "protected"
+# data "aws_subnets" "mqtt_protected_subnets" {
+# filter {
+# name = "vpc-id"
+# values = [data.aws_vpc.vpc_sensor_plantform.id]
+# }
+
+# tags = {
+# Tier = "mqtt"
+# }
+# }
+
+# # data "aws_subnet" "protected"
+# data "aws_subnet" "protected_subnet"{
+# for_each = toset(data.aws_subnets.protected_subnets.ids)
+# id = each.value
+# }
+
+# data "aws_subnet" "private"
+data "aws_subnets" "private_subnets" {
+ filter {
+ name = "vpc-id"
+ values = [data.aws_vpc.vpc_sensor_plantform.id]
+ }
+
+ tags = {
+ Tier = "private"
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/output.tf
new file mode 100644
index 0000000..52b62b9
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/output.tf
@@ -0,0 +1,44 @@
+output "vpc_id" {
+ value = data.aws_vpc.vpc_sensor_plantform.id
+}
+# output "public_subnet" {
+# value = data.aws_subnet.public_subnet
+# }
+# output "protected_subnet" {
+# value = data.aws_subnet.protected_subnet
+# }
+# output "private_subnet" {
+# value = data.aws_subnet.private_subnet
+# }
+
+output "public_subnet_ids" {
+ value = data.aws_subnets.public_subnets.ids
+}
+output "protected_subnet_ids" {
+ value = data.aws_subnets.protected_subnets.ids
+}
+# output "mqtt_protected_subnet_ids" {
+# value = data.aws_subnets.mqtt_protected_subnets
+# }
+output "private_subnet_ids" {
+ value = data.aws_subnets.private_subnets.ids
+}
+# output "public_subnet_01" {
+# value = data.aws_subnet.public_subnet[0].id
+# }
+# output "public_subnet_02" {
+# value = data.aws_subnet.public_subnet[1].id
+# }
+# output "protected_subnet_01" {
+# value = data.aws_subnet.protected_subnet[0].id
+# }
+# output "protected_subnet_02" {
+# value = data.aws_subnet.protected_subnet[1].id
+# }
+output "vpc_cidr_block" {
+ value = data.aws_vpc.vpc_sensor_plantform.cidr_block
+}
+
+# output "subnet_cidr_blocks" {
+# value = [for s in data.aws_subnet.public_subnet : s.cidr_block]
+# }
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/variables.tf
new file mode 100644
index 0000000..a40c889
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/network/variables.tf
@@ -0,0 +1,3 @@
+variable "vpc_name" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/init.sql b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/init.sql
new file mode 100644
index 0000000..5f2cee6
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/init.sql
@@ -0,0 +1,145 @@
+/*
+SQLyog 企业版 - MySQL GUI v8.14
+MySQL - 8.0.28 : Database - data_center_admin
+*********************************************************************
+*/
+
+
+/*!40101 SET NAMES utf8 */;
+
+/*!40101 SET SQL_MODE=''*/;
+
+/*!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 /*!32312 IF NOT EXISTS*/`data_center_admin` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
+
+USE `data_center_admin`;
+
+/*Table structure for table `basic_company` */
+
+DROP TABLE IF EXISTS `basic_company`;
+
+CREATE TABLE `basic_company` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_id` bigint DEFAULT NULL,
+ `company_name` varchar(500) DEFAULT NULL,
+ `mfa_switch` int DEFAULT '0' COMMENT '谷歌mfa服务开关。0-关闭,1-开启',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_company` */
+
+insert into `basic_company`(`id`,`parent_id`,`company_name`,`mfa_switch`,`flag`,`create_time`,`modify_time`) values (1,-1,'MiniSolution',0,0,1658978002231,1658978002231);
+
+/*Table structure for table `basic_menu` */
+
+DROP TABLE IF EXISTS `basic_menu`;
+
+CREATE TABLE `basic_menu` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_menu_id` bigint DEFAULT NULL,
+ `menu_name` varchar(100) DEFAULT NULL,
+ `menu_name_en` varchar(100) DEFAULT NULL,
+ `menu_name_jp` varchar(100) DEFAULT NULL,
+ `remark` varchar(100) DEFAULT NULL,
+ `menu_level` int DEFAULT '1' COMMENT '菜单级别',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_menu` */
+
+insert into `basic_menu`(`id`,`parent_menu_id`,`menu_name`,`menu_name_en`,`menu_name_jp`,`remark`,`menu_level`,`flag`,`create_time`) values (1,-1,'项目管理','项目管理','项目管理','项目管理',1,0,1659079777164),(2,-1,'楼宇模块','楼宇模块','楼宇模块','楼宇模块',1,0,1659079777164),(3,-1,'设备模块','设备模块','设备模块','设备模块',1,0,1659079777164),(4,-1,'转发管理','转发管理','转发管理','转发管理',1,0,1659079777164),(5,-1,'数据来源管理','数据来源管理','数据来源管理','数据来源管理',1,0,1659079777164),(6,1,'添加','添加','添加','项目管理-添加',2,0,1659079777164),(7,1,'编辑','编辑','编辑','项目管理-编辑',2,0,1659079777164),(8,1,'删除','删除','删除','项目管理-删除',2,0,1659079777164),(9,1,'批量添加','批量添加','批量添加','项目管理-批量添加',2,0,1659079777164),(10,2,'楼宇管理','楼宇管理','楼宇管理','楼宇管理',2,0,1659079777164),(11,2,'楼层管理','楼层管理','楼层管理','楼层管理',2,0,1659079777164),(12,2,'房间管理','房间管理','房间管理','房间管理',2,0,1659079777164),(13,2,'资产管理','资产管理','资产管理','资产管理',2,0,1659079777164),(14,10,'添加','添加','添加','楼宇管理-添加',3,0,1659079777164),(15,10,'编辑','编辑','编辑','楼宇管理-编辑',3,0,1659079777164),(16,10,'删除','删除','删除','楼宇管理-删除',3,0,1659079777164),(17,11,'添加','添加','添加','楼层管理-添加',3,0,1659079777164),(18,11,'编辑','编辑','编辑','楼层管理-编辑',3,0,1659079777164),(19,11,'删除','删除','删除','楼层管理-删除',3,0,1659079777164),(20,12,'添加','添加','添加','房间管理-添加',3,0,1659079777164),(21,12,'编辑','编辑','编辑','房间管理-编辑',3,0,1659079777164),(22,12,'删除','删除','删除','房间管理-删除',3,0,1659079777164),(23,13,'添加','添加','添加','资产管理-添加',3,0,1659079777164),(24,13,'编辑','编辑','编辑','资产管理-编辑',3,0,1659079777164),(25,13,'删除','删除','删除','资产管理-删除',3,0,1659079777164),(26,3,'设备管理','设备管理','设备管理','设备管理',2,0,1659079777164),(27,26,'添加','添加','添加','设备管理-添加',3,0,1659079777164),(28,26,'编辑','编辑','编辑','设备管理-编辑',3,0,1659079777164),(29,26,'删除','删除','删除','设备管理-删除',3,0,1659079777164),(30,26,'批量添加','批量添加','批量添加','设备管理-批量添加',3,0,1659079777164),(31,26,'批量删除','批量删除','批量删除','设备管理-批量删除',3,0,1659079777164),(32,3,'设备类别管理','设备类别管理','设备类别管理','设备类别管理',2,0,1659079777164),(33,32,'添加','添加','添加','设备类别管理-添加',3,0,1659079777164),(34,32,'编辑','编辑','编辑','设备类别管理-编辑',3,0,1659079777164),(35,32,'删除','删除','删除','设备类别管理-删除',3,0,1659079777164),(36,4,'添加','添加','添加','转发管理-添加',3,0,1659079777164),(37,4,'编辑','编辑','编辑','转发管理-编辑',3,0,1659079777164),(38,4,'删除','删除','删除','转发管理-删除',3,0,1659079777164),(39,5,'添加','添加','添加','数据来源管理-添加',3,0,1659079777164),(40,5,'编辑','编辑','编辑','数据来源管理-编辑',3,0,1659079777164),(41,5,'删除','删除','删除','数据来源管理-删除',3,0,1659079777164);
+
+/*Table structure for table `basic_role` */
+
+DROP TABLE IF EXISTS `basic_role`;
+
+CREATE TABLE `basic_role` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `role_name` varchar(100) DEFAULT NULL,
+ `description` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_menu_relation` */
+
+DROP TABLE IF EXISTS `basic_role_menu_relation`;
+
+CREATE TABLE `basic_role_menu_relation` (
+ `role_id` bigint DEFAULT NULL,
+ `menu_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_user_relation` */
+
+DROP TABLE IF EXISTS `basic_role_user_relation`;
+
+CREATE TABLE `basic_role_user_relation` (
+ `user_id` bigint DEFAULT NULL,
+ `role_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_user` */
+
+DROP TABLE IF EXISTS `basic_user`;
+
+CREATE TABLE `basic_user` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_type` int DEFAULT '0' COMMENT '0-未知,1-管理平台用户,2-普通平台用户',
+ `company_id` bigint NOT NULL,
+ `username` varchar(255) DEFAULT NULL,
+ `login_name` varchar(255) DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `password_modify_time` bigint DEFAULT NULL,
+ `salt` varchar(255) DEFAULT NULL,
+ `email` varchar(255) DEFAULT NULL,
+ `mobile_number` varchar(255) DEFAULT NULL,
+ `mfa_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `mfa_bind` int DEFAULT '0' COMMENT '用户是否绑定了mfa设备。0-未绑定,1-已绑定',
+ `last_login_time` bigint DEFAULT NULL,
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `expire_time` bigint DEFAULT '4114487556000',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_user` */
+
+insert into `basic_user`(`id`,`user_type`,`company_id`,`username`,`login_name`,`password`,`password_modify_time`,`salt`,`email`,`mobile_number`,`mfa_secret`,`mfa_bind`,`last_login_time`,`flag`,`expire_time`,`create_time`,`creator_id`,`modify_time`,`modifier_id`) values (1,1,1,'admin','admin','nVg+buw0YAs=',1670312031273,'09bc3a7898','1053492832@qq.com',NULL,NULL,0,1706177793183,0,4114487556000,4114487556000,NULL,1670312031273,NULL);
+
+/*Table structure for table `login_history` */
+
+DROP TABLE IF EXISTS `login_history`;
+
+CREATE TABLE `login_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_id` bigint DEFAULT NULL,
+ `request_ip` varchar(255) DEFAULT NULL,
+ `login_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/main.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/main.tf
new file mode 100644
index 0000000..5455eea
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/main.tf
@@ -0,0 +1,14 @@
+data "aws_db_instance" "rds" {
+ db_instance_identifier = var.db_name
+}
+
+data "aws_elasticache_replication_group" "redis" {
+ replication_group_id = "replication-group-${var.project_name}"
+}
+
+# terraform plan
+# terraform apply
+# terraform apply --auto-approve
+# delete resource
+# terraform destroy
+# terraform destroy --target
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/output.tf
new file mode 100644
index 0000000..4cbbbfd
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/output.tf
@@ -0,0 +1,7 @@
+output "rds_address" {
+ value = data.aws_db_instance.rds.address
+}
+
+output "redis_address" {
+ value = data.aws_elasticache_replication_group.redis.primary_endpoint_address
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/valiables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/valiables.tf
new file mode 100644
index 0000000..3ebec69
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/rds/valiables.tf
@@ -0,0 +1,8 @@
+variable "project_name" {
+ type = string
+ default = "prod"
+}
+
+variable "db_name" {
+ type = string
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/output.tf
new file mode 100644
index 0000000..5c43043
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/output.tf
@@ -0,0 +1,15 @@
+output "security_group_sg_alb_id" {
+ value = data.aws_security_group.sg_alb.id
+}
+output "security_group_sg_internal_alb_id" {
+ value = data.aws_security_group.sg_internal_alb.id
+}
+# output "security_group_sg_nlb_id" {
+# value = aws_security_group.sg_nlb.id
+# }
+output "security_group_sg_app_id" {
+ value = data.aws_security_group.sg_app.id
+}
+output "security_group_sg_db_id" {
+ value = data.aws_security_group.sg_db.id
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/security_group.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/security_group.tf
new file mode 100644
index 0000000..a76f340
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/security_group.tf
@@ -0,0 +1,21 @@
+# alb
+data "aws_security_group" "sg_alb"{
+ name = "${var.project_name}_alb_sg"
+}
+
+# internal alb
+data "aws_security_group" "sg_internal_alb"{
+ name = "${var.project_name}_internal_alb_sg"
+}
+
+# ecs app sender receiver
+data "aws_security_group" "sg_app"{
+ name = "${var.project_name}_app_sg"
+}
+
+# aurora用
+data "aws_security_group" "sg_db"{
+ name = "${var.project_name}_db_sg"
+}
+
+# glue job用
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/variables.tf
new file mode 100644
index 0000000..f5138d7
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/modules/securitygroup/variables.tf
@@ -0,0 +1,10 @@
+variable "project_name" {
+ type = string
+}
+
+variable "vpc_id" {}
+
+# variable "vpc_cidr_block" {
+# type = string
+# default = "172.110.0.0/16"
+# }
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/output.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/output.tf
new file mode 100644
index 0000000..db7e843
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/output.tf
@@ -0,0 +1,15 @@
+output "aurora_cluster_endpoint" {
+ value = module.Aurora.cluster_endpoint
+}
+
+output "aurora_reader_endpoint" {
+ value = module.Aurora.reader_endpoint
+}
+
+output "alb_sender_dns" {
+ value = module.alb_elb.alb_internal_dns
+}
+
+output "alb_receiver_dns" {
+ value = module.alb_elb.alb_dns
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/variables.tf b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/variables.tf
new file mode 100644
index 0000000..02b8082
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/aurora_terraform_osaka/variables.tf
@@ -0,0 +1,56 @@
+
+#需要按实际情况修改命名,最好能做成入力参数
+variable "project_name" {
+ type = string
+ default = "tkbuild-oosaka"
+}
+
+variable "region" {
+ type = string
+ default = "ap-northeast-3"
+}
+
+# #需要按实际情况修改路径,最好能做成入力参数
+# variable "aws_access_config_path" {
+# type = string
+# default = "C:\\Users\\86150\\.aws\\config"
+# }
+
+# #需要按实际情况修改路径,最好能做成入力参数
+# variable "aws_access_credentials_path" {
+# type = string
+# default = "C:\\Users\\86150\\.aws\\credentials"
+# }
+
+variable "access_key" {
+ type = string
+ default = "placeholder_access_key"
+}
+
+variable "secret_key" {
+ type = string
+ default = "placeholder_secret_key"
+}
+
+#需要按实际情况修改命名,最好能做成入力参数
+variable "company_name" {
+ type = string
+ default = "new-company"
+}
+
+variable "alarmRedisDatabase" {
+ type = string
+ default = "redis_db_id"
+}
+
+#需要按实际情况修改命名,最好能做成入力参数
+variable "roidAuthorization" {
+ type = string
+ default = "placeholder_roidAuthorization"
+}
+
+#需要按实际情况修改命名,最好能做成入力参数
+variable "roid2Authorization" {
+ type = string
+ default = "placeholder_roid2Authorization"
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/config/application.properties b/dongjian-center-admin-controller/src/main/resources/config/application.properties
new file mode 100644
index 0000000..fdc1d3f
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/config/application.properties
@@ -0,0 +1,101 @@
+server.port=${serverPort}
+
+api.enable=${apiEnable}
+
+spring.mvc.pathmatch.matching-strategy= ANT_PATH_MATCHER
+
+mybatis.mapperLocations=classpath:mappers/**/*.xml
+
+spring.datasource.name=data_center_aeon_admin
+spring.datasource.url=jdbc:mysql://${datasourceDNS}/data_center_aeon_admin?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=${datasourceTimeZone}
+spring.datasource.username=${datasourceUsername}
+spring.datasource.password=${datasourcePassword}
+#使用druid数据源
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
+
+#配置log日志
+logging.config=classpath:config/logback-boot.xml
+logging_level=${loggingLevel}
+logging_path=${loggingPath}
+#部署时使用SYSLOG
+logging_appender=${loggingAppender}
+logging_maxHistory=${loggingMaxHistory:7}
+logging_maxFileSize=100MB
+mybatis_log_level=${mybatisLogLevel}
+
+user.login.keytimeout=360000
+
+#集群模式cluster
+spring.redis.cluster.nodes=192.168.0.30:7000,192.168.0.30:7001
+#跨集群执行命令时要遵循的最大重定向数量
+spring.redis.cluster.max-redirects=3
+#哨兵模式sentinel
+spring.redis.sentinel.master=mymaster
+spring.redis.sentinel.nodes=192.168.0.30:16379,192.168.0.30:16379
+
+#单机模式standalone
+spring.redis.host=${redisHost}
+spring.redis.port=6379
+
+spring.redis.password=${redisPassword}
+spring.redis.timeout=5000
+#Redis数据库索引(默认为0)
+spring.redis.database=15
+#配置启动模式cluster、sentinel、standalone
+spring.redis.mode=standalone
+# Lettuce
+# 连接池最大连接数(使用负值表示没有限制)
+spring.redis.lettuce.pool.max-active=8
+# 连接池最大阻塞等待时间(使用负值表示没有限制)
+spring.redis.lettuce.pool.max-wait=100
+# 连接池中的最大空闲连接
+spring.redis.lettuce.pool.max-idle=8
+# 连接池中的最小空闲连接
+spring.redis.lettuce.pool.min-idle=0
+# 关闭超时时间
+spring.redis.lettuce.shutdown-timeout=100
+
+
+#邮件发送信息
+mail.smtp.host=email-smtp.ap-northeast-1.amazonaws.com
+mail.smtp.port=465
+mail.smtp.auth=true
+mail.smtp.ssl=true
+mail.sender.username=AKIAVRXFMB43Z4Q6WGZN
+mail.sender.password_encrypted=true
+mail.sender.password=a/52R0rao7ksRMvl1j17fVEmPCw7gC9OreHDqWOE+S7sgmoQT0YgoLRJqOlJqX7e
+mail.sender.sendername=datacenter-info
+mail.sender.from=alert@ttkdatatechbuild.com
+#邮件通知服务开关
+mail.send.switch=true
+
+Spring.mvc.hiddenmethod.filter.enabled=true
+#单个文件上传发大小
+spring.servlet.multipart.max-file-size=20MB
+#多个文件上传的共大小不得超过100M
+spring.servlet.multipart.max-request-size=100MB
+
+server.servlet.context-path=/api
+
+mybatis.configuration.map-underscore-to-camel-case=true
+
+server.servlet.session.cookie.http-only=true
+server.servlet.session.cookie.secure=true
+
+springdoc.swagger-ui.doc-expansion=none
+springdoc.swagger-ui.operations-sorter=alpha
+springdoc.swagger-ui.tags-sorter=alpha
+
+web.login.url=${webLoginUrl}
+web.login.2d3d.url=${webLoginUrl2d3d}
+web.admin.login.url=${webAdminLoginUrl}
+
+third.business.host=${thirdBusinessHost}
+
+java.jvm.opts=${jvmOpts}
+
+aws.access.key=${awsAccessKey}
+aws.secret.key=${awsSecretKey}
+
+terraform.env=${terraformEnv}
diff --git a/dongjian-center-admin-controller/src/main/resources/config/logback-boot.xml b/dongjian-center-admin-controller/src/main/resources/config/logback-boot.xml
new file mode 100644
index 0000000..c4eba59
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/config/logback-boot.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} %p [%t] %m%n
+
+ UTF-8
+
+
+
+
+ ${logging_path}/spring.log
+
+
+
+
+
+ ${logging_path}/spring.%d.%i.gz
+
+ ${logging_maxHistory}
+
+
+ ${logging_maxFileSize}
+
+
+
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p [%t] %c %m%n
+
+
+ UTF-8
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dongjian-center-admin-controller/src/main/resources/config/version.properties b/dongjian-center-admin-controller/src/main/resources/config/version.properties
new file mode 100644
index 0000000..10d9a5d
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/config/version.properties
@@ -0,0 +1,3 @@
+project.latest.version=v0.0.1.20240228
+
+v0.0.1.20240228=1.初始版本
\ No newline at end of file
diff --git a/dongjian-center-admin-controller/src/main/resources/sql/initDatabase.sql b/dongjian-center-admin-controller/src/main/resources/sql/initDatabase.sql
new file mode 100644
index 0000000..8618ea7
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/sql/initDatabase.sql
@@ -0,0 +1,1732 @@
+/*
+SQLyog 企业版 - MySQL GUI v8.14
+MySQL - 8.0.28 : Database - data_center_aeon_admin
+*********************************************************************
+*/
+
+
+/*!40101 SET NAMES utf8 */;
+
+/*!40101 SET SQL_MODE=''*/;
+
+/*!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 /*!32312 IF NOT EXISTS*/`data_center_aeon_admin` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
+
+USE `data_center_aeon_admin`;
+
+/*Table structure for table `admin_user` */
+
+DROP TABLE IF EXISTS `admin_user`;
+
+CREATE TABLE `admin_user` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `username` varchar(45) DEFAULT NULL,
+ `password` varchar(45) DEFAULT NULL,
+ `access_token` varchar(45) DEFAULT NULL,
+ `token_expire_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `alert_handle_history` */
+
+DROP TABLE IF EXISTS `alert_handle_history`;
+
+CREATE TABLE `alert_handle_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `alert_history_id` bigint DEFAULT NULL COMMENT 'alert_history表主键',
+ `device_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `last_status` int DEFAULT '0' COMMENT '0-未确认,1-确认了未对应,2-对应中,3-完成',
+ `status` int DEFAULT '0' COMMENT '0-未确认,1-确认了未对应,2-对应中,3-完成,4-自动恢复',
+ `handler` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '处理者',
+ `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '处理备注',
+ `alert_status` int DEFAULT '0' COMMENT '0-处于警报,1-警报解除',
+ `handle_at` bigint DEFAULT NULL COMMENT '处理时间',
+ PRIMARY KEY (`id`),
+ KEY `device_id` (`device_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='告警处理表';
+
+/*Table structure for table `alert_history` */
+
+DROP TABLE IF EXISTS `alert_history`;
+
+CREATE TABLE `alert_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) DEFAULT NULL,
+ `receive_ts` bigint DEFAULT NULL,
+ `confirm_status` int DEFAULT '0' COMMENT '是否确认:0-未确认,1-确认',
+ `handle_status` int DEFAULT '1' COMMENT '处理状态:1-未对应,2-对应中,3-完了,4-自动恢复',
+ `alert_status` int DEFAULT '0' COMMENT '0-处于警报,1-警报解除',
+ `retain_alert` int DEFAULT '0' COMMENT 'dashboard自动恢复是否保留告警:0-不保留,1-保留',
+ PRIMARY KEY (`id`),
+ KEY `device_id` (`device_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='告警历史表';
+
+/*Table structure for table `aurora_building_trend_stats` */
+
+DROP TABLE IF EXISTS `aurora_building_trend_stats`;
+
+CREATE TABLE `aurora_building_trend_stats` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `sender_building_delta` int DEFAULT NULL,
+ `created_time` timestamp NULL DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `aurora_buliding_trend_stats_bt_index` (`created_time` DESC)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='aurora楼宇统计';
+
+/*Table structure for table `aurora_device_trends_stats` */
+
+DROP TABLE IF EXISTS `aurora_device_trends_stats`;
+
+CREATE TABLE `aurora_device_trends_stats` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `reciever_device_id_delta` bigint DEFAULT NULL COMMENT '收到设备数据增量',
+ `sender_device_id_delta` bigint DEFAULT NULL,
+ `sender_dispatch_delta` bigint DEFAULT NULL COMMENT '转发数据量',
+ `sender_alert_delta` int DEFAULT NULL,
+ `sender_alert_cancel_delta` int DEFAULT NULL,
+ `created_time` timestamp NULL DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `aurora_device_trends_stats_time_index` (`created_time` DESC)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='aurora收到的设备统计信息';
+
+/*Table structure for table `aurora_trends_stats_total` */
+
+DROP TABLE IF EXISTS `aurora_trends_stats_total`;
+
+CREATE TABLE `aurora_trends_stats_total` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增',
+ `receiver_device_id` bigint DEFAULT NULL,
+ `sender_device_id` bigint DEFAULT NULL,
+ `sender_building` bigint DEFAULT NULL,
+ `dispatch` bigint DEFAULT NULL,
+ `alert` bigint DEFAULT NULL,
+ `alert_cancel` bigint DEFAULT NULL,
+ `created_date` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `aurora_trends_stats_total_date_index` (`created_date` DESC)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Aurora统计信息总量';
+
+/*Table structure for table `ba_status_statistics` */
+
+DROP TABLE IF EXISTS `ba_status_statistics`;
+
+CREATE TABLE `ba_status_statistics` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `device_info_id` int DEFAULT NULL,
+ `is_running` int DEFAULT NULL COMMENT '运行状态该,0停止,1运行',
+ `latest_ts` varchar(45) DEFAULT NULL COMMENT '最新变化时间',
+ `continuous_running_time` bigint DEFAULT NULL COMMENT '持续运行时间,精确到秒\n',
+ `aggregated_running_time` bigint DEFAULT NULL COMMENT '累计运行时间,秒',
+ `running_count` int DEFAULT NULL COMMENT '运行次数',
+ `last_start_time` bigint DEFAULT NULL COMMENT '上次启动时间,毫秒级时间戳',
+ `last_stop_time` bigint DEFAULT NULL COMMENT '上次停止时间,毫秒级时间戳',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `device_info_id_UNIQUE` (`device_info_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `basic_asset_class_big` */
+
+DROP TABLE IF EXISTS `basic_asset_class_big`;
+
+CREATE TABLE `basic_asset_class_big` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `class_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `thumbnail_normal_base64` text COMMENT '普通图片转base64格式',
+ `thumbnail_alarm_base64` text COMMENT '告警图片转base64格式',
+ `thumbnail_dis_base64` text COMMENT '灰色图片转base64格式',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `basic_asset_class_medium` */
+
+DROP TABLE IF EXISTS `basic_asset_class_medium`;
+
+CREATE TABLE `basic_asset_class_medium` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `class_big_id` bigint DEFAULT NULL,
+ `class_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `basic_asset_class_small` */
+
+DROP TABLE IF EXISTS `basic_asset_class_small`;
+
+CREATE TABLE `basic_asset_class_small` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `class_medium_id` bigint DEFAULT NULL,
+ `class_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `basic_building` */
+
+DROP TABLE IF EXISTS `basic_building`;
+
+CREATE TABLE `basic_building` (
+ `building_id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '楼宇名称',
+ `address` varchar(255) DEFAULT NULL COMMENT '地址',
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `udf_building_id` varchar(200) DEFAULT NULL COMMENT '用户自定楼宇ID',
+ `building_bucket` varchar(1000) DEFAULT NULL COMMENT 'Autodesk Cloud BIM Model Key',
+ `floor_info_list` json DEFAULT NULL COMMENT '客户api文档自己加的参数floorInfoList',
+ `thumbnail_num` int DEFAULT NULL COMMENT '楼宇图片序号',
+ `show_switch_2d3d` int DEFAULT '0' COMMENT '是否在2d3d显示,0-显示,1-不显示',
+ `brief_introduction` varchar(1000) DEFAULT NULL COMMENT '简介',
+ `picture_introduction` json DEFAULT NULL COMMENT '图片详情',
+ `latitude` varchar(20) DEFAULT NULL,
+ `longitude` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`building_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='楼宇表';
+
+/*Table structure for table `basic_company` */
+
+DROP TABLE IF EXISTS `basic_company`;
+
+CREATE TABLE `basic_company` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_id` bigint DEFAULT NULL COMMENT '父企业ID',
+ `company_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `mfa_switch` int DEFAULT '0' COMMENT '谷歌mfa服务开关。0-关闭,1-开启',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `apikey` varchar(255) DEFAULT NULL,
+ `aurora_flag` int DEFAULT '0' COMMENT '0-未创建,1-创建中,2-创建成功,3-创建失败',
+ `aurora_url` varchar(255) DEFAULT NULL,
+ `aurora_read_url` varchar(255) DEFAULT NULL,
+ `aurora_username` varchar(255) DEFAULT NULL,
+ `aurora_password` varchar(255) DEFAULT NULL,
+ `redis_db_id` int DEFAULT NULL COMMENT '使用的redis库id',
+ `bearer_token` text,
+ `third_api_host` varchar(1000) DEFAULT NULL COMMENT 'Third api地址域名,例如:https://api-sec.test-public-api.kanri-roid.app/api/public/v1/problem-reports/return-to-normal,则这里是https://api-sec.test-public-api.kanri-roid.app',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `basic_floor` */
+
+DROP TABLE IF EXISTS `basic_floor`;
+
+CREATE TABLE `basic_floor` (
+ `floor_id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `building_id` bigint DEFAULT NULL COMMENT '所属楼宇ID',
+ `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '楼层名称',
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `udf_floor_id` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户自定义楼层ID',
+ `revit_name` varchar(255) DEFAULT NULL,
+ `offset_upper` varchar(255) DEFAULT NULL,
+ `offset_lower` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`floor_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='楼层信息表';
+
+/*Table structure for table `basic_menu` */
+
+DROP TABLE IF EXISTS `basic_menu`;
+
+CREATE TABLE `basic_menu` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_menu_id` bigint DEFAULT NULL,
+ `menu_name` varchar(100) DEFAULT NULL,
+ `menu_name_en` varchar(100) DEFAULT NULL,
+ `menu_name_jp` varchar(100) DEFAULT NULL,
+ `remark` varchar(100) DEFAULT NULL,
+ `menu_level` int DEFAULT '1' COMMENT '菜单级别',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_monitoring_asset` */
+
+DROP TABLE IF EXISTS `basic_monitoring_asset`;
+
+CREATE TABLE `basic_monitoring_asset` (
+ `equipment_id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `space_id` bigint DEFAULT NULL COMMENT '所属房间ID',
+ `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '资产名称',
+ `remark` varchar(255) DEFAULT NULL,
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `udf_equipment_id` varchar(100) DEFAULT NULL COMMENT '用户手写资产ID',
+ `class_big` varchar(255) DEFAULT NULL,
+ `class_big_id` bigint DEFAULT NULL,
+ `class_medium` varchar(255) DEFAULT NULL,
+ `class_medium_id` bigint DEFAULT NULL,
+ `class_small` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ `class_small_id` bigint DEFAULT NULL,
+ `symbol` varchar(255) DEFAULT NULL,
+ `manufacturer` varchar(255) DEFAULT NULL,
+ `model` varchar(255) DEFAULT NULL,
+ `manufacturing_date` varchar(255) DEFAULT NULL,
+ `specifications1` varchar(255) DEFAULT NULL,
+ `specifications2` varchar(255) DEFAULT NULL,
+ `specifications3` varchar(255) DEFAULT NULL,
+ `specifications4` varchar(255) DEFAULT NULL,
+ `specifications5` varchar(255) DEFAULT NULL,
+ `specifications6` varchar(255) DEFAULT NULL,
+ `s3_file_name` text COMMENT 's3存储的资料文件名',
+ `mapper_file_name` text COMMENT 's3资料文件名与原始资料文件名的映射关系',
+ `external_file` text COMMENT '关联外部文件url',
+ `user_manual` text COMMENT '用户手册存放地址',
+ `device_image` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '设备图片存放地址',
+ `pdf_user_manual` json DEFAULT NULL COMMENT '用户手册pdf,{"s3文件key":"原文件名"}',
+ `pdf_device_image` json DEFAULT NULL COMMENT '设备图片图片,{"s3文件key":"原文件名"}',
+ `images_introduction` json DEFAULT NULL COMMENT '图片介绍,{"s3文件key":"原文件名"}',
+ PRIMARY KEY (`equipment_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='监控资产表';
+
+/*Table structure for table `basic_monitoring_asset_copy1` */
+
+DROP TABLE IF EXISTS `basic_monitoring_asset_copy1`;
+
+CREATE TABLE `basic_monitoring_asset_copy1` (
+ `equipment_id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `space_id` bigint DEFAULT NULL COMMENT '所属房间ID',
+ `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '资产名称',
+ `remark` varchar(255) DEFAULT NULL,
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `udf_equipment_id` varchar(100) DEFAULT NULL COMMENT '用户手写资产ID',
+ `class_big` varchar(255) DEFAULT NULL,
+ `class_big_id` bigint DEFAULT NULL,
+ `class_medium` varchar(255) DEFAULT NULL,
+ `class_medium_id` bigint DEFAULT NULL,
+ `class_small` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ `class_small_id` bigint DEFAULT NULL,
+ `symbol` varchar(255) DEFAULT NULL,
+ `manufacturer` varchar(255) DEFAULT NULL,
+ `model` varchar(255) DEFAULT NULL,
+ `manufacturing_date` varchar(255) DEFAULT NULL,
+ `specifications1` varchar(255) DEFAULT NULL,
+ `specifications2` varchar(255) DEFAULT NULL,
+ `specifications3` varchar(255) DEFAULT NULL,
+ `specifications4` varchar(255) DEFAULT NULL,
+ `specifications5` varchar(255) DEFAULT NULL,
+ `specifications6` varchar(255) DEFAULT NULL,
+ `s3_file_name` text COMMENT 's3存储的资料文件名',
+ `mapper_file_name` text COMMENT 's3资料文件名与原始资料文件名的映射关系',
+ `external_file` text COMMENT '关联外部文件url',
+ `user_manual` text COMMENT '用户手册存放地址',
+ `device_image` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '设备图片存放地址',
+ PRIMARY KEY (`equipment_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='监控资产表';
+
+/*Table structure for table `basic_project` */
+
+DROP TABLE IF EXISTS `basic_project`;
+
+CREATE TABLE `basic_project` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `project_name` varchar(100) NOT NULL COMMENT '项目名称',
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `udf_project_id` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户自定义项目ID',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='项目表';
+
+/*Table structure for table `basic_role` */
+
+DROP TABLE IF EXISTS `basic_role`;
+
+CREATE TABLE `basic_role` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `role_name` varchar(100) DEFAULT NULL,
+ `description` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_menu_relation` */
+
+DROP TABLE IF EXISTS `basic_role_menu_relation`;
+
+CREATE TABLE `basic_role_menu_relation` (
+ `role_id` bigint DEFAULT NULL,
+ `menu_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_user_relation` */
+
+DROP TABLE IF EXISTS `basic_role_user_relation`;
+
+CREATE TABLE `basic_role_user_relation` (
+ `user_id` bigint DEFAULT NULL,
+ `role_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_space` */
+
+DROP TABLE IF EXISTS `basic_space`;
+
+CREATE TABLE `basic_space` (
+ `space_id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `floor_id` bigint DEFAULT NULL COMMENT '所属楼层ID',
+ `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '房间名称',
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `udf_space_id` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户自定义空间ID',
+ `pdf_user_manual` json DEFAULT NULL COMMENT '用户手册pdf,{"s3文件key":"原文件名"}',
+ `pdf_device_image` json DEFAULT NULL COMMENT '设备图片图片,{"s3文件key":"原文件名"}',
+ `images_introduction` json DEFAULT NULL COMMENT '图片介绍,{"s3文件key":"原文件名"}',
+ `pdf_construction_equipment` json DEFAULT NULL COMMENT '建筑设备pdf,{"s3文件key":"原文件名"}',
+ `pdf_electrical_equipment` json DEFAULT NULL COMMENT '电气设备pdf,{"s3文件key":"原文件名"}',
+ `pdf_ventilation_equipment` json DEFAULT NULL COMMENT '给排气设备pdf,{"s3文件key":"原文件名"}',
+ `pdf_sanitary_equipment` json DEFAULT NULL COMMENT '卫生设备pdf,{"s3文件key":"原文件名"}',
+ `pdf_fire_protection_equipment` json DEFAULT NULL COMMENT '消防设备pdf,{"s3文件key":"原文件名"}',
+ `pdf_other_equipment` json DEFAULT NULL COMMENT '其他设备pdf,{"s3文件key":"原文件名"}',
+ `space_category` varchar(100) DEFAULT NULL COMMENT '空间类别',
+ `area` varchar(50) DEFAULT NULL COMMENT '面积(㎡)',
+ `usage` varchar(200) DEFAULT NULL COMMENT '用途',
+ `risk_factor` varchar(200) DEFAULT NULL COMMENT '风险因素',
+ `user_department_or_tenant` varchar(200) DEFAULT NULL COMMENT '使用部门/租户',
+ `usage_start_date` varchar(100) DEFAULT NULL COMMENT '使用开始日期',
+ `usage_status` varchar(200) DEFAULT NULL COMMENT '使用情况',
+ `supporting_facilities` varchar(500) DEFAULT NULL COMMENT '配套设备',
+ `power_capacity` varchar(100) DEFAULT NULL COMMENT '电源容量(kVA)',
+ `remark1` varchar(500) DEFAULT NULL COMMENT '备注-1',
+ `remark2` varchar(500) DEFAULT NULL COMMENT '备注-2',
+ `remark3` varchar(500) DEFAULT NULL COMMENT '备注-3',
+ `tenant_id` bigint DEFAULT NULL,
+ PRIMARY KEY (`space_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='房间表';
+
+/*Table structure for table `basic_tenant` */
+
+DROP TABLE IF EXISTS `basic_tenant`;
+
+CREATE TABLE `basic_tenant` (
+ `tenant_id` bigint NOT NULL AUTO_INCREMENT,
+ `tenant_udf_id` varchar(100) NOT NULL COMMENT '租户自定义id',
+ `tenant_name` varchar(100) NOT NULL,
+ `building_id` bigint NOT NULL,
+ `company_id` bigint NOT NULL,
+ `creator_id` bigint NOT NULL,
+ `modifier_id` bigint NOT NULL,
+ `create_time` bigint NOT NULL COMMENT '创建时间,毫秒时间戳',
+ `modify_time` bigint NOT NULL COMMENT '更新时间,毫秒时间戳',
+ `flag` int NOT NULL DEFAULT '0',
+ PRIMARY KEY (`tenant_id`),
+ UNIQUE KEY `uk_tenant_udf_id` (`tenant_udf_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `basic_user` */
+
+DROP TABLE IF EXISTS `basic_user`;
+
+CREATE TABLE `basic_user` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_type` int DEFAULT '0' COMMENT '0-未知,1-管理平台用户,2-普通平台用户',
+ `company_id` bigint NOT NULL,
+ `username` varchar(255) DEFAULT NULL,
+ `login_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `salt` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密码加密的盐',
+ `email` varchar(255) DEFAULT NULL,
+ `mfa_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `mfa_bind` int DEFAULT '0' COMMENT '用户是否绑定了mfa设备。0-未绑定,1-已绑定',
+ `mobile_number` varchar(255) DEFAULT NULL,
+ `last_login_time` bigint DEFAULT NULL COMMENT '最新登录时间',
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `expire_time` bigint DEFAULT '4114487556000' COMMENT '有效期',
+ `create_time` bigint DEFAULT NULL COMMENT '创建时间',
+ `creator_id` bigint DEFAULT NULL COMMENT '创建人',
+ `modify_time` bigint DEFAULT NULL COMMENT '修改时间',
+ `modifier_id` bigint DEFAULT NULL COMMENT '修改人',
+ `super_role` int DEFAULT '0' COMMENT '超管权限,1超管,0普通',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `ble_history` */
+
+DROP TABLE IF EXISTS `ble_history`;
+
+CREATE TABLE `ble_history` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `ble_gateway_mac` varchar(45) DEFAULT NULL,
+ `ble_bluetooth_mac` varchar(45) DEFAULT NULL,
+ `ts` varchar(45) DEFAULT NULL,
+ `status` int DEFAULT NULL COMMENT '0:出\n1:进入',
+ `is_deleted` int DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `building_trend_stats` */
+
+DROP TABLE IF EXISTS `building_trend_stats`;
+
+CREATE TABLE `building_trend_stats` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `sender_building_delta` int DEFAULT NULL,
+ `created_time` timestamp NULL DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `buliding_trend_stats_bt_index` (`created_time` DESC)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='楼宇统计';
+
+/*Table structure for table `company` */
+
+DROP TABLE IF EXISTS `company`;
+
+CREATE TABLE `company` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `company_name` varchar(45) DEFAULT NULL,
+ `apikey` varchar(45) DEFAULT NULL,
+ `company_code` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `dashboard_aggregate_accumulate_30min` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_accumulate_30min`;
+
+CREATE TABLE `dashboard_aggregate_accumulate_30min` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL,
+ `aggregate_value` varchar(20) DEFAULT NULL COMMENT '30分钟聚合值',
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `date_day` int DEFAULT NULL,
+ `date_hour` int DEFAULT NULL,
+ `date_minute` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`,`date_month`,`date_day`,`date_hour`,`date_minute`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='30分钟聚合表';
+
+/*Table structure for table `dashboard_aggregate_accumulate_day` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_accumulate_day`;
+
+CREATE TABLE `dashboard_aggregate_accumulate_day` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL,
+ `aggregate_value` varchar(20) DEFAULT NULL COMMENT '日聚合值',
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `date_day` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`,`date_month`,`date_day`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='日聚合表';
+
+/*Table structure for table `dashboard_aggregate_accumulate_hour` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_accumulate_hour`;
+
+CREATE TABLE `dashboard_aggregate_accumulate_hour` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL,
+ `aggregate_value` varchar(20) DEFAULT NULL COMMENT '1小时聚合值',
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `date_day` int DEFAULT NULL,
+ `date_hour` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`,`date_month`,`date_day`,`date_hour`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='小时聚合表';
+
+/*Table structure for table `dashboard_aggregate_accumulate_month` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_accumulate_month`;
+
+CREATE TABLE `dashboard_aggregate_accumulate_month` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL,
+ `aggregate_value` varchar(20) DEFAULT NULL COMMENT '月聚合值',
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`,`date_month`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='月聚合表';
+
+/*Table structure for table `dashboard_aggregate_accumulate_year` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_accumulate_year`;
+
+CREATE TABLE `dashboard_aggregate_accumulate_year` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL,
+ `aggregate_value` varchar(20) DEFAULT NULL COMMENT '年聚合值',
+ `date_year` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='年聚合表';
+
+/*Table structure for table `dashboard_aggregate_measure_day` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_measure_day`;
+
+CREATE TABLE `dashboard_aggregate_measure_day` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL COMMENT '设备ID',
+ `average_value` varchar(20) DEFAULT NULL COMMENT '日平均值',
+ `max_value` varchar(20) DEFAULT NULL,
+ `min_value` varchar(20) DEFAULT NULL,
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `date_day` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '聚合时间',
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`,`date_month`,`date_day`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='日聚合表(测量值)';
+
+/*Table structure for table `dashboard_aggregate_measure_hour` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_measure_hour`;
+
+CREATE TABLE `dashboard_aggregate_measure_hour` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL COMMENT '设备ID',
+ `average_value` varchar(20) DEFAULT NULL COMMENT '小时平均值',
+ `max_value` varchar(20) DEFAULT NULL,
+ `min_value` varchar(20) DEFAULT NULL,
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `date_day` int DEFAULT NULL,
+ `date_hour` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '聚合时间',
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`,`date_month`,`date_day`,`date_hour`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='小时聚合表(测量值)';
+
+/*Table structure for table `dashboard_aggregate_measure_month` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_measure_month`;
+
+CREATE TABLE `dashboard_aggregate_measure_month` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL COMMENT '设备ID',
+ `average_value` varchar(20) DEFAULT NULL COMMENT '月平均值',
+ `max_value` varchar(20) DEFAULT NULL,
+ `min_value` varchar(20) DEFAULT NULL,
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '聚合时间',
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`,`date_month`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='月聚合表(测量值)';
+
+/*Table structure for table `dashboard_aggregate_measure_year` */
+
+DROP TABLE IF EXISTS `dashboard_aggregate_measure_year`;
+
+CREATE TABLE `dashboard_aggregate_measure_year` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL COMMENT '设备ID',
+ `average_value` varchar(20) DEFAULT NULL COMMENT '年平均值',
+ `max_value` varchar(20) DEFAULT NULL,
+ `min_value` varchar(20) DEFAULT NULL,
+ `date_year` int DEFAULT NULL,
+ `time_start` bigint DEFAULT NULL,
+ `time_end` bigint DEFAULT NULL,
+ `aggregated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '聚合时间',
+ PRIMARY KEY (`id`),
+ KEY `idx_device_time` (`device_id`,`date_year`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='年聚合表(测量值)';
+
+/*Table structure for table `dashboard_device_group` */
+
+DROP TABLE IF EXISTS `dashboard_device_group`;
+
+CREATE TABLE `dashboard_device_group` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `building_id` bigint DEFAULT NULL COMMENT '所属楼宇ID',
+ `name` varchar(500) NOT NULL,
+ `remark` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `created_by` bigint DEFAULT NULL,
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='dashboard设备分组表';
+
+/*Table structure for table `dashboard_device_group_relation` */
+
+DROP TABLE IF EXISTS `dashboard_device_group_relation`;
+
+CREATE TABLE `dashboard_device_group_relation` (
+ `device_info_id` int NOT NULL COMMENT 'device_info表里的id',
+ `device_group_id` bigint NOT NULL COMMENT 'dashboard_device_group表里的id'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='dashboard设备分组归属关系';
+
+/*Table structure for table `dashboard_notice_ignored` */
+
+DROP TABLE IF EXISTS `dashboard_notice_ignored`;
+
+CREATE TABLE `dashboard_notice_ignored` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `redis_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'alert_window_notice:ignore:%d,%d对应用户ID',
+ `member_value` varchar(255) NOT NULL COMMENT '存告警ID',
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `redis_key` (`redis_key`,`member_value`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='平台告警通知已读表';
+
+/*Table structure for table `dashboard_operation_log` */
+
+DROP TABLE IF EXISTS `dashboard_operation_log`;
+
+CREATE TABLE `dashboard_operation_log` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_id` bigint DEFAULT NULL,
+ `company_id` bigint DEFAULT NULL,
+ `operation` varchar(255) NOT NULL,
+ `operation_remark` varchar(500) NOT NULL,
+ `method_name` varchar(255) NOT NULL,
+ `class_name` varchar(255) NOT NULL,
+ `ip_address` varchar(50) DEFAULT NULL,
+ `request_params` text,
+ `execution_time_ms` bigint DEFAULT NULL,
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `dashboard_realtime_accumulate_day` */
+
+DROP TABLE IF EXISTS `dashboard_realtime_accumulate_day`;
+
+CREATE TABLE `dashboard_realtime_accumulate_day` (
+ `device_id` varchar(100) NOT NULL COMMENT '设备ID',
+ `date_year` int DEFAULT NULL COMMENT '年份',
+ `date_month` int DEFAULT NULL COMMENT '月份',
+ `date_day` int DEFAULT NULL COMMENT '日期',
+ `upload_value` varchar(20) DEFAULT NULL COMMENT '上传值',
+ `increment_today` varchar(20) DEFAULT NULL COMMENT '今天的增量',
+ `upload_at` bigint DEFAULT NULL COMMENT '上传时间(时间戳)',
+ UNIQUE KEY `uniq_device_date` (`device_id`,`date_year`,`date_month`,`date_day`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='设备每日累计数据表';
+
+/*Table structure for table `dashboard_realtime_measure` */
+
+DROP TABLE IF EXISTS `dashboard_realtime_measure`;
+
+CREATE TABLE `dashboard_realtime_measure` (
+ `device_id` varchar(100) NOT NULL,
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `date_day` int DEFAULT NULL,
+ `date_hour` int DEFAULT NULL,
+ `date_minute` int DEFAULT NULL,
+ `date_second` int DEFAULT NULL,
+ `upload_value` varchar(20) DEFAULT NULL,
+ `min_value` varchar(20) DEFAULT NULL,
+ `max_value` varchar(20) DEFAULT NULL,
+ `upload_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`device_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `dashboard_record_accumulate` */
+
+DROP TABLE IF EXISTS `dashboard_record_accumulate`;
+
+CREATE TABLE `dashboard_record_accumulate` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) DEFAULT NULL,
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `date_day` int DEFAULT NULL,
+ `date_hour` int DEFAULT NULL,
+ `date_minute` int DEFAULT NULL,
+ `date_second` int DEFAULT NULL,
+ `upload_value` varchar(20) DEFAULT NULL,
+ `increment_today` varchar(20) DEFAULT NULL COMMENT '今天的增量',
+ `increment_minute` varchar(20) DEFAULT NULL COMMENT '1分钟的增量',
+ `upload_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `dashboard_record_measure` */
+
+DROP TABLE IF EXISTS `dashboard_record_measure`;
+
+CREATE TABLE `dashboard_record_measure` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(100) NOT NULL,
+ `date_year` int DEFAULT NULL,
+ `date_month` int DEFAULT NULL,
+ `date_day` int DEFAULT NULL,
+ `date_hour` int DEFAULT NULL,
+ `date_minute` int DEFAULT NULL,
+ `date_second` int DEFAULT NULL,
+ `upload_value` varchar(20) DEFAULT NULL,
+ `upload_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `data_provider` */
+
+DROP TABLE IF EXISTS `data_provider`;
+
+CREATE TABLE `data_provider` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0=正常,1=删除',
+ `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
+ `thumbnail_base64` text COMMENT '图片转base64格式',
+ `remark` varchar(500) DEFAULT NULL,
+ `created_by` bigint DEFAULT NULL,
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='数据提供方';
+
+/*Table structure for table `data_provider_gateway_info` */
+
+DROP TABLE IF EXISTS `data_provider_gateway_info`;
+
+CREATE TABLE `data_provider_gateway_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0=正常,1=删除',
+ `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
+ `remark` varchar(500) DEFAULT NULL,
+ `created_by` bigint DEFAULT NULL,
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='网关情报';
+
+/*Table structure for table `data_src_config` */
+
+DROP TABLE IF EXISTS `data_src_config`;
+
+CREATE TABLE `data_src_config` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `code` varchar(100) DEFAULT NULL COMMENT '数据来源识别代码',
+ `api_key` varchar(100) DEFAULT NULL COMMENT 'api_key',
+ `name` varchar(100) DEFAULT NULL COMMENT '数据来源名称',
+ `method_type` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '来源方式(0:MQTT, 1:RESTFULL)',
+ `params` varchar(1000) DEFAULT NULL COMMENT '链接参数',
+ `state` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态 (0:激活, 1:冻结;)',
+ `created_by` bigint DEFAULT NULL,
+ `created_timestamp` timestamp NULL DEFAULT NULL,
+ `updated_by` bigint DEFAULT NULL,
+ `updated_timestamp` timestamp NULL DEFAULT NULL,
+ `company_id` bigint NOT NULL,
+ `device_id_position` varchar(100) DEFAULT NULL COMMENT '设备ID在JSON中的未知',
+ `flag` int DEFAULT '0' COMMENT '0:正常;1:删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='数据来源配置表';
+
+INSERT INTO data_src_config (`id`,`code`,`api_key`,`name`,`method_type`,`params`,`state`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`device_id_position`,`flag`) VALUES (1,'nittan-0001','nittan http interface','NITTANサーバ','1','{\"params\":{\"facility_info\":{\"facility_maker\":\"NITTAN\",\"facility_id\":\"Nihonbashi-Building\",\"facility_mode\":\"Maintenance\"},\"auth\":{\"code\":\"10001\",\"signature\":\"RvZYNReMpQBP13qTMfGVOLHYjY8=\",\"timestamp\":1681744941,\"subscription_id\":\"N22SHY3n\",\"version\":\"0.2\"},\"cmd\":\"notice\",\"notice_info\":[{\"device_info\":{\"device_name\":\"u696du52d9u7528u30acu30b9u906eu65adu5f01\",\"device_class\":\"Gas Detector\"},\"notice_level\":5,\"location_info\":{\"location_address\":\"01_B1_02_0002_76_TTEESSTT\"},\"notice_status\":\"GasAlarm\",\"notice_type\":\"Fire\"}]},\"type\":\"POST\",\"url\":\"/api/v2/to_dbm/nittan\"}','0',1,'2023-07-25 15:27:40',1,'2023-07-25 15:27:40',1,'$.notice_info[0].location_info.location_address',0);
+INSERT INTO data_src_config (`id`,`code`,`api_key`,`name`,`method_type`,`params`,`state`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`device_id_position`,`flag`) VALUES (2,'data-0001','2738968','LOYTEC GateWay','0','{\"caPath\":\"66afa789-bdcd-4261-a031-11713c3a5e3a.pem\",\"clientCrtPath\":\"103e9305-f94f-454f-99d5-fe1539566e82.pem\",\"clientId\":\"loytechtest10_#{companyId}\",\"clientKeyPath\":\"2320d9d7-046f-47c9-b3dd-d9acf4539460.key\",\"connectionTimeout\":30000,\"description\":\"ssltest\",\"password\":\"a123456\",\"sslState\":false,\"topic\":\"loytech_publish_10_#{companyId}\",\"url\":\"tcp://tokyo-build-prod-nlb-7d7ae42ccf48709b.elb.ap-northeast-1.amazonaws.com:1883\",\"username\":\"mini\"}','0',1,'2023-07-31 12:47:33',1,'2024-01-10 10:14:51',1,'$.id',0);
+INSERT INTO data_src_config (`id`,`code`,`api_key`,`name`,`method_type`,`params`,`state`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`device_id_position`,`flag`) VALUES (3,'IOServer-001','IOServer-001','IOServer-001','0','{\"caPath\":\"66afa789-bdcd-4261-a031-11713c3a5e3a.pem\",\"clientCrtPath\":\"103e9305-f94f-454f-99d5-fe1539566e82.pem\",\"clientId\":\"ioserver01_#{companyId}\",\"clientKeyPath\":\"2320d9d7-046f-47c9-b3dd-d9acf4539460.key\",\"connectionTimeout\":30000,\"description\":\"ioserver_01\",\"password\":\"a123456\",\"sslState\":false,\"topic\":\"ioserver_publish_01_#{companyId}\",\"url\":\"tcp://tokyo-build-prod-nlb-7d7ae42ccf48709b.elb.ap-northeast-1.amazonaws.com:1883\",\"username\":\"mini\"}','0',0,'2023-07-20 09:09:25',0,'2023-07-20 09:09:37',0,'$.Objs[0].N',0);
+
+
+
+/*Table structure for table `device_alert_config` */
+
+DROP TABLE IF EXISTS `device_alert_config`;
+
+CREATE TABLE `device_alert_config` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `device_config_id` bigint NOT NULL COMMENT '设备类别配置ID',
+ `alert_name` varchar(50) DEFAULT NULL COMMENT '设备告警名称',
+ `level` varchar(20) DEFAULT NULL COMMENT '告警级别',
+ `contents` varchar(200) DEFAULT NULL COMMENT '告警内容',
+ `type` varchar(100) DEFAULT NULL COMMENT '告警类型',
+ `message` varchar(999) DEFAULT NULL COMMENT '告警信息',
+ `flag` int DEFAULT '0' COMMENT '0 开启,1关闭',
+ `template_defs` varchar(999) DEFAULT NULL COMMENT '模板定义',
+ `target_id` varchar(100) DEFAULT NULL COMMENT '用户自定义输入ID',
+ `problem_report_category_id` varchar(100) DEFAULT NULL COMMENT '用户自定义输入ID2',
+ `forward_type` varchar(20) DEFAULT NULL COMMENT '转发类型( "api|mail|api&mail") ',
+ `building_id` varchar(100) DEFAULT NULL COMMENT '业务自定ID',
+ `building_code` varchar(100) DEFAULT NULL COMMENT '用户自定义楼宇',
+ `alert_cancel_template_defs` varchar(999) DEFAULT '' COMMENT '告警解除模板定义',
+ `alert_cancel_message` varchar(999) DEFAULT '' COMMENT '告警解除模板初步填充后内容',
+ `alert_title` varchar(999) DEFAULT NULL,
+ `alert_cancel_title` varchar(999) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `idx_device_alert_config` (`device_config_id`,`flag`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='设备告警信息';
+
+/*Table structure for table `device_alert_template` */
+
+DROP TABLE IF EXISTS `device_alert_template`;
+
+CREATE TABLE `device_alert_template` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `platform_type` int DEFAULT '0' COMMENT '0-third,1-dashboard',
+ `tmpl_name` varchar(100) DEFAULT NULL,
+ `level` varchar(20) DEFAULT NULL COMMENT '告警级别',
+ `message` varchar(999) DEFAULT NULL COMMENT '告警信息',
+ `flag` int DEFAULT '0' COMMENT '0 开启,1关闭',
+ `template_defs` varchar(999) DEFAULT NULL COMMENT '模板定义',
+ `forward_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '转发类型api, mail, sms',
+ `alert_cancel_template_defs` varchar(999) DEFAULT '' COMMENT '告警解除模板定义',
+ `alert_cancel_message` varchar(999) DEFAULT '' COMMENT '告警解除模板初步填充后内容',
+ `alert_title` varchar(999) DEFAULT NULL,
+ `alert_cancel_title` varchar(999) DEFAULT NULL,
+ `alert_recipient_mail` varchar(1000) DEFAULT NULL COMMENT '邮件通知对象',
+ `alert_recipient_sms` varchar(1000) DEFAULT NULL COMMENT '短信通知对象',
+ `effective_period` varchar(200) DEFAULT NULL COMMENT '告警有效时间段',
+ `alert_recipient_slack_ids` varchar(500) DEFAULT NULL,
+ `alert_recipient_teams_ids` varchar(500) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='设备告警模板';
+
+/*Table structure for table `device_alert_template_bind` */
+
+DROP TABLE IF EXISTS `device_alert_template_bind`;
+
+CREATE TABLE `device_alert_template_bind` (
+ `device_info_id` int NOT NULL COMMENT 'device_info表里的id',
+ `device_alert_template_id` bigint NOT NULL,
+ KEY `idx_device_alert_template_bind` (`device_info_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `device_buildin_functions` */
+
+DROP TABLE IF EXISTS `device_buildin_functions`;
+
+CREATE TABLE `device_buildin_functions` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
+ `function_name` varchar(100) DEFAULT NULL COMMENT '函数名称',
+ `function_description` varchar(200) DEFAULT NULL COMMENT '函数作用描述',
+ `function_type` varchar(2) DEFAULT NULL COMMENT '函数类别',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='设备信息内置函数';
+
+/*Table structure for table `device_category` */
+
+DROP TABLE IF EXISTS `device_category`;
+
+CREATE TABLE `device_category` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `category_name_cn` varchar(255) DEFAULT NULL,
+ `category_name_jp` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类别名',
+ `category_name_en` varchar(255) DEFAULT NULL,
+ `flag` int DEFAULT NULL COMMENT '0-正常,1-删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `device_forward_config` */
+
+DROP TABLE IF EXISTS `device_forward_config`;
+
+CREATE TABLE `device_forward_config` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` bigint NOT NULL COMMENT '设备信息ID',
+ `target_forward_id` bigint DEFAULT NULL COMMENT '转发信息ID',
+ `created_by` bigint DEFAULT NULL,
+ `created_date` timestamp NULL DEFAULT NULL,
+ `updated_by` bigint DEFAULT NULL,
+ `updated_date` timestamp NULL DEFAULT NULL,
+ `data_type` int DEFAULT NULL COMMENT '数据转发类型 0:general forward, 1:alert forward',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='设备与转发地址关系表';
+
+/*Table structure for table `device_info` */
+
+DROP TABLE IF EXISTS `device_info`;
+
+CREATE TABLE `device_info` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(45) NOT NULL,
+ `device_sn` varchar(99) DEFAULT NULL COMMENT '用于记录SN,当SN与deviceId不同时使用',
+ `type_id` int DEFAULT NULL,
+ `wsclient_id` int DEFAULT NULL,
+ `space_id` bigint DEFAULT NULL COMMENT '空间ID',
+ `device_name` varchar(200) DEFAULT NULL COMMENT '设备名称',
+ `remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
+ `building_id` bigint DEFAULT NULL COMMENT '楼宇ID',
+ `asset_id` bigint DEFAULT NULL COMMENT '资产ID',
+ `flag` int DEFAULT '0' COMMENT '0:正常;1:删除',
+ `company_id` bigint DEFAULT NULL COMMENT '公司ID',
+ `created_by` bigint DEFAULT NULL,
+ `created_timestamp` timestamp NULL DEFAULT NULL,
+ `updated_by` bigint DEFAULT NULL,
+ `updated_timestamp` bigint DEFAULT NULL,
+ `project_id` bigint DEFAULT NULL COMMENT '项目ID',
+ `floor_id` bigint DEFAULT NULL COMMENT '楼宇ID',
+ `update_interval` int DEFAULT NULL COMMENT '处理间隔',
+ `monitoring_point_name` varchar(255) DEFAULT NULL COMMENT '监视点名称',
+ `monitoring_point_category_id` bigint DEFAULT NULL COMMENT '监视点类别ID',
+ `data_provider_id` bigint DEFAULT NULL COMMENT '数据提供方',
+ `gateway_info_id` bigint DEFAULT NULL COMMENT '网关情报',
+ `alarm_level` int DEFAULT NULL COMMENT 'dashboard警报的级别,1-正常,2-紧急,3-严重故障,4-中等故障,5-轻微故障',
+ `retain_alert` int DEFAULT '0' COMMENT 'dashboard自动恢复告警时是否保留告警:0-不保留,1-保留',
+ PRIMARY KEY (`id`),
+ KEY `idx_device_info` (`device_id`,`flag`,`type_id`),
+ KEY `idx_device_info_query` (`device_id`,`flag`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='需要解析的zeta设备';
+
+/*Table structure for table `device_rawdata_realtime` */
+
+DROP TABLE IF EXISTS `device_rawdata_realtime`;
+
+CREATE TABLE `device_rawdata_realtime` (
+ `device_id` varchar(100) NOT NULL,
+ `building_id` bigint DEFAULT NULL,
+ `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '和aurora rawdata表的status一致,另外加【手动处理:manually_process】',
+ `receive_ts` bigint DEFAULT NULL,
+ `alert_title` varchar(200) DEFAULT NULL,
+ `alert_content` text,
+ `alert_cancel_title` varchar(200) DEFAULT NULL,
+ `alert_cancel_content` text,
+ `raw_data` text,
+ `upload_year` int DEFAULT NULL,
+ `upload_month` int DEFAULT NULL,
+ `upload_day` int DEFAULT NULL,
+ PRIMARY KEY (`device_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `device_threshold_config` */
+
+DROP TABLE IF EXISTS `device_threshold_config`;
+
+CREATE TABLE `device_threshold_config` (
+ `id` int NOT NULL,
+ `device_config_id` bigint NOT NULL COMMENT '设备配置信息ID',
+ `threshold_name` varchar(200) DEFAULT NULL COMMENT '阈值名称',
+ `threshold_condition` varchar(200) DEFAULT NULL COMMENT '阈值触发条件',
+ `threshold_value` varchar(200) DEFAULT NULL COMMENT '阈值',
+ `created_by` varchar(20) DEFAULT NULL COMMENT '创建人',
+ `created_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updated_by` varchar(20) DEFAULT NULL COMMENT '更新人',
+ `updated_timestamp` timestamp NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='设备阈值';
+
+/*Table structure for table `device_trends_stats` */
+
+DROP TABLE IF EXISTS `device_trends_stats`;
+
+CREATE TABLE `device_trends_stats` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `reciever_device_id_delta` bigint DEFAULT NULL COMMENT '收到设备数据增量',
+ `sender_device_id_delta` bigint DEFAULT NULL,
+ `sender_dispatch_delta` bigint DEFAULT NULL COMMENT '转发数据量',
+ `sender_alert_delta` int DEFAULT NULL,
+ `sender_alert_cancel_delta` int DEFAULT NULL,
+ `created_time` timestamp NULL DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `device_trends_stats_time_index` (`created_time` DESC)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='设备统计信息';
+
+/*Table structure for table `favorited_device` */
+
+DROP TABLE IF EXISTS `favorited_device`;
+
+CREATE TABLE `favorited_device` (
+ `device_id` varchar(100) NOT NULL,
+ `create_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`device_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `flyway_schema_history` */
+
+DROP TABLE IF EXISTS `flyway_schema_history`;
+
+CREATE TABLE `flyway_schema_history` (
+ `installed_rank` int NOT NULL,
+ `version` varchar(50) DEFAULT NULL,
+ `description` varchar(200) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `script` varchar(1000) NOT NULL,
+ `checksum` int DEFAULT NULL,
+ `installed_by` varchar(100) NOT NULL,
+ `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `execution_time` int NOT NULL,
+ `success` tinyint(1) NOT NULL,
+ PRIMARY KEY (`installed_rank`),
+ KEY `flyway_schema_history_s_idx` (`success`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `gateway_client_status_history` */
+
+DROP TABLE IF EXISTS `gateway_client_status_history`;
+
+CREATE TABLE `gateway_client_status_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `client_id` varchar(100) DEFAULT NULL,
+ `status` int DEFAULT NULL COMMENT '0:离线\\\\n1:在线\\\\n',
+ `ts` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `gateway_clients` */
+
+DROP TABLE IF EXISTS `gateway_clients`;
+
+CREATE TABLE `gateway_clients` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `client_id` varchar(100) DEFAULT NULL,
+ `client_name` varchar(45) DEFAULT NULL,
+ `address` varchar(512) DEFAULT NULL COMMENT '安装地址',
+ `online_status` int DEFAULT '-1' COMMENT '在线状态\\n-1:未知,0:离线,1:在线',
+ `last_updata_ts` bigint DEFAULT NULL,
+ `create_ts` bigint DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '是否删除\n0:正常\n1:删除',
+ `company_id` bigint DEFAULT NULL,
+ `data_amount_threshold` int DEFAULT NULL COMMENT '数据量阈值',
+ `data_amount_threshold_alarm` int DEFAULT '0' COMMENT '数据量阈值告警,0=正常,1=告警',
+ `data_accumulated_totals` int DEFAULT NULL COMMENT '累计数据量',
+ `alert_switch` int DEFAULT '1' COMMENT '告警开关,1:开,0:关',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `gateway_clients_statistics` */
+
+DROP TABLE IF EXISTS `gateway_clients_statistics`;
+
+CREATE TABLE `gateway_clients_statistics` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `client_id` varchar(100) DEFAULT NULL,
+ `5_min_count` int DEFAULT NULL,
+ `ts` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `client_id` (`client_id`,`ts`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='数据量统计';
+
+/*Table structure for table `jg_ws_clients` */
+
+DROP TABLE IF EXISTS `jg_ws_clients`;
+
+CREATE TABLE `jg_ws_clients` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `client_id` varchar(100) NOT NULL,
+ `heartbeat` int DEFAULT NULL,
+ `reconnect_interval` int DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `login_history` */
+
+DROP TABLE IF EXISTS `login_history`;
+
+CREATE TABLE `login_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_id` bigint DEFAULT NULL,
+ `request_ip` varchar(255) DEFAULT NULL,
+ `login_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `mail_sent_result` */
+
+DROP TABLE IF EXISTS `mail_sent_result`;
+
+CREATE TABLE `mail_sent_result` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(255) DEFAULT NULL,
+ `log_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT 'roid1,roid2,mail',
+ `status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Failed-失败,Successed-成功',
+ `error_msg` text,
+ `log_time` bigint DEFAULT NULL,
+ `detail` text COMMENT '详情',
+ `building_name` varchar(255) DEFAULT NULL COMMENT '楼宇名',
+ `floor_name` varchar(255) DEFAULT NULL COMMENT '楼层名',
+ `device_name` varchar(255) DEFAULT NULL COMMENT '设备名称',
+ `device_sn` varchar(255) DEFAULT NULL COMMENT 'sn',
+ `alert_type` int DEFAULT NULL COMMENT '1-告警,2-恢复告警,3-无效告警',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `metcom_ble_space_info` */
+
+DROP TABLE IF EXISTS `metcom_ble_space_info`;
+
+CREATE TABLE `metcom_ble_space_info` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `space_id` varchar(45) DEFAULT NULL,
+ `ble_id` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `metcom_locate_record` */
+
+DROP TABLE IF EXISTS `metcom_locate_record`;
+
+CREATE TABLE `metcom_locate_record` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `uuid` varchar(45) DEFAULT NULL,
+ `space_id` varchar(45) DEFAULT NULL,
+ `ble_id` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `uuid_UNIQUE` (`uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `monitor_receiver_info` */
+
+DROP TABLE IF EXISTS `monitor_receiver_info`;
+
+CREATE TABLE `monitor_receiver_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `status` varchar(4) NOT NULL COMMENT '状态',
+ `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳(支持时间查询)',
+ `date_format` varchar(20) NOT NULL COMMENT '提供给前端,用于显示时间',
+ `start_up_date` timestamp NULL DEFAULT NULL COMMENT '服务启动时间戳',
+ `response_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `monitor_receiver_info_date_index` (`created_date` DESC) COMMENT '启动时间戳(倒序)'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='监控monitor的服务';
+
+/*Table structure for table `monitor_sender_info` */
+
+DROP TABLE IF EXISTS `monitor_sender_info`;
+
+CREATE TABLE `monitor_sender_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `status` varchar(4) NOT NULL COMMENT '状态',
+ `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳(支持时间查询)',
+ `date_format` varchar(20) NOT NULL COMMENT '提供给前端,用于显示时间',
+ `start_up_date` timestamp NULL DEFAULT NULL COMMENT '服务启动时间戳',
+ `response_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `monitor_sender_info_date_index` (`created_date` DESC) COMMENT '启动时间戳(倒序)'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='监控monitor的服务';
+
+
+/*Table structure for table `monitoring_point_category` */
+
+DROP TABLE IF EXISTS `monitoring_point_category`;
+
+CREATE TABLE `monitoring_point_category` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `name` varchar(500) NOT NULL,
+ `thumbnail_normal_base64` text COMMENT '普通图片转base64格式',
+ `thumbnail_alarm_base64` text COMMENT '告警图片转base64格式',
+ `thumbnail_dis_base64` text COMMENT '灰色图片转base64格式',
+ `remark` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `created_by` bigint DEFAULT NULL,
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='监视点分类';
+
+/*Table structure for table `monitoring_point_category_group` */
+
+DROP TABLE IF EXISTS `monitoring_point_category_group`;
+
+CREATE TABLE `monitoring_point_category_group` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `building_id` bigint DEFAULT NULL COMMENT '所属楼宇ID',
+ `name` varchar(500) NOT NULL,
+ `remark` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `created_by` bigint DEFAULT NULL,
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='监视点分类分组表';
+
+/*Table structure for table `monitoring_point_category_group_relation` */
+
+DROP TABLE IF EXISTS `monitoring_point_category_group_relation`;
+
+CREATE TABLE `monitoring_point_category_group_relation` (
+ `monitoring_point_category_id` bigint NOT NULL COMMENT 'monitoring_point_category表里的id',
+ `monitoring_point_category_group_id` bigint NOT NULL COMMENT 'monitoring_point_category_group表里的id'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='监视点分类与分组关系表';
+
+
+
+/*Table structure for table `mqtt_config` */
+
+DROP TABLE IF EXISTS `mqtt_config`;
+
+CREATE TABLE `mqtt_config` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `mqtt_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名称',
+ `mqtt_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '格式为ip:port',
+ `mqtt_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'mqtt用户名',
+ `mqtt_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'mqtt密码',
+ `mqtt_client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ `mqtt_topic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `is_enabled` int DEFAULT '0' COMMENT '0-启动,1-关闭',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `apikey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `purpose_type` int DEFAULT '1' COMMENT '1-告警转发,2-全部转发',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
+
+/*Table structure for table `mqtt_device_relation` */
+
+DROP TABLE IF EXISTS `mqtt_device_relation`;
+
+CREATE TABLE `mqtt_device_relation` (
+ `device_id` bigint NOT NULL COMMENT '设备信息ID',
+ `mqtt_id` bigint DEFAULT NULL COMMENT 'MQTT的ID'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `mqtt_history` */
+
+DROP TABLE IF EXISTS `mqtt_history`;
+
+CREATE TABLE `mqtt_history` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `content` text,
+ `ts` varchar(14) DEFAULT NULL,
+ `company` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `mqtt_history_2022_11_before` */
+
+DROP TABLE IF EXISTS `mqtt_history_2022_11_before`;
+
+CREATE TABLE `mqtt_history_2022_11_before` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `content` text,
+ `ts` varchar(14) DEFAULT NULL,
+ `company` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `mqtt_publisher` */
+
+DROP TABLE IF EXISTS `mqtt_publisher`;
+
+CREATE TABLE `mqtt_publisher` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `host` varchar(999) NOT NULL,
+ `username` varchar(45) NOT NULL,
+ `password` varchar(45) NOT NULL,
+ `topic` varchar(45) NOT NULL,
+ `description` varchar(999) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `nittan_code_match` */
+
+DROP TABLE IF EXISTS `nittan_code_match`;
+
+CREATE TABLE `nittan_code_match` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `device_class` varchar(45) DEFAULT NULL,
+ `notice_type` varchar(45) DEFAULT NULL,
+ `notice_level` int DEFAULT NULL,
+ `notice_status` varchar(45) DEFAULT NULL,
+ `facility_mode` varchar(45) DEFAULT NULL,
+ `dbm_code` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `notification_slack` */
+
+DROP TABLE IF EXISTS `notification_slack`;
+
+CREATE TABLE `notification_slack` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `identity` varchar(100) NOT NULL,
+ `webhook` varchar(1000) NOT NULL,
+ `remark` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `created_by` bigint DEFAULT NULL,
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `notification_teams` */
+
+DROP TABLE IF EXISTS `notification_teams`;
+
+CREATE TABLE `notification_teams` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `identity` varchar(100) NOT NULL,
+ `webhook` varchar(1000) NOT NULL,
+ `remark` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `created_by` bigint DEFAULT NULL,
+ `created_at` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `ocr_history` */
+
+DROP TABLE IF EXISTS `ocr_history`;
+
+CREATE TABLE `ocr_history` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `device_sn` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ `value` double DEFAULT NULL,
+ `ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `restful_history` */
+
+DROP TABLE IF EXISTS `restful_history`;
+
+CREATE TABLE `restful_history` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `content` varchar(9999) DEFAULT NULL,
+ `company` varchar(45) DEFAULT NULL,
+ `ts` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `rili_personnas_history` */
+
+DROP TABLE IF EXISTS `rili_personnas_history`;
+
+CREATE TABLE `rili_personnas_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `personnas_space_id` varchar(100) NOT NULL,
+ `name` varchar(100) DEFAULT NULL,
+ `record_ts` varchar(45) DEFAULT NULL,
+ `value` int DEFAULT NULL,
+ `check_ts` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `rili_personnas_latest` */
+
+DROP TABLE IF EXISTS `rili_personnas_latest`;
+
+CREATE TABLE `rili_personnas_latest` (
+ `personnas_space_id` varchar(100) NOT NULL,
+ `name` varchar(100) DEFAULT NULL,
+ `latest_ts` bigint DEFAULT NULL,
+ `latest_value` int DEFAULT NULL,
+ PRIMARY KEY (`personnas_space_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `s3_file_mapping` */
+
+DROP TABLE IF EXISTS `s3_file_mapping`;
+
+CREATE TABLE `s3_file_mapping` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `file_key` varchar(255) DEFAULT NULL,
+ `s3_path` varchar(255) DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `sky_env_history` */
+
+DROP TABLE IF EXISTS `sky_env_history`;
+
+CREATE TABLE `sky_env_history` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `device_id` varchar(45) DEFAULT NULL,
+ `rain_fall` double DEFAULT NULL,
+ `ts` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `sys_env` */
+
+DROP TABLE IF EXISTS `sys_env`;
+
+CREATE TABLE `sys_env` (
+ `env_key` varchar(45) NOT NULL DEFAULT 'default',
+ `env_value` varchar(1024) DEFAULT NULL,
+ `company_id` bigint DEFAULT NULL,
+ UNIQUE KEY `uk_env_key_company` (`env_key`,`company_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='存储系统通用的环境参数和值';
+
+/*Table structure for table `target_forward_config` */
+
+DROP TABLE IF EXISTS `target_forward_config`;
+
+CREATE TABLE `target_forward_config` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+ `target_forward_code` varchar(100) DEFAULT NULL COMMENT '转发识别代码',
+ `target_forward_type` int DEFAULT NULL COMMENT '转发方式 0:MQTT, 1:RESTFUL',
+ `target_forward_params` varchar(300) DEFAULT NULL COMMENT '转发参数,JSON形式存储',
+ `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `created_by` bigint DEFAULT NULL COMMENT '创建人',
+ `updated_by` bigint DEFAULT NULL COMMENT '修改人',
+ `updated_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
+ `company_id` bigint NOT NULL COMMENT '公司ID',
+ `flag` int DEFAULT '0' COMMENT '状态 0:正常,1:删除',
+ `name` varchar(100) DEFAULT NULL COMMENT '转发目标名称',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='转发表';
+
+/*Table structure for table `target_id_check` */
+
+DROP TABLE IF EXISTS `target_id_check`;
+
+CREATE TABLE `target_id_check` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `target_id` varchar(255) DEFAULT NULL,
+ `alert_config_id` bigint NOT NULL,
+ `target_id_value` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `target_id_check_index` (`target_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='校验targetId唯一性';
+
+/*Table structure for table `trends_stats_total` */
+
+DROP TABLE IF EXISTS `trends_stats_total`;
+
+CREATE TABLE `trends_stats_total` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增',
+ `receiver_device_id` bigint DEFAULT NULL,
+ `sender_device_id` bigint DEFAULT NULL,
+ `sender_building` bigint DEFAULT NULL,
+ `dispatch` bigint DEFAULT NULL,
+ `alert` bigint DEFAULT NULL,
+ `alert_cancel` bigint DEFAULT NULL,
+ `created_date` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `trends_stats_total_date_index` (`created_date` DESC)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='统计信息总量';
+
+/*Table structure for table `type` */
+
+DROP TABLE IF EXISTS `type`;
+
+CREATE TABLE `type` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `name` varchar(45) DEFAULT NULL COMMENT '设备ID',
+ `description` varchar(999) DEFAULT NULL COMMENT '备注',
+ `device_type` varchar(200) DEFAULT NULL COMMENT '设备类别',
+ `device_data_src` varchar(200) DEFAULT NULL COMMENT '设备数据来源',
+ `origin_json_format` varchar(10000) DEFAULT NULL COMMENT '原始数据来源',
+ `expression_map` varchar(500) DEFAULT NULL COMMENT '表达式映射',
+ `expression_variable_map` varchar(500) DEFAULT NULL COMMENT '表达式变量map',
+ `target_json_format` varchar(2000) DEFAULT NULL COMMENT '转发数据格式',
+ `target_forward_id` bigint DEFAULT NULL COMMENT '转发目标ID',
+ `target_foward_code` varchar(100) DEFAULT NULL COMMENT '转发识别代码',
+ `created_by` bigint DEFAULT NULL COMMENT '创建人',
+ `created_timestamp` timestamp NULL DEFAULT NULL COMMENT '创建时间',
+ `updated_by` bigint DEFAULT NULL,
+ `updated_timestamp` timestamp NULL DEFAULT NULL COMMENT '创建时间',
+ `company_id` bigint DEFAULT NULL,
+ `space_id` bigint DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0:正常;1:删除',
+ `dbm_id` varchar(5000) DEFAULT NULL COMMENT 'dbmId,{"[deviceId][dbm_id]":value}',
+ `name_zh` varchar(45) DEFAULT NULL COMMENT 'name中文',
+ `name_en` varchar(45) DEFAULT NULL COMMENT 'name eng',
+ `device_category_id` bigint DEFAULT NULL COMMENT '设备大类ID',
+ `unit` varchar(255) DEFAULT NULL COMMENT '单位信息',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='设备类别及备注,帮助识别设备类型和解析方式';
+
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (1,'4-20 カスタム版',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_ultrasonic_flow_420','4-20 カスタム版','4-20 カスタム版',1,'L/min,A,Map,℃,pa');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (2,'ZETA-水位センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_water_level','ZiFiSense水位センサー','ZiFiSense水位センサー',1,'A');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (3,'ZETA-ドライ接点センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_dry_contact','ZiFiSenseドライ接点センサー','ZiFiSenseドライ接点センサー',1,'運転/停止');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (4,'ZETA-BLEGW-0903',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_bth_gateway','ZETA-BLEGW-0903','ZETA-BLEGW-0903',1,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (5,'ZETA-ドライ接点センサーマルチチャンネル',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'','ZiFiSenseドライ接点センサーマルチチャンネル','ZiFiSenseドライ接点センサーマルチチャンネル',1,'運転/停止');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (6,'ZiFiSense標準485センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'ZiFiSense標準485センサー','ZiFiSense標準485センサー',1,'V,W,状態,A,kWh');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (7,'4-20水圧センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_ultrasonic_flow_420','4-20水圧センサー','4-20水圧センサー',1,'mpa');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (8,'Watcher Pro3',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'Watcher Pro3','Watcher Pro3',1,'℃,誘電率,pH,dS/m,%,μmol/m2•s,℃,%RH,lux');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (9,'BlueTooth GateWay',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'BlueTooth GateWay','BlueTooth GateWay',1,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (10,'SZT200傾斜センサー(高分解能品) ',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_tilt_x,[deviceId]_tilt_y,[deviceId]_tilt_z','SZT200傾斜センサー(高分解能品) ','SZT200傾斜センサー(高分解能品) ',1,'度');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (11,'CO2センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_co2','CO2センサー','CO2センサー',1,'ppm,℃,%');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (12,'NBI WatcherMini2',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'NBI WatcherMini2','NBI WatcherMini2',1,'℃,%,lux');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (13,'ZETA-ドアセンサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_gate_magnetism','ドアセンサー','ドアセンサー',1,'開/閉');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (14,'人感センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_human','人感センサー','人感センサー',1,'在/不在');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (15,'JAZE 超音波距離センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_ultrasonic_distance','JAZE 超音波距離センサー','JAZE 超音波距離センサー',1,'cm');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (16,'照度センサー2.X',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_illumination','照度センサー2.X','照度センサー2.X',1,'lux');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (17,'ZETA-温湿度センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_temperature,[deviceId]_humidity','ZETA温湿度センサー','ZETA温湿度センサー',1,'℃,%RH');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (18,'ZETA 温度センサー(接点タイプ)',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_TZZTZT92','ZETA 温度センサー(接点タイプ)','ZETA 温度センサー(接点タイプ)',1,'℃');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (19,'ZETA-電流センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_current','ZETA電流センサー','ZETA電流センサー',1,'A');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (20,'skytechマルチ環境センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_wind_direction,[deviceId]_wind_speed,[deviceId]_Instantaneous_wind_speed,_[deviceId]tempe','skytechマルチ環境センサー','skytechマルチ環境センサー',1,'0°- 359°,m/s,℃,%,lux,mm,μW/㎠,%RH');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (21,'ZETA-漏水センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_leakage','漏水センサー','漏水センサー',1,'正常/漏水');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (22,'ZETA-漏水センサー(ケーブルタイプ)',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_leakage','ZETA 漏水センサー(ケーブルタイプ)','ZETA 漏水センサー(ケーブルタイプ)',1,'正常/漏水');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (23,'ニッタン',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'ニッタン','ニッタン',1,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (24,'4-20 電流測定用 範囲:0-5A',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_current_420','4-20 電流測定用 範囲:0-5A','4-20 電流測定用 範囲:0-5A',1,'A');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (25,'420 テスト用',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_test_420','420 テスト用','420 テスト用',1,'A');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (26,'485テスト用',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_485','485テスト用','485テスト用',1,'状態');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (27,'Oviphone',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'Oviphone','Oviphone',1,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (28,'ZETA-4~20mA(圧力2.5Mpa)',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_pressure_M025_420','420圧力2.5Mpa','420圧力2.5Mpa',1,'Mpa');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (29,'ZETA-4~20mA(圧力1Mpa)',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_pressure_M010_420','420压力1Mpa','420压力1Mpa',1,'Mpa');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (30,'ZETA-電流センサー-東京建物','“detectorid\":\"ID\",”ID-currentValue:VALUE“',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]-currentValue','ZETA電流センサー-東京建物','ZETA電流センサー-東京建物',1,'A');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (31,'ZETA-4~20mA(圧力1Mpa)-取得値','“detectorid\":\"ID\",”ID-current“, 31与32类别相同,一同解析',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'420圧力1Mpa-取得値-東京建物','420圧力1Mpa-取得値-東京建物',1,'mA');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (32,'ZETA-4~20mA(圧力1Mpa)-圧力値','“detectorid\":\"ID\",”ID-keyence“',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]-current','420圧力1Mpa-圧力値-東京建物','420圧力1Mpa-圧力値-東京建物',1,'Mpa');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (33,'ZETA-漏水センサー-東京建物(旧)','“detectorid\":\"ID\",”ID-waterIntrusionStatus“',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]-waterIntrusionStatus','漏水センサー-東京建物','漏水センサー-東京建物',1,'正常/漏水');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (34,'ZETA-ドアセンサー-東京建物','“detectorid\":\"ID\",”ID-doorStatus“,34与35类别相同,一同解析',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'','ドアセンサー-ドアの開閉状態-東京建物','ドアセンサー-ドアの開閉状態-東京建物',1,'開/閉');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (35,'ドアセンサー-開閉回数-東京建物','“detectorid\":\"ID\",”ID-openTimes“',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]-doorStatus','ドアセンサー-開閉回数-東京建物','ドアセンサー-開閉回数-東京建物',1,'回');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (36,'ZETA-人感センサー','“detectorid\":\"ID\",”ID-checkResult“',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]-checkResult','人感センサー-東京建物','人感センサー-東京建物',1,'在/不在');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (40,'OCR','ASIOT-OCR Camera',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'OCR','OCR',1,'数値');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (41,'ZETA-温湿度センサー-東京建物','“detectorid\":\"ID\",”ID-temperature““ID-humidity”',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]-temperature,[deviceId]-humidity','ZETA温湿度センサー-東京建物','ZETA温湿度センサー-東京建物',1,'℃,%RH');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (42,'JAZE CO2+温湿度','JZCD91A1',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_co2,[deviceId]_temperature,[deviceId]_humidity','JAZE CO2+温湿度','JAZE CO2+温湿度',1,'ppm,℃,%');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (43,'OCR_差分値','本次数据减去上次数据,得出的差值转发给DBM',NULL,'zeta-data-src-code-1',NULL,'','','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'OCR_差分値','OCR_差分値',1,'数値');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (44,'BA中央管理システムーテスト環境','中央監視系統TEST Dummy Data',NULL,'zeta-data-src-code-1',NULL,'','','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'BA中央管理システムーテスト環境','BA中央管理システムーテスト環境',1,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (45,'Test Device','ForTest',NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',11,'2738911',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'Test Device','Test Device',1,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (46,'Delta 故障','','DELTA03','mc-01','[{\"id\":\"BA0029\",\"type\":\"Boolean\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":false}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"$.id\":{\"$.id\":\"\"},\"getDeltaDataString($.this)\":{\"$.this\":\"getDeltaDataString\"}}','{\"deviceId\":\"$.id\"}',1,'1111111',NULL,NULL,1,'2024-09-12 16:11:30',2,NULL,0,'[deviceSn]_delta_failure','Delta 故障','Delta 故障',2,'ON-1/OFF-0');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (47,'Delta 計測','',NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_measurement','Delta 計測','Delta 計測',3,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (48,'Delta 積算',NULL,NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_accrual','Delta 積算','Delta 積算',4,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (49,'BLE漏水センサー','BLEゲートウェイ链接的无电漏水传感器',NULL,NULL,NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'BLE漏水センサー','BLE漏水センサー',1,'正常/漏水');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (50,'BLEbeacon','BLEゲートウェイ链接的人员定位',NULL,NULL,NULL,NULL,NULL,NULL,14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'BLEbeacon','BLEbeacon',1,'入室/退室');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (51,'485 transceiver电流传感器','电流传感器',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_Voltage_485,[deviceId]_Current_485,[deviceId]_Instantaneous_485','485 transceiver电流传感器','485 transceiver电流传感器',1,'A,V,kWh');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (52,'Delta 積算 * 0.1','Delta 積算 * 0.1',NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_accrual','Delta 積算 * 0.1','Delta 積算 * 0.1',4,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (53,'Metcom beacon',NULL,NULL,NULL,NULL,NULL,NULL,NULL,14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'Metcom beacon','Metcom beacon',1,'入室/退室');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (54,'4-20mAトランシーバー+温度トランスミッター','4-20mAトランシーバー+温度トランスミッター',NULL,NULL,NULL,NULL,NULL,NULL,14,'2738969',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'4-20mAトランシーバー+温度トランスミッター','4-20mAトランシーバー+温度トランスミッター',1,'℃');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (55,'ZETA水圧センサー',NULL,NULL,NULL,NULL,NULL,NULL,NULL,14,'2738969',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'ZETA水圧センサー','ZETA水圧センサー',1,'Mpa');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (56,'OCRカメラ「FALCON501」',NULL,NULL,NULL,NULL,NULL,NULL,NULL,14,'2738969',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'OCRカメラ「FALCON501」','OCRカメラ「FALCON501」',1,'数値');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (57,'MEBS-警報',NULL,NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,NULL,NULL,0,'[deviceSn]_delta_failure','MEBS-警報','MEBS-警報',2,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (58,'MEBS-計測',NULL,NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,NULL,NULL,0,'[deviceSn]_delta_measurement','MEBS-計測','MEBS-計測',3,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (59,'MEBS-計量',NULL,NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,NULL,NULL,0,'[deviceSn]_delta_accrual','MEBS-計量','MEBS-計量',4,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (60,'JAZE-温湿度センサー',NULL,NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_jzth_temperature,[deviceId]_jzth_humidity','JAZE温湿度センサー','JAZE温湿度センサー',1,'℃,%');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (61,'D485ZT92+M5X-UNIT',NULL,NULL,NULL,NULL,NULL,NULL,NULL,14,'2738969',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'D485ZT92+M5X-UNIT','D485ZT92+M5X-UNIT',1,'A,V,kWh');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (62,'XX-UAT',NULL,'XX-UAT','XX-UAT','{\"a\":\"1\",\"b\":\"2\"}','{\"$.x\":\"$.a+$.b\"}','{\"$.a+$.b\":{\"$.a\":\"1\",\"$.b\":\"1\"}}','{x:x}',14,'2738969',1,NULL,1,NULL,2,NULL,0,NULL,'XX-UAT','XX-UAT',1,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (63,'3867',NULL,'3867','3867','{\"msgDirect\":\"report\",\"msgPriority\":\"normal\",\"msgType\":\"real\",\"msgId\":0,\"apTime\":1681139922,\"msgEncrypt\":\"none\",\"msgUid\":\"ffff0317\",\"msgCmd\":\"ms\",\"apUid\":\"4F00C8E2\",\"msgParam\":{\"subCmd\":\"report\",\"subType\":\"uploadData\",\"msUid\":\"4F00C8E2\",\"data\":\"01\",\"dataEncrypt\":\"devEncrypt\"},\"deviceAlias\":\"踊り場6番目\",\"deviceaddr\":\"B1階_FE00750A指定\"}','{\"$.deviceId\":\"$.apUid\"}','{\"$.apUid\":{\"$.apUid\":\"4F00C8E2\"}}','{deviceId:apiUid,data:\"01\"}',14,'2738969',1,NULL,1,NULL,2,NULL,0,NULL,'3867','3867',NULL,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (64,'zetaxx-uat001',NULL,'zetaxx-uat001','zetaxx-uat001','{\"msgDirect\":\"report\",\"msgPriority\":\"normal\",\"msgType\":\"real\",\"msgId\":0,\"apTime\":1681139922,\"msgEncrypt\":\"none\",\"msgUid\":\"ffff0317\",\"msgCmd\":\"ms\",\"apUid\":\"4F00C8E2\",\"msgParam\":{\"subCmd\":\"report\",\"subType\":\"uploadData\",\"msUid\":\"4F00C8E2\",\"data\":\"01\",\"dataEncrypt\":\"devEncrypt\"},\"deviceAlias\":\"踊り場6番目\",\"deviceaddr\":\"B1階_FE00750A指定\"}','{\"$.deviceId\":\"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.apUid\":{\"$.apUid\":\"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid,data:\"01\"}',14,'2738969',1,NULL,1,NULL,2,NULL,0,NULL,'zetaxx-uat001','zetaxx-uat001',1,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (65,'nittan','nittan common','nittan','nittan-special','{\"facility_info\": {\"facility_maker\": \"NITTAN\", \"facility_id\": \"Nihonbashi-Building\", \"facility_mode\": \"Normal\"}, \"auth\": {\"code\": \"10001\", \"signature\": \"RvZYNReMpQBP13qTMfGVOLHYjY8=\", \"timestamp\": 1681744941, \"subscription_id\": \"N22SHY3n\", \"version\": \"0.2\"}, \"cmd\": \"notice\", \"notice_info\": [{\"device_info\": {\"device_name\": \"u696du52d9u7528u30acu30b9u906eu65adu5f01\", \"device_class\": \"Heat Detector\"}, \"notice_level\": 1, \"location_info\": {\"location_address\": \"01_B1_02_0002_76\"}, \"notice_status\": \"FireAlarm\", \"notice_type\": \"Fire\"}]}','{\"$.deviceId\":\"$.notice_info[0].location_info.location_address\",\"$.this\":\"getNittanDataString($.this)\"}','{\"getNittanDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',1,'111111',1,NULL,1,NULL,2,NULL,0,NULL,'nittan','nittan',6,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (66,'nittan-no-forward','nittan common','nittan','nittan-special','{\"facility_info\": {\"facility_maker\": \"NITTAN\", \"facility_id\": \"Nihonbashi-Building\", \"facility_mode\": \"Normal\"}, \"auth\": {\"code\": \"10001\", \"signature\": \"RvZYNReMpQBP13qTMfGVOLHYjY8=\", \"timestamp\": 1681744941, \"subscription_id\": \"N22SHY3n\", \"version\": \"0.2\"}, \"cmd\": \"notice\", \"notice_info\": [{\"device_info\": {\"device_name\": \"u696du52d9u7528u30acu30b9u906eu65adu5f01\", \"device_class\": \"Heat Detector\"}, \"notice_level\": 1, \"location_info\": {\"location_address\": \"01_B1_02_0002_76\"}, \"notice_status\": \"FireAlarm\", \"notice_type\": \"Fire\"}]}','{\"$.deviceId\":\"$.notice_info[0].location_info.location_address\",\"$.this\":\"getNittanDataString($.this)\"}','{\"getNittanDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',1,'111111',1,NULL,1,NULL,2,NULL,0,NULL,'nittan-no-forward','nittan-no-forward',6,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (67,'Delta 故障-no-forward','',NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',0,'',NULL,NULL,NULL,NULL,2,NULL,0,NULL,'Delta 故障-no-forward','Delta 故障-no-forward',4,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (77,'testType-01','For test',NULL,'test01','{\"deviceId\":\"testId\",\"value\":100}','{\"$.deviceId\":\"$.deviceId\",\"$.value\":\"$.value\"}','{\"$.deviceId\":\"$.deviceId\",\"$.value\":\"$.value\"}','{\"deviceId\":\"$.deviceId\",\"value\":\"$.value\"}',1,'111111',2,NULL,2,NULL,2,NULL,0,NULL,'testType-01','testType-01',NULL,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (78,'TEST',NULL,'TEST','nittan-special','{\"ab\":\"qw\"}','{\"$.deviceId\":\"$.ab\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"$.ab\":{\"$.ab\":\"\"},\"getDeltaDataString($.this)\":{\"$.this\":\"getDeltaDataString\"}}','{\"deviceId\":\"$.ab\"}',1,NULL,1,'2023-12-07 11:33:03',1,'2023-12-07 11:33:07',2,NULL,1,NULL,'TEST','TEST',NULL,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (79,'IOSERVER',NULL,'ioserver_common','IOServer-001','{\"PNs\":{\"1\":\"V\",\"2\":\"T\",\"3\":\"Q\"},\"PVs\":{\"1\":26.0,\"2\":\"2023-12-07 16:24:37.967\",\"3\":192},\"Objs\":[{\"N\":\"Tag3101074\"}]}','{\"$.deviceId\":\"$.Objs[0].N\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"getKingIODataString\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,NULL,1,'2023-12-07 11:33:03',1,'2023-12-07 11:33:07',2,NULL,0,'','IOSERVER','IOSERVER',NULL,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (80,'daikin-ios-on/off',NULL,'daikin-ios-on/off','IOServer-001','{\"PNs\":{\"1\":\"V\",\"2\":\"T\",\"3\":\"Q\"},\"PVs\":{\"1\":26.0,\"2\":\"2023-12-07 16:24:37.967\",\"3\":192},\"Objs\":[{\"N\":\"Tag3101074\"}]}','{\"$.deviceId\":\"$.Objs[0].N\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"getKingIODataString\"}}','{\"deviceId\":\"$.Objs[0].N\"}',NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'onoffmonitor_ios_[deviceId]','daikin-ios-on/off','daikin-ios-on/off',5,'on/off');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (81,'daikin-ios-故障コード',NULL,'daikin-ios-故障コード','IOServer-001','{\"PNs\":{\"1\":\"V\",\"2\":\"T\",\"3\":\"Q\"},\"PVs\":{\"1\":26.0,\"2\":\"2023-12-07 16:24:37.967\",\"3\":192},\"Objs\":[{\"N\":\"Tag3101074\"}]}','{\"$.deviceId\":\"$.Objs[0].N\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"getKingIODataString\"}}','{\"deviceId\":\"$.Objs[0].N\"}',NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'ConditionerFailurecode_ios_[deviceId]','daikin-ios-故障コード','daikin-ios-故障コード',5,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (82,'daikin-ios-室内ファン',NULL,'daikin-ios-室内ファン','IOServer-001','{\"PNs\":{\"1\":\"V\",\"2\":\"T\",\"3\":\"Q\"},\"PVs\":{\"1\":26.0,\"2\":\"2023-12-07 16:24:37.967\",\"3\":192},\"Objs\":[{\"N\":\"Tag3101074\"}]}','{\"$.deviceId\":\"$.Objs[0].N\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"getKingIODataString\"}}','{\"deviceId\":\"$.Objs[0].N\"}',NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'fanoperationmonit_ios_[deviceId]','daikin-ios-室内ファン','daikin-ios-室内ファン',5,'停止/運転');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (83,'daikin-ios-風量モニタ',NULL,'daikin-ios-風量モニタ','IOServer-001','{\"PNs\":{\"1\":\"V\",\"2\":\"T\",\"3\":\"Q\"},\"PVs\":{\"1\":26.0,\"2\":\"2023-12-07 16:24:37.967\",\"3\":192},\"Objs\":[{\"N\":\"Tag3101074\"}]}','{\"$.deviceId\":\"$.Objs[0].N\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"getKingIODataString\"}}','{\"deviceId\":\"$.Objs[0].N\"}',NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'Airflowmonitor_ios_[deviceId]','daikin-ios-風量モニタ','daikin-ios-風量モニタ',5,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (84,'daikin-ios-風量指令',NULL,'daikin-ios-風量指令','IOServer-001','{\"PNs\":{\"1\":\"V\",\"2\":\"T\",\"3\":\"Q\"},\"PVs\":{\"1\":26.0,\"2\":\"2023-12-07 16:24:37.967\",\"3\":192},\"Objs\":[{\"N\":\"Tag3101074\"}]}','{\"$.deviceId\":\"$.Objs[0].N\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"getKingIODataString\"}}','{\"deviceId\":\"$.Objs[0].N\"}',NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'Airflowcomd_ios_[deviceId]','daikin-ios-風量指令','daikin-ios-風量指令',5,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (85,'JAZE-漏水センサー','“detectorid\":\"ID\",”ID_jzth_leakage“',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_jzth_leakage','JAZE漏水センサー','JAZE漏水センサー',1,'正常/漏水');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (86,'ba-発停状態',NULL,NULL,'delta','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getDeltaDataString($.this)\"}','{\"getDeltaDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',1,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_status','BA状态','BA Status',7,NULL);
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (87,'测试',NULL,'测试0011','cus02','{\"name\":null}','{\"$.deviceId\":\"$.name\",\"$.this\":\"getOCRDataString($.this)\"}','{\"$.name\":{\"$.name\":\"\"},\"getOCRDataString($.this)\":{\"$.this\":\"getOCRDataString\"}}','{\"deviceId\":\"$.name\"}',1,NULL,1,'2024-07-02 21:51:13',1,'2024-07-02 21:51:44',2,NULL,1,'测试','测试',NULL,4,'测试');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (88,'测试',NULL,'10000test','cus02','{\"name\":null}','{\"$.deviceId\":\"$.name\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.name\":{\"$.name\":\"\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{\"deviceId\":\"$.name\"}',1,NULL,1,'2024-07-02 22:50:24',1,'2024-07-02 22:50:24',2,NULL,0,'','测试',NULL,2,'测试');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (89,'custom-01',NULL,'custom-01','mc-01','{\"id\":\"C-TEST-01\",\"type\":\"Analog\",\"reportedAt\":\"1717428882.4614446\",\"value\":333}','{\"$.deviceId\":\"$.id\",\"$.value\":\"getBooleanIntValue($.value)\"}','{\"$.id\":{\"$.id\":\"\"},\"getBooleanIntValue($.value)\":{\"getBooleanIntValue($.value)\":\"getBooleanIntValue($.value)\"}}','{\"deviceId\":\"$.id\",\"value\":\"getBooleanIntValue($.value)\"}',1,NULL,1,'2024-07-30 22:53:49',1,'2024-07-30 23:03:03',2,NULL,0,'',NULL,NULL,1,'%');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (90,'TEST6451CC',NULL,'TEST6451CC','nittan-special','{\"acCC\":\"bcCC\"}','{\"$.field\":\"$.ac\"}','{\"$.ac\":{\"$.ac\":\"\"}}','{\"field\":\"$.ac\"}',1,NULL,1,'2024-11-01 19:31:38',1,'2024-11-01 19:32:30',2,NULL,1,'66','TEST6451CC',NULL,2,'$');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (91,'振動センサー_updata',NULL,'ZAIoT-VTD01','kafka-001','{\"payload\": {\"data\": {\"upTime\": 1695176626061,\"apTime\": 1695176625000,\"parsedData\": \"{\\\"accelerationRms\\\":{\\\"name\\\":\\\"加速度RMS\\\",\\\"nameEn\\\":\\\"Acceleration RMS\\\",\\\"nameJp\\\":\\\"加速度RMS\\\",\\\"rawValue\\\":0.13,\\\"unit\\\":\\\"m/s²\\\",\\\"value\\\":0.13},\\\"dataStatus\\\":\\\"normal\\\",\\\"displPeakValue\\\":{\\\"name\\\":\\\"位移峰峰值\\\",\\\"nameEn\\\":\\\"Displacement peak to peak\\\",\\\"nameJp\\\":\\\"変位ピーク・ツー・ピーク\\\",\\\"rawValue\\\":3.5,\\\"unit\\\":\\\"μm\\\",\\\"value\\\":3.5},\\\"envelopeHarmonicsFactor\\\":{\\\"name\\\":\\\"包络谐频因子\\\",\\\"nameEn\\\":\\\"Envelope harmonics factor\\\",\\\"nameJp\\\":\\\"エンベロープ高調波係数\\\",\\\"rawValue\\\":0.04,\\\"unit\\\":\\\"m/s²\\\",\\\"value\\\":0.04},\\\"envelopeHarmonicsFreq\\\":{\\\"name\\\":\\\"包络谐频主频\\\",\\\"nameEn\\\":\\\"Envelope harmonics frequency\\\",\\\"nameJp\\\":\\\"エンベロープの高調マスター周波数\\\",\\\"rawValue\\\":419.5,\\\"unit\\\":\\\"Hz\\\",\\\"value\\\":419.5},\\\"envelopeRotationFactor\\\":{\\\"name\\\":\\\"包络转频因子\\\",\\\"nameEn\\\":\\\"Envelope rotation factor\\\",\\\"nameJp\\\":\\\"エンベロープ回転係数\\\",\\\"rawValue\\\":0.01,\\\"unit\\\":\\\"m/s²\\\",\\\"value\\\":0.01},\\\"envelopeRotationFreq\\\":{\\\"name\\\":\\\"包络转频主频\\\",\\\"nameEn\\\":\\\"Envelope rotation frequency\\\",\\\"nameJp\\\":\\\"エンベロープの回転マスター周波数\\\",\\\"rawValue\\\":6.25,\\\"unit\\\":\\\"Hz\\\",\\\"value\\\":6.25},\\\"harmonicsFreq\\\":{\\\"name\\\":\\\"谐频主频\\\",\\\"nameEn\\\":\\\"Harmonics frequency\\\",\\\"nameJp\\\":\\\"高調マスター周波数\\\",\\\"rawValue\\\":314.06,\\\"unit\\\":\\\"Hz\\\",\\\"value\\\":314.06},\\\"harmonicsRms\\\":{\\\"name\\\":\\\"谐频RMS\\\",\\\"nameEn\\\":\\\"Harmonics RMS\\\",\\\"nameJp\\\":\\\"高調波RMS\\\",\\\"rawValue\\\":0.02,\\\"unit\\\":\\\"m/s²\\\",\\\"value\\\":0.02},\\\"header\\\":\\\"01\\\",\\\"highFreqRms\\\":{\\\"name\\\":\\\"高频RMS\\\",\\\"nameEn\\\":\\\"High RMS\\\",\\\"nameJp\\\":\\\"高周波RMS\\\",\\\"rawValue\\\":0.08,\\\"unit\\\":\\\"m/s²\\\",\\\"value\\\":0.08},\\\"kurtosis\\\":{\\\"name\\\":\\\"峭度\\\",\\\"nameEn\\\":\\\"kurtosis\\\",\\\"nameJp\\\":\\\"尖度\\\",\\\"rawValue\\\":2.94,\\\"unit\\\":\\\"\\\",\\\"value\\\":2.94},\\\"lowFreqRms\\\":{\\\"name\\\":\\\"低频RMS\\\",\\\"nameEn\\\":\\\"Low RMS\\\",\\\"nameJp\\\":\\\"低周波RMS\\\",\\\"rawValue\\\":0.03,\\\"unit\\\":\\\"m/s²\\\",\\\"value\\\":0.03},\\\"lubricationFactor\\\":{\\\"name\\\":\\\"润滑因子\\\",\\\"nameEn\\\":\\\"Lubrication factor\\\",\\\"nameJp\\\":\\\"潤滑係数\\\",\\\"rawValue\\\":0.01,\\\"unit\\\":\\\"m/s²\\\",\\\"value\\\":0.01},\\\"medianRms\\\":{\\\"name\\\":\\\"中频RMS\\\",\\\"nameEn\\\":\\\"Median RMS\\\",\\\"','{\"$.deviceId\":\"$.payload.data.msUid\",\"$.this\":\"getZAIoTDataString($.this)\"}','{\"getZAIoTDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',1,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_LowRms,[deviceId]_MedianRms,[deviceId]_VelocityRms,[deviceId]_AccelerationRms,[deviceId]_','振动传感器_updata','ZAIoT-VTD01',1,NULL);
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (92,'振動センサー_alarmData',NULL,'ZAIoT-VTD01','kafka-001','{\"payload\": {\"data\": {\"upTime\": 1696846550673,\"parsedData\": \"{\\\"xRotationRMS_nameEn\\\":\\\"X-Rotation RMS\\\",\\\"voltage_value\\\":3.0,\\\"xLubricationFactor_rawValue\\\":4.24,\\\"temperature_unit\\\":\\\"℃\\\",\\\"temperature_value\\\":50.8,\\\"xHarmonicsRMS_rawValue\\\":8.49,\\\"voltage_name\\\":\\\"电压\\\",\\\"voltage_unit\\\":\\\"v\\\",\\\"ySpeedRMS_nameEn\\\":\\\"Y-velocity RMS\\\",\\\"temperature_name\\\":\\\"温度\\\",\\\"zHarmonicsRMS_value\\\":4.43,\\\"yAccelerationRMS_rawValue\\\":3.55,\\\"xRotationRMS_value\\\":3.6,\\\"xSpeedRMS_unit\\\":\\\"mm/s\\\",\\\"xMeshRMS_value\\\":4.92,\\\"xShockRMS_value\\\":3.35,\\\"zSpeedRMS_nameJp\\\":\\\"Z-速度rms\\\",\\\"temperature_rawValue\\\":50.8,\\\"zHarmonicsRMS_nameJp\\\":\\\"Z-高調波周波数rms\\\",\\\"yHarmonicsRMS_rawValue\\\":1.56,\\\"xAccelerationRMS_rawValue\\\":5.34,\\\"xMeshRMS_unit\\\":\\\"m/s²\\\",\\\"ySpeedRMS_rawValue\\\":4.05,\\\"zShockRMS_nameEn\\\":\\\"Z-Shock RMS\\\",\\\"xHarmonicsRMS_unit\\\":\\\"m/s²\\\",\\\"xHarmonicsRMS_value\\\":8.49,\\\"ySpeedRMS_name\\\":\\\"Y-速度rms\\\",\\\"yMeshRMS_unit\\\":\\\"m/s²\\\",\\\"dataStatus\\\":\\\"normal\\\",\\\"zLubricationFactor_value\\\":8.84,\\\"yMeshRMS_name\\\":\\\"Y-啮合rms\\\",\\\"xSpeedRMS_name\\\":\\\"X-速度rms\\\",\\\"zMeshRMS_unit\\\":\\\"m/s²\\\",\\\"zRotationRMS_rawValue\\\":7.58,\\\"zMeshRMS_name\\\":\\\"Z-啮合rms\\\",\\\"temperature_nameEn\\\":\\\"temperature\\\",\\\"xLubricationFactor_nameJp\\\":\\\"X-潤滑係数\\\",\\\"xSpeedRMS_value\\\":6.09,\\\"zHarmonicsRMS_unit\\\":\\\"m/s²\\\",\\\"yHarmonicsRMS_value\\\":1.56,\\\"xMeshRMS_name\\\":\\\"X-啮合rms\\\",\\\"xHarmonicsRMS_nameEn\\\":\\\"X-Harmonics RMS\\\",\\\"zAccelerationRMS_rawValue\\\":70.19,\\\"zHarmonicsRMS_name\\\":\\\"Z-谐频rms\\\",\\\"xMeshRMS_nameEn\\\":\\\"X-Mesh RMS\\\",\\\"xShockRMS_nameEn\\\":\\\"X-Shock RMS\\\",\\\"yRotationRMS_unit\\\":\\\"m/s²\\\",\\\"yLubricationFactor_name\\\":\\\"Y-润滑因子\\\",\\\"yLubricationFactor_value\\\":2.08,\\\"voltage_nameJp\\\":\\\"電圧\\\",\\\"yRotationRMS_name\\\":\\\"Y-转频rms\\\",\\\"ySpeedRMS_unit\\\":\\\"mm/s\\\",\\\"yLubricationFactor_nameEn\\\":\\\"Y-Lubrication factor\\\",\\\"zShockRMS_value\\\":66.41,\\\"yLubricationFactor_unit\\\":\\\"m/s²\\\",\\\"yShockRMS_nameJp\\\":\\\"Y-衝撃rms\\\",\\\"yRotationRMS_nameJp\\\":\\\"Y-回転周波数rms\\\",\\\"xAccelerationRMS_value\\\":5.34,\\\"ySpeedRMS_value\\\":4.05,\\\"xHarmonicsRMS_name\\\":\\\"X-谐频rms\\\",\\\"xMeshRMS_rawValu','{\"$.deviceId\":\"$.payload.data.msUid\",\"$.this\":\"getZAIoTDataString($.this)\"}','{\"getZAIoTDataString($.this)\":{\"$.this\":\"$.this\"}}','{deviceId:apiUid}',1,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_state','振动传感器_alarmData','ZAIoT-VTD01',1,NULL);
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (93,'ドアセンサー-状態','“detectorid\":\"ID\",”ID-doorStatus“,34与35类别相同,一同解析',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]_delta_status','ドアセンサー-状態','ドアセンサー-ドアの開閉状態-東京建物',7,NULL);
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (94,'ドアセンサー-givtech','“detectorid\":\"ID\",”ID-openTimes“',NULL,'zeta-data-src-code-1',NULL,'{\"$.deviceId\": \"$.msgParam.msUid\",\"$.this\":\"getZetaDataString($.this)\"}','{\"$.deviceAlias\": {\"$.deviceAlias\": \"4F00C8E2\"},\"getZetaDataString($.this)\":{\"$.this\":\"getZetaDataString\"}}','{deviceId:apiUid}',14,'2738969',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceId]-doorStatus','ドアセンサー-givtech','ドアセンサー-givtech',1,'回');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (110,'kiol故障','','DELTA03','kiol','[{\"id\":\"BA0029\",\"type\":\"Boolean\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":false}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getKingIODataString($.this)\"}','{\"$.id\":{\"$.id\":\"\"},\"getKingIODataString($.this)\":{\"$.this\":\"getDeltaDataString\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,'1111111',NULL,NULL,1,'2024-09-12 16:11:30',2,NULL,0,'[deviceSn]_delta_failure','kiol故障','kiol故障',5,'ON-1/OFF-0');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (111,'kiol計測','',NULL,'kiol','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"$.this\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_measurement','kiol計測','kiol計測',5,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (112,'kiol積算',NULL,NULL,'kiol','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"$.this\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_accrual','kiol積算','kiol積算',5,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (113,'kiol状態',NULL,NULL,'kiol','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getKingIODataString($.this)\":{\"$.this\":\"$.this\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_status','kiol状态','kiol Status',7,NULL);
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (120,'st150故障','','st150-01','st150','[{\"id\":\"BA0029\",\"type\":\"Boolean\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":false}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getKingIODataString($.this)\"}','{\"$.id\":{\"$.id\":\"\"},\"getSt150DataString($.this)\":{\"$.this\":\"getDeltaDataString\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,'1111111',NULL,NULL,1,'2024-09-12 16:11:30',2,NULL,0,'[deviceSn]_delta_failure','st150故障','st150故障',5,'ON-1/OFF-0');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (121,'st150計測','','st150-02','st150','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getSt150DataString($.this)\":{\"$.this\":\"$.this\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_measurement','st150計測','st150計測',5,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (122,'st150積算',NULL,'st150-03','st150','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getSt150DataString($.this)\":{\"$.this\":\"$.this\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,'1111111',NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_accrual','st150積算','st150積算',5,' ');
+INSERT INTO `type` (`id`,`name`,`description`,`device_type`,`device_data_src`,`origin_json_format`,`expression_map`,`expression_variable_map`,`target_json_format`,`target_forward_id`,`target_foward_code`,`created_by`,`created_timestamp`,`updated_by`,`updated_timestamp`,`company_id`,`space_id`,`flag`,`dbm_id`,`name_zh`,`name_en`,`device_category_id`,`unit`) VALUES (123,'st150状態',NULL,'st150-04','st150','[{\"id\":\"BA0029\",\"type\":\"Analog\",\"reportedAt\":\"2022-12-11T13:50:00+09:00\",\"value\":67}]','{\"$.deviceId\":\"$.id\",\"$.this\":\"getKingIODataString($.this)\"}','{\"getSt150DataString($.this)\":{\"$.this\":\"$.this\"}}','{\"deviceId\":\"$.Objs[0].N\"}',1,NULL,NULL,NULL,NULL,NULL,2,NULL,0,'[deviceSn]_delta_status','st150状態','st150状態',7,NULL);
+
+
+update `type` set company_id = newCompanyId;
+
+/*Table structure for table `user_building_relation` */
+
+DROP TABLE IF EXISTS `user_building_relation`;
+
+CREATE TABLE `user_building_relation` (
+ `user_id` bigint NOT NULL,
+ `building_id` bigint NOT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='用户楼宇关系表';
+
+/*Table structure for table `user_operation_logs` */
+
+DROP TABLE IF EXISTS `user_operation_logs`;
+
+CREATE TABLE `user_operation_logs` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_id` bigint NOT NULL,
+ `company_id` bigint DEFAULT NULL,
+ `operation` varchar(255) NOT NULL,
+ `description_jp` text,
+ `detail_log` mediumtext,
+ `result` varchar(50) NOT NULL,
+ `ip_address` varchar(45) DEFAULT NULL,
+ `created_at` bigint NOT NULL,
+ `description_cn` text,
+ `description_en` text,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `version_info` */
+
+DROP TABLE IF EXISTS `version_info`;
+
+CREATE TABLE `version_info` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `version_num` varchar(255) DEFAULT NULL COMMENT '版本号',
+ `content` text COMMENT '内容',
+ `date` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+/*Table structure for table `worker_node` */
+
+DROP TABLE IF EXISTS `worker_node`;
+
+CREATE TABLE `worker_node` (
+ `ID` bigint NOT NULL AUTO_INCREMENT COMMENT 'auto increment id',
+ `HOST_NAME` varchar(64) NOT NULL COMMENT 'host name',
+ `PORT` varchar(64) NOT NULL COMMENT 'port',
+ `TYPE` int NOT NULL COMMENT 'node type: ACTUAL or CONTAINER',
+ `LAUNCH_DATE` date NOT NULL COMMENT 'launch date',
+ `MODIFIED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'modified time',
+ `CREATED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created time',
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='DB WorkerID Assigner for UID Generator';
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
diff --git a/dongjian-center-admin-controller/src/main/resources/sql/init_admin.sql b/dongjian-center-admin-controller/src/main/resources/sql/init_admin.sql
new file mode 100644
index 0000000..9fc793b
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/sql/init_admin.sql
@@ -0,0 +1,175 @@
+/*
+SQLyog 企业版 - MySQL GUI v8.14
+MySQL - 8.0.28 : Database - data_center_aeon_admin
+*********************************************************************
+*/
+
+
+/*!40101 SET NAMES utf8 */;
+
+/*!40101 SET SQL_MODE=''*/;
+
+/*!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 /*!32312 IF NOT EXISTS*/`data_center_aeon_admin` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
+
+USE `data_center_aeon_admin`;
+
+/*Table structure for table `basic_company` */
+
+DROP TABLE IF EXISTS `basic_company`;
+
+CREATE TABLE `basic_company` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_id` bigint DEFAULT NULL,
+ `company_name` varchar(500) DEFAULT NULL,
+ `mfa_switch` int DEFAULT '0' COMMENT '谷歌mfa服务开关。0-关闭,1-开启',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `apikey` varchar(255) DEFAULT NULL,
+ `aurora_flag` int DEFAULT '0' COMMENT '0-未创建,1-创建中,2-创建成功,3-创建失败',
+ `aurora_url` varchar(255) DEFAULT NULL,
+ `aurora_read_url` varchar(255) DEFAULT NULL,
+ `aurora_username` varchar(255) DEFAULT NULL,
+ `aurora_password` varchar(255) DEFAULT NULL,
+ `redis_db_id` int DEFAULT NULL COMMENT '使用的redis库id',
+ `bearer_token` text,
+ `third_api_host` varchar(1000) DEFAULT NULL COMMENT 'Third api地址域名,例如:https://api-sec.test-public-api.kanri-roid.app/api/public/v1/problem-reports/return-to-normal,则这里是https://api-sec.test-public-api.kanri-roid.app',
+ `lock_switch` int DEFAULT '1' COMMENT '5次登录失败锁定开关,0-关闭,1-开启',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_company` */
+
+insert into `basic_company`(`id`,`parent_id`,`company_name`,`mfa_switch`,`flag`,`create_time`,`modify_time`, `apikey`) values (1,-1,'THIRD',0,0,1658978002231,1658978002231,'RjV5ZTZBeFArekQ4dDRuZWtzVmNWRjZYTHU2SUZPbzg=');
+
+/*Table structure for table `basic_menu` */
+
+DROP TABLE IF EXISTS `basic_menu`;
+
+CREATE TABLE `basic_menu` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `parent_menu_id` bigint DEFAULT NULL,
+ `menu_name` varchar(100) DEFAULT NULL,
+ `menu_name_en` varchar(100) DEFAULT NULL,
+ `menu_name_jp` varchar(100) DEFAULT NULL,
+ `remark` varchar(100) DEFAULT NULL,
+ `menu_level` int DEFAULT '1' COMMENT '菜单级别',
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `create_time` bigint DEFAULT NULL,
+ `used_by_dashboard` int DEFAULT '0' COMMENT 'dashboard是否使用,0-未使用,1-使用了',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_menu` */
+
+insert into `basic_menu`(`id`,`parent_menu_id`,`menu_name`,`menu_name_en`,`menu_name_jp`,`remark`,`menu_level`,`flag`,`create_time`) values (1,-1,'项目管理','项目管理','项目管理','项目管理',1,0,1659079777164),(2,-1,'楼宇模块','楼宇模块','楼宇模块','楼宇模块',1,0,1659079777164),(3,-1,'设备模块','设备模块','设备模块','设备模块',1,0,1659079777164),(4,-1,'转发管理','转发管理','转发管理','转发管理',1,0,1659079777164),(5,-1,'数据来源管理','数据来源管理','数据来源管理','数据来源管理',1,0,1659079777164),(6,1,'添加','添加','添加','项目管理-添加',2,0,1659079777164),(7,1,'编辑','编辑','编辑','项目管理-编辑',2,0,1659079777164),(8,1,'删除','删除','删除','项目管理-删除',2,0,1659079777164),(9,1,'批量添加','批量添加','批量添加','项目管理-批量添加',2,0,1659079777164),(10,2,'楼宇管理','楼宇管理','楼宇管理','楼宇管理',2,0,1659079777164),(11,2,'楼层管理','楼层管理','楼层管理','楼层管理',2,0,1659079777164),(12,2,'房间管理','房间管理','房间管理','房间管理',2,0,1659079777164),(13,2,'资产管理','资产管理','资产管理','资产管理',2,0,1659079777164),(14,10,'添加','添加','添加','楼宇管理-添加',3,0,1659079777164),(15,10,'编辑','编辑','编辑','楼宇管理-编辑',3,0,1659079777164),(16,10,'删除','删除','删除','楼宇管理-删除',3,0,1659079777164),(17,11,'添加','添加','添加','楼层管理-添加',3,0,1659079777164),(18,11,'编辑','编辑','编辑','楼层管理-编辑',3,0,1659079777164),(19,11,'删除','删除','删除','楼层管理-删除',3,0,1659079777164),(20,12,'添加','添加','添加','房间管理-添加',3,0,1659079777164),(21,12,'编辑','编辑','编辑','房间管理-编辑',3,0,1659079777164),(22,12,'删除','删除','删除','房间管理-删除',3,0,1659079777164),(23,13,'添加','添加','添加','资产管理-添加',3,0,1659079777164),(24,13,'编辑','编辑','编辑','资产管理-编辑',3,0,1659079777164),(25,13,'删除','删除','删除','资产管理-删除',3,0,1659079777164),(26,3,'设备管理','设备管理','设备管理','设备管理',2,0,1659079777164),(27,26,'添加','添加','添加','设备管理-添加',3,0,1659079777164),(28,26,'编辑','编辑','编辑','设备管理-编辑',3,0,1659079777164),(29,26,'删除','删除','删除','设备管理-删除',3,0,1659079777164),(30,26,'批量添加','批量添加','批量添加','设备管理-批量添加',3,0,1659079777164),(31,26,'批量删除','批量删除','批量删除','设备管理-批量删除',3,0,1659079777164),(32,3,'设备类别管理','设备类别管理','设备类别管理','设备类别管理',2,0,1659079777164),(33,32,'添加','添加','添加','设备类别管理-添加',3,0,1659079777164),(34,32,'编辑','编辑','编辑','设备类别管理-编辑',3,0,1659079777164),(35,32,'删除','删除','删除','设备类别管理-删除',3,0,1659079777164),(36,4,'添加','添加','添加','转发管理-添加',3,0,1659079777164),(37,4,'编辑','编辑','编辑','转发管理-编辑',3,0,1659079777164),(38,4,'删除','删除','删除','转发管理-删除',3,0,1659079777164),(39,5,'添加','添加','添加','数据来源管理-添加',3,0,1659079777164),(40,5,'编辑','编辑','编辑','数据来源管理-编辑',3,0,1659079777164),(41,5,'删除','删除','删除','数据来源管理-删除',3,0,1659079777164);
+
+/*Table structure for table `basic_role` */
+
+DROP TABLE IF EXISTS `basic_role`;
+
+CREATE TABLE `basic_role` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `company_id` bigint DEFAULT NULL,
+ `role_name` varchar(100) DEFAULT NULL,
+ `description` varchar(500) DEFAULT NULL,
+ `flag` int DEFAULT '0' COMMENT '0-正常,1-删除',
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_menu_relation` */
+
+DROP TABLE IF EXISTS `basic_role_menu_relation`;
+
+CREATE TABLE `basic_role_menu_relation` (
+ `role_id` bigint DEFAULT NULL,
+ `menu_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_role_user_relation` */
+
+DROP TABLE IF EXISTS `basic_role_user_relation`;
+
+CREATE TABLE `basic_role_user_relation` (
+ `user_id` bigint DEFAULT NULL,
+ `role_id` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `create_time` bigint DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `basic_user` */
+
+DROP TABLE IF EXISTS `basic_user`;
+
+CREATE TABLE `basic_user` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_type` int DEFAULT '0' COMMENT '0-未知,1-管理平台用户,2-普通平台用户',
+ `company_id` bigint NOT NULL,
+ `username` varchar(255) DEFAULT NULL,
+ `login_name` varchar(255) DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `password_modify_time` bigint DEFAULT NULL,
+ `salt` varchar(255) DEFAULT NULL,
+ `email` varchar(255) DEFAULT NULL,
+ `mobile_number` varchar(255) DEFAULT NULL,
+ `mfa_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `mfa_bind` int DEFAULT '0' COMMENT '用户是否绑定了mfa设备。0-未绑定,1-已绑定',
+ `last_login_time` bigint DEFAULT NULL,
+ `flag` int NOT NULL DEFAULT '0' COMMENT '0-正常,1-删除',
+ `expire_time` bigint DEFAULT '4114487556000',
+ `create_time` bigint DEFAULT NULL,
+ `creator_id` bigint DEFAULT NULL,
+ `modify_time` bigint DEFAULT NULL,
+ `modifier_id` bigint DEFAULT NULL,
+ `super_role` int DEFAULT '0' COMMENT '超管权限,1超管,0普通',
+ `create_platform` int DEFAULT '0' COMMENT '创建平台,0-business, 1-dashboard',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Data for the table `basic_user` */
+
+insert into `basic_user`(`id`,`user_type`,`company_id`,`username`,`login_name`,`password`,`password_modify_time`,`salt`,`email`,`mobile_number`,`mfa_secret`,`mfa_bind`,`last_login_time`,`flag`,`expire_time`,`create_time`,`creator_id`,`modify_time`,`modifier_id`) values (1,1,1,'admin','admin','nVg+buw0YAs=',1670312031273,'09bc3a7898','1053492832@qq.com',NULL,NULL,0,1706177793183,0,4114487556000,4114487556000,NULL,1670312031273,NULL);
+
+/*Table structure for table `login_history` */
+
+DROP TABLE IF EXISTS `login_history`;
+
+CREATE TABLE `login_history` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `user_id` bigint DEFAULT NULL,
+ `request_ip` varchar(255) DEFAULT NULL,
+ `login_time` bigint DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+/*Table structure for table `worker_node` */
+
+DROP TABLE IF EXISTS `worker_node`;
+
+CREATE TABLE `worker_node` (
+ `ID` bigint NOT NULL AUTO_INCREMENT COMMENT 'auto increment id',
+ `HOST_NAME` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'host name',
+ `PORT` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'port',
+ `TYPE` int NOT NULL COMMENT 'node type: ACTUAL or CONTAINER',
+ `LAUNCH_DATE` date NOT NULL COMMENT 'launch date',
+ `MODIFIED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'modified time',
+ `CREATED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created time',
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='DB WorkerID Assigner for UID Generator';
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
diff --git a/dongjian-center-admin-controller/src/main/resources/sql/init_aurora_third.sql b/dongjian-center-admin-controller/src/main/resources/sql/init_aurora_third.sql
new file mode 100644
index 0000000..4207058
--- /dev/null
+++ b/dongjian-center-admin-controller/src/main/resources/sql/init_aurora_third.sql
@@ -0,0 +1,447 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server : aurora-Third-AWS-02(新部署的,我们压测用)
+ Source Server Type : MySQL
+ Source Server Version : 80028 (8.0.28)
+ Source Host : third-dev-aurora-db-instance-1.cde6q2assvmn.ap-northeast-1.rds.amazonaws.com:3306
+ Source Schema : third
+
+ Target Server Type : MySQL
+ Target Server Version : 80028 (8.0.28)
+ File Encoding : 65001
+
+ Date: 22/03/2024 11:45:38
+*/
+
+SET NAMES utf8;
+SET FOREIGN_KEY_CHECKS = 0;
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/`third` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
+
+USE `third`;
+
+-- ----------------------------
+-- Table structure for rawData
+-- ----------------------------
+DROP TABLE IF EXISTS `rawData`;
+CREATE TABLE `rawData` (
+ `hashId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `id` int NULL DEFAULT NULL,
+ `methodType` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `deviceId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `platformIdentifyId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `deviceTypeName` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertLevel` int NULL DEFAULT NULL,
+ `alertLevelName` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertContent` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertTitle` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertTypeName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertCancelTitle` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertCancelContent` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `rawData` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `status` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `messageId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `floorInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `spaceInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `equipmentInfo` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `projectInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `receive_ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `companyId` int NULL DEFAULT NULL,
+ `company` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `dateKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `yearKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `monthKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `dayKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `srcType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `needTransfer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `pure_target_id` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `targetId` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `problemReportCategoryId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `forwardType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingCode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `target_id_mapper` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `updata_interval` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ PRIMARY KEY (`hashId`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for rawData
+-- ----------------------------
+DROP TABLE IF EXISTS `1year_rawData`;
+CREATE TABLE `1year_rawData` (
+ `hashId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `id` int NULL DEFAULT NULL,
+ `methodType` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `deviceId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `platformIdentifyId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `deviceTypeName` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertLevel` int NULL DEFAULT NULL,
+ `alertLevelName` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertContent` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertTitle` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertTypeName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertCancelTitle` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertCancelContent` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `rawData` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `status` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `messageId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `floorInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `spaceInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `equipmentInfo` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `projectInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `receive_ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `companyId` int NULL DEFAULT NULL,
+ `company` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `dateKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `yearKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `monthKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `dayKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `srcType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `needTransfer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `pure_target_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `targetId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `problemReportCategoryId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `forwardType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingCode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `target_id_mapper` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `updata_interval` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ KEY `ts` (`ts`) USING BTREE
+ ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for raw_data_10min
+-- ----------------------------
+DROP TABLE IF EXISTS `raw_data_10min`;
+CREATE TABLE `raw_data_10min` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `target_id` bigint NOT NULL,
+ `average_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `average_data_milli_ts` bigint NULL DEFAULT NULL,
+ `average_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `max_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `max_data_milli_ts` bigint NULL DEFAULT NULL,
+ `max_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `min_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `min_data_milli_ts` bigint NULL DEFAULT NULL,
+ `min_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `start_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `start_data_milli_ts` bigint NULL DEFAULT NULL,
+ `start_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `end_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `end_data_milli_ts` bigint NULL DEFAULT NULL,
+ `end_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `endpoint_milli_ts` bigint NULL DEFAULT NULL,
+ `q1_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q1_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q1_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q2_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q2_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q2_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q3_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q3_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q3_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ INDEX `target_id_ts`(`target_id` ASC) USING BTREE,
+ INDEX `idx_average_data_milli_ts`(`average_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_max_data_milli_ts`(`max_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_min_data_milli_ts`(`min_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_start_data_milli_ts`(`start_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_end_data_milli_ts`(`end_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_endpoint_milli_ts`(`endpoint_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q1_data_milli_ts`(`q1_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q2_data_milli_ts`(`q2_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q3_data_milli_ts`(`q3_data_milli_ts` ASC) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for raw_data_1hour
+-- ----------------------------
+DROP TABLE IF EXISTS `raw_data_1hour`;
+CREATE TABLE `raw_data_1hour` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `target_id` bigint NOT NULL,
+ `average_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `average_data_milli_ts` bigint NULL DEFAULT NULL,
+ `average_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `max_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `max_data_milli_ts` bigint NULL DEFAULT NULL,
+ `max_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `min_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `min_data_milli_ts` bigint NULL DEFAULT NULL,
+ `min_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `start_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `start_data_milli_ts` bigint NULL DEFAULT NULL,
+ `start_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `end_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `end_data_milli_ts` bigint NULL DEFAULT NULL,
+ `end_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `endpoint_milli_ts` bigint NULL DEFAULT NULL,
+ `q1_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q1_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q1_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q2_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q2_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q2_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q3_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q3_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q3_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ INDEX `target_id_ts`(`target_id` ASC) USING BTREE,
+ INDEX `idx_average_data_milli_ts`(`average_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_max_data_milli_ts`(`max_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_min_data_milli_ts`(`min_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_start_data_milli_ts`(`start_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_end_data_milli_ts`(`end_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_endpoint_milli_ts`(`endpoint_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q1_data_milli_ts`(`q1_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q2_data_milli_ts`(`q2_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q3_data_milli_ts`(`q3_data_milli_ts` ASC) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for raw_data_24hour
+-- ----------------------------
+DROP TABLE IF EXISTS `raw_data_24hour`;
+CREATE TABLE `raw_data_24hour` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `target_id` bigint NOT NULL,
+ `average_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `average_data_milli_ts` bigint NULL DEFAULT NULL,
+ `average_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `max_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `max_data_milli_ts` bigint NULL DEFAULT NULL,
+ `max_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `min_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `min_data_milli_ts` bigint NULL DEFAULT NULL,
+ `min_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `start_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `start_data_milli_ts` bigint NULL DEFAULT NULL,
+ `start_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `end_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `end_data_milli_ts` bigint NULL DEFAULT NULL,
+ `end_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `endpoint_milli_ts` bigint NULL DEFAULT NULL,
+ `q1_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q1_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q1_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q2_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q2_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q2_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q3_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q3_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q3_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ INDEX `target_id_ts`(`target_id` ASC) USING BTREE,
+ INDEX `idx_average_data_milli_ts`(`average_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_max_data_milli_ts`(`max_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_min_data_milli_ts`(`min_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_start_data_milli_ts`(`start_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_end_data_milli_ts`(`end_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_endpoint_milli_ts`(`endpoint_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q1_data_milli_ts`(`q1_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q2_data_milli_ts`(`q2_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q3_data_milli_ts`(`q3_data_milli_ts` ASC) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for raw_data_30min
+-- ----------------------------
+DROP TABLE IF EXISTS `raw_data_30min`;
+CREATE TABLE `raw_data_30min` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `target_id` bigint NOT NULL,
+ `average_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `average_data_milli_ts` bigint NULL DEFAULT NULL,
+ `average_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `max_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `max_data_milli_ts` bigint NULL DEFAULT NULL,
+ `max_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `min_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `min_data_milli_ts` bigint NULL DEFAULT NULL,
+ `min_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `start_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `start_data_milli_ts` bigint NULL DEFAULT NULL,
+ `start_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `end_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `end_data_milli_ts` bigint NULL DEFAULT NULL,
+ `end_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `endpoint_milli_ts` bigint NULL DEFAULT NULL,
+ `q1_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q1_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q1_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q2_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q2_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q2_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q3_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `q3_data_milli_ts` bigint NULL DEFAULT NULL,
+ `q3_data_milli_ts_str` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ INDEX `target_id_ts`(`target_id` ASC) USING BTREE,
+ INDEX `idx_average_data_milli_ts`(`average_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_max_data_milli_ts`(`max_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_min_data_milli_ts`(`min_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_start_data_milli_ts`(`start_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_end_data_milli_ts`(`end_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_endpoint_milli_ts`(`endpoint_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q1_data_milli_ts`(`q1_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q2_data_milli_ts`(`q2_data_milli_ts` ASC) USING BTREE,
+ INDEX `idx_q3_data_milli_ts`(`q3_data_milli_ts` ASC) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+
+-- ----------------------------
+-- Table structure for rawData_single_id
+-- ----------------------------
+DROP TABLE IF EXISTS `rawData_single_id`;
+CREATE TABLE `rawData_single_id` (
+ `hashId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `id` int NULL DEFAULT NULL,
+ `methodType` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `deviceId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `platformIdentifyId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `deviceTypeName` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertLevel` int NULL DEFAULT NULL,
+ `alertLevelName` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertContent` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertTitle` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertTypeName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertCancelTitle` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertCancelContent` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `rawData` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `status` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `messageId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `floorInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `spaceInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `equipmentInfo` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `projectInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `receive_ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `companyId` int NULL DEFAULT NULL,
+ `company` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `dateKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `yearKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `monthKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `dayKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `srcType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `needTransfer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `pure_target_id` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `targetId` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `problemReportCategoryId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `forwardType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingCode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `target_id_mapper` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `updata_interval` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ PRIMARY KEY (`hashId`) USING BTREE,
+ INDEX `receive_ts`(`receive_ts` ASC) USING BTREE,
+ INDEX `pure_target_id`(`pure_target_id` ASC) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+
+/*Table structure for table `rawData_realtime` */
+
+DROP TABLE IF EXISTS `rawData_realtime`;
+
+CREATE TABLE `rawData_realtime` (
+ `hashId` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
+ `id` int DEFAULT NULL,
+ `methodType` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `deviceId` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
+ `platformIdentifyId` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `deviceTypeName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `alertLevel` int DEFAULT NULL,
+ `alertLevelName` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `alertContent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `alertTitle` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `alertTypeName` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `alertCancelTitle` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `alertCancelContent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `rawData` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `status` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `messageId` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `buildingInfo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `floorInfo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `spaceInfo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `equipmentInfo` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `projectInfo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `receive_ts` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `ts` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `companyId` int DEFAULT NULL,
+ `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `dateKey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `yearKey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `monthKey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `dayKey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `srcType` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `needTransfer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `pure_target_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `targetId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `problemReportCategoryId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `forwardType` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `buildingId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `buildingCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `target_id_mapper` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ `updata_interval` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+ PRIMARY KEY (`deviceId`),
+ KEY `ts` (`ts`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
+
+-- ----------------------------
+-- Table structure for alertData
+-- ----------------------------
+DROP TABLE IF EXISTS `alertData`;
+CREATE TABLE `alertData` (
+ `hashId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `id` int NULL DEFAULT NULL,
+ `methodType` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `deviceId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `platformIdentifyId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `deviceTypeName` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertLevel` int NULL DEFAULT NULL,
+ `alertLevelName` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertContent` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertTitle` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertTypeName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertCancelTitle` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `alertCancelContent` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `rawData` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `status` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `messageId` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `floorInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `spaceInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `equipmentInfo` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `projectInfo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `receive_ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `ts` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `companyId` int NULL DEFAULT NULL,
+ `company` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `dateKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `yearKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `monthKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `dayKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `srcType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `needTransfer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `pure_target_id` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `targetId` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `problemReportCategoryId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `forwardType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `buildingCode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `target_id_mapper` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `updata_interval` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ PRIMARY KEY (`hashId`) USING BTREE,
+ INDEX `receive_ts`(`receive_ts` ASC) USING BTREE,
+ INDEX `pure_target_id`(`pure_target_id` ASC) USING BTREE,
+ INDEX `deviceId`(`deviceId` ASC) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminCompanyControllerTest.java b/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminCompanyControllerTest.java
new file mode 100644
index 0000000..cd6bba5
--- /dev/null
+++ b/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminCompanyControllerTest.java
@@ -0,0 +1,163 @@
+package com.dongjian.datacenter.admin.controller;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.dongjian.datacenter.admin.common.language.msg.MsgLanguageChange;
+import com.dongjian.datacenter.admin.dto.account.LoginParam;
+import com.dongjian.datacenter.admin.dto.company.OptCompanyParams;
+import com.dongjian.datacenter.admin.util.CommonUtil;
+import com.dongjian.datacenter.admin.dto.company.CompanySearchParams;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
+import org.springframework.web.context.WebApplicationContext;
+
+import jakarta.annotation.Resource;
+
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+@AutoConfigureMockMvc
+public class AdminCompanyControllerTest {
+
+
+ @Resource
+ private MsgLanguageChange msgLanguageChange;
+
+ @Resource
+ protected MockMvc mockMvc;
+
+ @Autowired
+ protected WebApplicationContext wac;
+
+ protected HttpHeaders httpHeaders = new HttpHeaders();
+
+
+ private static final String COMPANY_NAME = "junit-test-admin-CompanyName";
+
+
+ @Before()
+ public void setup() throws Exception {
+ System.out.println("run before.......");
+ LoginParam loginParam = new LoginParam();
+ loginParam.setLoginname("admin");
+ loginParam.setPassword("123456");
+
+ String content = (new ObjectMapper()).writeValueAsString(loginParam);
+
+ System.out.println(content);
+
+ HttpHeaders loginHeaders = new HttpHeaders();
+ loginHeaders.set("LanguageType", "0");
+ String responseString = mockMvc.perform(
+ post("/account/login")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(loginHeaders)
+ .content(content)
+ ).andReturn().getResponse().getContentAsString();
+
+ System.out.println("setup response:" + responseString);
+
+ JSONObject loginRespObject = JSONObject.parseObject(responseString).getJSONObject("data");
+ httpHeaders.set("LoginName", loginRespObject.getString("loginName"));
+ httpHeaders.set("AccessToken", loginRespObject.getString("accessToken"));
+ httpHeaders.set("UserId", loginRespObject.getString("userId"));
+ httpHeaders.set("CompanyId", loginRespObject.getString("companyId"));
+ httpHeaders.set("LanguageType", "2");
+ httpHeaders.set("UTCOffset", "-480");
+ }
+
+ @After()
+ public void after() throws Exception {
+ System.out.println("run after.......");
+
+ editData();
+
+ }
+
+ private String editData() throws Exception {
+
+ OptCompanyParams param = new OptCompanyParams();
+ param.setCompanyName(COMPANY_NAME);
+ param.setCompanyId(16L);
+ param.setParentId(1L);
+ param.setMfaSwitch(0);
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ String responseString = mockMvc.perform(
+ post("/company/edit")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ return responseString;
+ }
+
+
+ @Test
+ public void testEdit() throws Exception {
+ System.out.println("run testEdit.......");
+
+ OptCompanyParams param = new OptCompanyParams();
+ param.setCompanyName(COMPANY_NAME +"-edit");
+ param.setCompanyId(16L);
+ param.setParentId(2L);
+ param.setMfaSwitch(0);
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testEdit params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/company/edit")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testEdit response:" + responseString);
+
+ }
+
+
+ @Test
+ public void testGetListPage() throws Exception {
+ System.out.println("run testGetListPage.......");
+
+ CompanySearchParams companySearchParams = new CompanySearchParams();
+ companySearchParams.setCompanyName(COMPANY_NAME);
+ companySearchParams.setSelfCompanyId(1L);
+
+ String pageString = mockMvc.perform(
+ get("/company/getListPage")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .queryParams(CommonUtil.convertToMultiValueMap(companySearchParams))
+ )
+ .andExpect(status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andExpect(MockMvcResultMatchers.jsonPath("$.data.total").value(1))
+ .andReturn().getResponse().getContentAsString();
+ System.out.println("testGetListPage response:" + pageString);
+
+ }
+}
+
diff --git a/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminProjectControllerTest.java b/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminProjectControllerTest.java
new file mode 100644
index 0000000..7778556
--- /dev/null
+++ b/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminProjectControllerTest.java
@@ -0,0 +1,265 @@
+package com.dongjian.datacenter.admin.controller;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.dongjian.datacenter.admin.common.language.msg.MsgLanguageChange;
+import com.dongjian.datacenter.admin.dto.account.LoginParam;
+import com.dongjian.datacenter.admin.dto.project.DeleteProjectParams;
+import com.dongjian.datacenter.admin.dto.project.OptProjectParams;
+import com.dongjian.datacenter.admin.dto.project.ProjectSearchParams;
+import com.dongjian.datacenter.admin.util.CommonUtil;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
+import org.springframework.web.context.WebApplicationContext;
+
+import jakarta.annotation.Resource;
+
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+@AutoConfigureMockMvc
+public class AdminProjectControllerTest {
+
+
+ @Resource
+ private MsgLanguageChange msgLanguageChange;
+
+ @Resource
+ protected MockMvc mockMvc;
+
+ @Autowired
+ protected WebApplicationContext wac;
+
+ protected HttpHeaders httpHeaders = new HttpHeaders();
+
+
+ private static final String PROJECT_NAME = "junit-test-admin-ProjectName";
+
+
+ @Before()
+ public void setup() throws Exception {
+ System.out.println("run before.......");
+ LoginParam loginParam = new LoginParam();
+ loginParam.setLoginname("admin");
+ loginParam.setPassword("123456");
+
+ String content = (new ObjectMapper()).writeValueAsString(loginParam);
+
+ System.out.println(content);
+
+ HttpHeaders loginHeaders = new HttpHeaders();
+ loginHeaders.set("LanguageType", "0");
+ String responseString = mockMvc.perform(
+ post("/account/login")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(loginHeaders)
+ .content(content)
+ ).andReturn().getResponse().getContentAsString();
+
+ System.out.println("setup response:" + responseString);
+
+ JSONObject loginRespObject = JSONObject.parseObject(responseString).getJSONObject("data");
+ httpHeaders.set("LoginName", loginRespObject.getString("loginName"));
+ httpHeaders.set("AccessToken", loginRespObject.getString("accessToken"));
+ httpHeaders.set("UserId", loginRespObject.getString("userId"));
+ httpHeaders.set("CompanyId", loginRespObject.getString("companyId"));
+ httpHeaders.set("LanguageType", "2");
+ httpHeaders.set("UTCOffset", "-480");
+
+ deleteMockData();
+ }
+
+ @After()
+ public void after() throws Exception {
+ System.out.println("run after.......");
+ deleteMockData();
+
+ }
+
+ private String deleteMockData() throws Exception {
+ long projectId = getMockDataId();
+
+ DeleteProjectParams param = new DeleteProjectParams();
+ param.setProjectIds(projectId+"");
+ param.setCompanyIds("2");
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ String responseString = mockMvc.perform(
+ post("/project/batchDelete")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ return responseString;
+ }
+
+ private void insertMockData() throws Exception {
+ System.out.println("run insertMockData.......");
+ long projectId = getMockDataId();
+ if (-1 == projectId) {
+ OptProjectParams param = createMockData();
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testAdd params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/project/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ }
+ }
+
+ private OptProjectParams createMockData() throws Exception {
+ OptProjectParams param = new OptProjectParams();
+ param.setProjectName(PROJECT_NAME);
+ param.setCompanyId(2L);
+ param.setUdfProjectId("junit-test-amdin-UdfProjectId");
+ return param;
+ }
+
+ private long getMockDataId() throws Exception {
+ ProjectSearchParams projectSearchParams = new ProjectSearchParams();
+ projectSearchParams.setProjectName(PROJECT_NAME);
+ projectSearchParams.setCompanyId(2L);
+
+ String pageString = mockMvc.perform(
+ get("/project/getListPage")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .queryParams(CommonUtil.convertToMultiValueMap(projectSearchParams))
+ )
+ .andExpect(status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ System.out.println("getMockDataId :" + pageString);
+ JSONObject pageObject = JSONObject.parseObject(pageString);
+
+ JSONArray list = pageObject.getJSONObject("data").getJSONArray("list");
+ return list.size() == 0 ? -1L : list.getJSONObject(0).getLongValue("projectId");
+ }
+
+ @Test
+ public void testAdd() throws Exception {
+ System.out.println("run testAdd.......");
+
+ OptProjectParams param = createMockData();
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testAdd params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/project/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testAdd response:" + responseString);
+
+ String responseString2 = mockMvc.perform(
+ post("/project/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("20001"))
+ .andExpect(MockMvcResultMatchers.jsonPath("$.msg").value(
+ msgLanguageChange.getParameterMapByCode(Integer.valueOf(httpHeaders.getFirst("LanguageType")), "projectNameHasExisted")
+ ))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testAdd response:" + responseString2);
+
+ }
+
+ @Test
+ public void testEdit() throws Exception {
+ System.out.println("run testEdit.......");
+
+ insertMockData();
+
+ OptProjectParams param = new OptProjectParams();
+ param.setProjectId(getMockDataId());
+ param.setProjectName(PROJECT_NAME);
+ param.setCompanyId(2L);
+ param.setUdfProjectId("junit-test-UdfProjectId-edit");
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testEdit params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/project/edit")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testEdit response:" + responseString);
+
+ }
+
+
+ @Test
+ public void testGetListPage() throws Exception {
+ System.out.println("run testGetListPage.......");
+
+ insertMockData();
+
+ ProjectSearchParams projectSearchParams = new ProjectSearchParams();
+ projectSearchParams.setProjectName(PROJECT_NAME);
+ projectSearchParams.setCompanyId(2L);
+
+ String pageString = mockMvc.perform(
+ get("/project/getListPage")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .queryParams(CommonUtil.convertToMultiValueMap(projectSearchParams))
+ )
+ .andExpect(status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andExpect(MockMvcResultMatchers.jsonPath("$.data.total").value(1))
+ .andReturn().getResponse().getContentAsString();
+ System.out.println("testGetListPage response:" + pageString);
+
+ }
+
+
+ @Test
+ public void testDelete() throws Exception {
+ System.out.println("run testDelete.......");
+
+ insertMockData();
+
+ String responseString = deleteMockData();
+
+ System.out.println("testDelete response:" + responseString);
+
+ }
+}
+
diff --git a/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminRoleControllerTest.java b/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminRoleControllerTest.java
new file mode 100644
index 0000000..a074bab
--- /dev/null
+++ b/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminRoleControllerTest.java
@@ -0,0 +1,262 @@
+package com.dongjian.datacenter.admin.controller;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.dongjian.datacenter.admin.common.language.msg.MsgLanguageChange;
+import com.dongjian.datacenter.admin.dto.account.LoginParam;
+import com.dongjian.datacenter.admin.dto.role.DeleteRoleParam;
+import com.dongjian.datacenter.admin.dto.role.OptRoleParam;
+import com.dongjian.datacenter.admin.dto.role.PageSearchParam;
+import com.dongjian.datacenter.admin.util.CommonUtil;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
+import org.springframework.web.context.WebApplicationContext;
+
+import jakarta.annotation.Resource;
+
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+@AutoConfigureMockMvc
+public class AdminRoleControllerTest {
+
+
+ @Resource
+ private MsgLanguageChange msgLanguageChange;
+
+ @Resource
+ protected MockMvc mockMvc;
+
+ @Autowired
+ protected WebApplicationContext wac;
+
+ protected HttpHeaders httpHeaders = new HttpHeaders();
+
+
+ private static final String ROLE_NAME = "junit-test-admin-RoleName";
+
+
+ @Before()
+ public void setup() throws Exception {
+ System.out.println("run before.......");
+ LoginParam loginParam = new LoginParam();
+ loginParam.setLoginname("admin");
+ loginParam.setPassword("123456");
+
+ String content = (new ObjectMapper()).writeValueAsString(loginParam);
+
+ System.out.println(content);
+
+ HttpHeaders loginHeaders = new HttpHeaders();
+ loginHeaders.set("LanguageType", "0");
+ String responseString = mockMvc.perform(
+ post("/account/login")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(loginHeaders)
+ .content(content)
+ ).andReturn().getResponse().getContentAsString();
+
+ System.out.println("setup response:" + responseString);
+
+ JSONObject loginRespObject = JSONObject.parseObject(responseString).getJSONObject("data");
+ httpHeaders.set("LoginName", loginRespObject.getString("loginName"));
+ httpHeaders.set("AccessToken", loginRespObject.getString("accessToken"));
+ httpHeaders.set("UserId", loginRespObject.getString("userId"));
+ httpHeaders.set("CompanyId", loginRespObject.getString("companyId"));
+ httpHeaders.set("LanguageType", "2");
+ httpHeaders.set("UTCOffset", "-480");
+
+ deleteMockData();
+ }
+
+ @After()
+ public void after() throws Exception {
+ System.out.println("run after.......");
+ deleteMockData();
+
+ }
+
+ private String deleteMockData() throws Exception {
+ long roleId = getMockDataId();
+
+ DeleteRoleParam param = new DeleteRoleParam();
+ param.setRoleIds(roleId+"");
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ String responseString = mockMvc.perform(
+ post("/role/batchDelete")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ return responseString;
+ }
+
+ private void insertMockData() throws Exception {
+ System.out.println("run insertMockData.......");
+ long roleId = getMockDataId();
+ if (-1 == roleId) {
+ OptRoleParam param = createMockData();
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testAdd params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/role/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ }
+ }
+
+ private OptRoleParam createMockData() throws Exception {
+ OptRoleParam param = new OptRoleParam();
+ param.setRoleName(ROLE_NAME);
+ param.setDescription("Description");
+ param.setMenuIds("1,2");
+ return param;
+ }
+
+ private long getMockDataId() throws Exception {
+ PageSearchParam roleSearchParams = new PageSearchParam();
+ roleSearchParams.setRoleName(ROLE_NAME);
+
+ String pageString = mockMvc.perform(
+ get("/role/getListPage")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .queryParams(CommonUtil.convertToMultiValueMap(roleSearchParams))
+ )
+ .andExpect(status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ System.out.println("getMockDataId :" + pageString);
+ JSONObject pageObject = JSONObject.parseObject(pageString);
+
+ JSONArray list = pageObject.getJSONObject("data").getJSONArray("list");
+ return list.size() == 0 ? -1L : list.getJSONObject(0).getLongValue("roleId");
+ }
+
+ @Test
+ public void testAdd() throws Exception {
+ System.out.println("run testAdd.......");
+
+ OptRoleParam param = createMockData();
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testAdd params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/role/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testAdd response:" + responseString);
+
+ String responseString2 = mockMvc.perform(
+ post("/role/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("20001"))
+ .andExpect(MockMvcResultMatchers.jsonPath("$.msg").value(
+ msgLanguageChange.getParameterMapByCode(Integer.valueOf(httpHeaders.getFirst("LanguageType")), "roleNameExist")
+ ))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testAdd response:" + responseString2);
+
+ }
+
+ @Test
+ public void testEdit() throws Exception {
+ System.out.println("run testEdit.......");
+
+ insertMockData();
+
+ OptRoleParam param = new OptRoleParam();
+ param.setRoleId(getMockDataId());
+ param.setRoleName(ROLE_NAME);
+ param.setDescription("Description-edit");
+ param.setMenuIds("1,2,3");
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testEdit params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/role/edit")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testEdit response:" + responseString);
+
+ }
+
+
+ @Test
+ public void testGetListPage() throws Exception {
+ System.out.println("run testGetListPage.......");
+
+ insertMockData();
+
+ PageSearchParam roleSearchParams = new PageSearchParam();
+ roleSearchParams.setRoleName(ROLE_NAME);
+
+ String pageString = mockMvc.perform(
+ get("/role/getListPage")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .queryParams(CommonUtil.convertToMultiValueMap(roleSearchParams))
+ )
+ .andExpect(status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andExpect(MockMvcResultMatchers.jsonPath("$.data.total").value(1))
+ .andReturn().getResponse().getContentAsString();
+ System.out.println("testGetListPage response:" + pageString);
+
+ }
+
+
+ @Test
+ public void testDelete() throws Exception {
+ System.out.println("run testDelete.......");
+
+ insertMockData();
+
+ String responseString = deleteMockData();
+
+ System.out.println("testDelete response:" + responseString);
+
+ }
+}
+
diff --git a/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminUserControllerTest.java b/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminUserControllerTest.java
new file mode 100644
index 0000000..b3ea9a4
--- /dev/null
+++ b/dongjian-center-admin-controller/src/test/java/com/dongjian/datacenter/admin/controller/AdminUserControllerTest.java
@@ -0,0 +1,356 @@
+package com.dongjian.datacenter.admin.controller;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.dongjian.datacenter.admin.common.language.msg.MsgLanguageChange;
+import com.dongjian.datacenter.admin.dto.account.LoginParam;
+import com.dongjian.datacenter.admin.dto.user.DeleteUserParam;
+import com.dongjian.datacenter.admin.dto.user.ModifyPassword;
+import com.dongjian.datacenter.admin.dto.user.OptUserParam;
+import com.dongjian.datacenter.admin.dto.user.PageSearchParam;
+import com.dongjian.datacenter.admin.dto.user.ResetPassword;
+import com.dongjian.datacenter.admin.dto.user.SwitchMfaBind;
+import com.dongjian.datacenter.admin.util.CommonUtil;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
+import org.springframework.web.context.WebApplicationContext;
+
+import jakarta.annotation.Resource;
+
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+@AutoConfigureMockMvc
+public class AdminUserControllerTest {
+
+
+ @Resource
+ private MsgLanguageChange msgLanguageChange;
+
+ @Resource
+ protected MockMvc mockMvc;
+
+ @Autowired
+ protected WebApplicationContext wac;
+
+ protected HttpHeaders httpHeaders = new HttpHeaders();
+
+
+ private static final String USER_NAME = "junit-test-admin-UserName";
+
+
+ @Before()
+ public void setup() throws Exception {
+ System.out.println("run before.......");
+ LoginParam loginParam = new LoginParam();
+ loginParam.setLoginname("admin");
+ loginParam.setPassword("123456");
+
+ String content = (new ObjectMapper()).writeValueAsString(loginParam);
+
+ System.out.println(content);
+
+ HttpHeaders loginHeaders = new HttpHeaders();
+ loginHeaders.set("LanguageType", "0");
+ String responseString = mockMvc.perform(
+ post("/account/login")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(loginHeaders)
+ .content(content)
+ ).andReturn().getResponse().getContentAsString();
+
+ System.out.println("setup response:" + responseString);
+
+ JSONObject loginRespObject = JSONObject.parseObject(responseString).getJSONObject("data");
+ httpHeaders.set("LoginName", loginRespObject.getString("loginName"));
+ httpHeaders.set("AccessToken", loginRespObject.getString("accessToken"));
+ httpHeaders.set("UserId", loginRespObject.getString("userId"));
+ httpHeaders.set("CompanyId", loginRespObject.getString("companyId"));
+ httpHeaders.set("LanguageType", "2");
+ httpHeaders.set("UTCOffset", "-480");
+
+ deleteMockData();
+ }
+
+ @After()
+ public void after() throws Exception {
+ System.out.println("run after.......");
+ deleteMockData();
+
+ }
+
+ private String deleteMockData() throws Exception {
+ long userId = getMockDataId();
+
+ DeleteUserParam param = new DeleteUserParam();
+ param.setUserIds(userId+"");
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ String responseString = mockMvc.perform(
+ post("/user/batchDelete")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ return responseString;
+ }
+
+ private void insertMockData() throws Exception {
+ System.out.println("run insertMockData.......");
+ long userId = getMockDataId();
+ if (-1 == userId) {
+ OptUserParam param = createMockData();
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testAdd params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/user/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ }
+ }
+
+ private OptUserParam createMockData() throws Exception {
+ OptUserParam param = new OptUserParam();
+ param.setUsername(USER_NAME);
+ param.setCompanyId(2L);
+ param.setEmail("9386@qq.com");
+ param.setMobileNumber("+86-18766667777");
+// param.setRoleId(9L);
+ param.setUsername(USER_NAME);
+ param.setUserType(2);
+ return param;
+ }
+
+ private long getMockDataId() throws Exception {
+ PageSearchParam userSearchParams = new PageSearchParam();
+ userSearchParams.setKeyword(USER_NAME);
+
+ String pageString = mockMvc.perform(
+ get("/user/getListPage")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .queryParams(CommonUtil.convertToMultiValueMap(userSearchParams))
+ )
+ .andExpect(status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+ System.out.println("getMockDataId :" + pageString);
+ JSONObject pageObject = JSONObject.parseObject(pageString);
+
+ JSONArray list = pageObject.getJSONObject("data").getJSONArray("list");
+ return list.size() == 0 ? -1L : list.getJSONObject(0).getLongValue("userId");
+ }
+
+ @Test
+ public void testAdd() throws Exception {
+ System.out.println("run testAdd.......");
+
+ OptUserParam param = createMockData();
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testAdd params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/user/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testAdd response:" + responseString);
+
+ String responseString2 = mockMvc.perform(
+ post("/user/add")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("20001"))
+ .andExpect(MockMvcResultMatchers.jsonPath("$.msg").value(
+ msgLanguageChange.getParameterMapByCode(Integer.valueOf(httpHeaders.getFirst("LanguageType")), "loginNameOrEmailHasExisted")
+ ))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testAdd response:" + responseString2);
+
+ }
+
+ @Test
+ public void testEdit() throws Exception {
+ System.out.println("run testEdit.......");
+
+ insertMockData();
+
+ OptUserParam param = new OptUserParam();
+ param.setUserId(getMockDataId());
+ param.setUsername(USER_NAME);
+ param.setCompanyId(2L);
+ param.setEmail("938@qq.com");
+ param.setMobileNumber("+86-18766668888");
+// param.setRoleId(9L);
+ param.setUsername(USER_NAME);
+ param.setUserType(2);
+
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testEdit params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/user/edit")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testEdit response:" + responseString);
+
+ }
+
+ @Test
+ public void testBatchResetPassword() throws Exception {
+ System.out.println("run testBatchResetPassword.......");
+
+ insertMockData();
+
+ ResetPassword param = new ResetPassword();
+ param.setUserIds(getMockDataId()+"");
+
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testBatchResetPassword params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/user/batchResetPassword")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testBatchResetPassword response:" + responseString);
+
+ }
+
+ @Test
+ public void testModifyPassword() throws Exception {
+ System.out.println("run testModifyPassword.......");
+
+ insertMockData();
+
+ ModifyPassword param = new ModifyPassword();
+ param.setOldPassword("123456");
+ param.setNewPassword("123456");
+
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testModifyPassword params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/user/modifyPassword")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("20001"))
+ .andExpect(MockMvcResultMatchers.jsonPath("$.msg").value(
+ msgLanguageChange.getParameterMapByCode(Integer.valueOf(httpHeaders.getFirst("LanguageType")), "pwdFormatError")
+ ))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testModifyPassword response:" + responseString);
+
+ }
+
+ @Test
+ public void testUnbindMfa() throws Exception {
+ System.out.println("run testUnbindMfa.......");
+
+ insertMockData();
+
+ SwitchMfaBind param = new SwitchMfaBind();
+ param.setUserIds(getMockDataId()+"");
+
+ String content = (new ObjectMapper()).writeValueAsString(param);
+
+ System.out.println("testUnbindMfa params:"+content);
+
+ String responseString = mockMvc.perform(
+ post("/user/unbindMfa")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .content(content))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andReturn().getResponse().getContentAsString();
+
+ System.out.println("testUnbindMfa response:" + responseString);
+
+ }
+
+
+ @Test
+ public void testGetListPage() throws Exception {
+ System.out.println("run testGetListPage.......");
+
+ insertMockData();
+
+ PageSearchParam userSearchParams = new PageSearchParam();
+ userSearchParams.setKeyword(USER_NAME);
+
+ String pageString = mockMvc.perform(
+ get("/user/getListPage")
+ .contentType(MediaType.APPLICATION_JSON)
+ .headers(httpHeaders)
+ .queryParams(CommonUtil.convertToMultiValueMap(userSearchParams))
+ )
+ .andExpect(status().isOk())
+ .andExpect(MockMvcResultMatchers.jsonPath("$.code").value("200"))
+ .andExpect(MockMvcResultMatchers.jsonPath("$.data.total").value(1))
+ .andReturn().getResponse().getContentAsString();
+ System.out.println("testGetListPage response:" + pageString);
+
+ }
+
+
+ @Test
+ public void testDelete() throws Exception {
+ System.out.println("run testDelete.......");
+
+ insertMockData();
+
+ String responseString = deleteMockData();
+
+ System.out.println("testDelete response:" + responseString);
+
+ }
+}
+
diff --git a/dongjian-center-admin-dao/.gitignore b/dongjian-center-admin-dao/.gitignore
new file mode 100644
index 0000000..aa23915
--- /dev/null
+++ b/dongjian-center-admin-dao/.gitignore
@@ -0,0 +1,15 @@
+/target/
+/logs/
+/.idea/
+*.iml
+*.bak
+*.log
+/.settings/
+*.project
+*.classpath
+*.factorypath
+*.springBeans
+/.apt_generated/
+/.externalToolBuilders/
+/bin/
+application-*.properties
diff --git a/dongjian-center-admin-dao/pom.xml b/dongjian-center-admin-dao/pom.xml
new file mode 100644
index 0000000..07cdc77
--- /dev/null
+++ b/dongjian-center-admin-dao/pom.xml
@@ -0,0 +1,70 @@
+
+
+ 4.0.0
+
+ com.techsor
+ dongjian-center-admin
+ 0.0.1-SNAPSHOT
+
+ dongjian-center-admin-dao
+ dongjian-center-admin-dao
+ http://maven.apache.org
+
+ UTF-8
+
+
+
+
+ com.techsor
+ dongjian-center-admin-model
+ 0.0.1-SNAPSHOT
+
+
+
+ junit
+ junit
+ test
+
+
+
+
+
+
+ org.mybatis.generator
+ mybatis-generator-maven-plugin
+ 1.3.5
+
+
+ org.mybatis.generator
+ mybatis-generator-core
+ 1.3.5
+
+
+ com.mysql
+ mysql-connector-j
+ 9.3.0
+
+
+
+
+ mybatis generator
+ package
+
+ generate
+
+
+
+
+
+ true
+
+ true
+
+ src/main/resources/mybatis-generator/generatorConfig.xml
+
+
+
+
+
+
diff --git a/dongjian-center-admin-dao/runGenerator.bat b/dongjian-center-admin-dao/runGenerator.bat
new file mode 100644
index 0000000..8638666
--- /dev/null
+++ b/dongjian-center-admin-dao/runGenerator.bat
@@ -0,0 +1,3 @@
+
+call mvn mybatis-generator:generate -e
+pause
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/runGenerator.sh b/dongjian-center-admin-dao/runGenerator.sh
new file mode 100644
index 0000000..5d580f2
--- /dev/null
+++ b/dongjian-center-admin-dao/runGenerator.sh
@@ -0,0 +1 @@
+mvn mybatis-generator:generate -e
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicCompanyMapper.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicCompanyMapper.java
new file mode 100644
index 0000000..54dbc9a
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicCompanyMapper.java
@@ -0,0 +1,120 @@
+package com.dongjian.datacenter.admin.dao.auto;
+
+import com.dongjian.datacenter.admin.model.BasicCompany;
+import com.dongjian.datacenter.admin.model.BasicCompanyExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface BasicCompanyMapper {
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ long countByExample(BasicCompanyExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int deleteByExample(BasicCompanyExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int insert(BasicCompany record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int insertSelective(BasicCompany record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ List selectByExampleWithBLOBs(BasicCompanyExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ List selectByExample(BasicCompanyExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ BasicCompany selectByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int updateByExampleSelective(@Param("record") BasicCompany record, @Param("example") BasicCompanyExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int updateByExampleWithBLOBs(@Param("record") BasicCompany record, @Param("example") BasicCompanyExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int updateByExample(@Param("record") BasicCompany record, @Param("example") BasicCompanyExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKeySelective(BasicCompany record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKeyWithBLOBs(BasicCompany record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKey(BasicCompany record);
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicMenuMapper.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicMenuMapper.java
new file mode 100644
index 0000000..29812b7
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicMenuMapper.java
@@ -0,0 +1,96 @@
+package com.dongjian.datacenter.admin.dao.auto;
+
+import com.dongjian.datacenter.admin.model.BasicMenu;
+import com.dongjian.datacenter.admin.model.BasicMenuExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface BasicMenuMapper {
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ long countByExample(BasicMenuExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ int deleteByExample(BasicMenuExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ int insert(BasicMenu record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ int insertSelective(BasicMenu record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ List selectByExample(BasicMenuExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ BasicMenu selectByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ int updateByExampleSelective(@Param("record") BasicMenu record, @Param("example") BasicMenuExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ int updateByExample(@Param("record") BasicMenu record, @Param("example") BasicMenuExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKeySelective(BasicMenu record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKey(BasicMenu record);
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleMapper.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleMapper.java
new file mode 100644
index 0000000..79680d5
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleMapper.java
@@ -0,0 +1,96 @@
+package com.dongjian.datacenter.admin.dao.auto;
+
+import com.dongjian.datacenter.admin.model.BasicRole;
+import com.dongjian.datacenter.admin.model.BasicRoleExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface BasicRoleMapper {
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ long countByExample(BasicRoleExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ int deleteByExample(BasicRoleExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ int insert(BasicRole record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ int insertSelective(BasicRole record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ List selectByExample(BasicRoleExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ BasicRole selectByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ int updateByExampleSelective(@Param("record") BasicRole record, @Param("example") BasicRoleExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ int updateByExample(@Param("record") BasicRole record, @Param("example") BasicRoleExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKeySelective(BasicRole record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKey(BasicRole record);
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleMenuRelationMapper.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleMenuRelationMapper.java
new file mode 100644
index 0000000..a6f47a8
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleMenuRelationMapper.java
@@ -0,0 +1,64 @@
+package com.dongjian.datacenter.admin.dao.auto;
+
+import com.dongjian.datacenter.admin.model.BasicRoleMenuRelation;
+import com.dongjian.datacenter.admin.model.BasicRoleMenuRelationExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface BasicRoleMenuRelationMapper {
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ long countByExample(BasicRoleMenuRelationExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ int deleteByExample(BasicRoleMenuRelationExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ int insert(BasicRoleMenuRelation record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ int insertSelective(BasicRoleMenuRelation record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ List selectByExample(BasicRoleMenuRelationExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ int updateByExampleSelective(@Param("record") BasicRoleMenuRelation record, @Param("example") BasicRoleMenuRelationExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ int updateByExample(@Param("record") BasicRoleMenuRelation record, @Param("example") BasicRoleMenuRelationExample example);
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleUserRelationMapper.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleUserRelationMapper.java
new file mode 100644
index 0000000..e62358c
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicRoleUserRelationMapper.java
@@ -0,0 +1,64 @@
+package com.dongjian.datacenter.admin.dao.auto;
+
+import com.dongjian.datacenter.admin.model.BasicRoleUserRelation;
+import com.dongjian.datacenter.admin.model.BasicRoleUserRelationExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface BasicRoleUserRelationMapper {
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ long countByExample(BasicRoleUserRelationExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ int deleteByExample(BasicRoleUserRelationExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ int insert(BasicRoleUserRelation record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ int insertSelective(BasicRoleUserRelation record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ List selectByExample(BasicRoleUserRelationExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ int updateByExampleSelective(@Param("record") BasicRoleUserRelation record, @Param("example") BasicRoleUserRelationExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ int updateByExample(@Param("record") BasicRoleUserRelation record, @Param("example") BasicRoleUserRelationExample example);
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicUserMapper.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicUserMapper.java
new file mode 100644
index 0000000..e5760dd
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/BasicUserMapper.java
@@ -0,0 +1,96 @@
+package com.dongjian.datacenter.admin.dao.auto;
+
+import com.dongjian.datacenter.admin.model.BasicUser;
+import com.dongjian.datacenter.admin.model.BasicUserExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface BasicUserMapper {
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ long countByExample(BasicUserExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ int deleteByExample(BasicUserExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ int insert(BasicUser record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ int insertSelective(BasicUser record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ List selectByExample(BasicUserExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ BasicUser selectByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ int updateByExampleSelective(@Param("record") BasicUser record, @Param("example") BasicUserExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ int updateByExample(@Param("record") BasicUser record, @Param("example") BasicUserExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKeySelective(BasicUser record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKey(BasicUser record);
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/LoginHistoryMapper.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/LoginHistoryMapper.java
new file mode 100644
index 0000000..bbfe268
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/LoginHistoryMapper.java
@@ -0,0 +1,96 @@
+package com.dongjian.datacenter.admin.dao.auto;
+
+import com.dongjian.datacenter.admin.model.LoginHistory;
+import com.dongjian.datacenter.admin.model.LoginHistoryExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface LoginHistoryMapper {
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ long countByExample(LoginHistoryExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ int deleteByExample(LoginHistoryExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ int insert(LoginHistory record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ int insertSelective(LoginHistory record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ List selectByExample(LoginHistoryExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ LoginHistory selectByPrimaryKey(Long id);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ int updateByExampleSelective(@Param("record") LoginHistory record, @Param("example") LoginHistoryExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ int updateByExample(@Param("record") LoginHistory record, @Param("example") LoginHistoryExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKeySelective(LoginHistory record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table login_history
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKey(LoginHistory record);
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/SysEnvMapper.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/SysEnvMapper.java
new file mode 100644
index 0000000..934d3ae
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/auto/SysEnvMapper.java
@@ -0,0 +1,96 @@
+package com.dongjian.datacenter.admin.dao.auto;
+
+import com.dongjian.datacenter.admin.model.SysEnv;
+import com.dongjian.datacenter.admin.model.SysEnvExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface SysEnvMapper {
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ long countByExample(SysEnvExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ int deleteByExample(SysEnvExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ int deleteByPrimaryKey(String envKey);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ int insert(SysEnv record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ int insertSelective(SysEnv record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ List selectByExample(SysEnvExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ SysEnv selectByPrimaryKey(String envKey);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ int updateByExampleSelective(@Param("record") SysEnv record, @Param("example") SysEnvExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ int updateByExample(@Param("record") SysEnv record, @Param("example") SysEnvExample example);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKeySelective(SysEnv record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table sys_env
+ *
+ * @mbg.generated
+ */
+ int updateByPrimaryKey(SysEnv record);
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicCompanyMapperExt.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicCompanyMapperExt.java
new file mode 100644
index 0000000..e02ff47
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicCompanyMapperExt.java
@@ -0,0 +1,29 @@
+package com.dongjian.datacenter.admin.dao.ex;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.dongjian.datacenter.admin.dao.auto.BasicCompanyMapper;
+import com.dongjian.datacenter.admin.dto.company.CompanySearchParams;
+import com.dongjian.datacenter.admin.dto.company.OptCompanyParams;
+import com.dongjian.datacenter.admin.model.BasicCompany;
+import com.dongjian.datacenter.admin.vo.TreeMenusDTO;
+import com.dongjian.datacenter.admin.vo.company.CompanyPageDTO;
+
+@Mapper
+public interface BasicCompanyMapperExt extends BasicCompanyMapper{
+
+ List getSubCompanyByParentId(Map searchChildMap);
+
+ List getSelectList(Map paramMap);
+
+ int checkExist(OptCompanyParams optCompanyParams);
+
+ List getListPage(CompanySearchParams pageSearchParam);
+
+ List getListForTree();
+
+
+}
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicProjectMapperExt.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicProjectMapperExt.java
new file mode 100644
index 0000000..2e9a43b
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicProjectMapperExt.java
@@ -0,0 +1,26 @@
+package com.dongjian.datacenter.admin.dao.ex;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.dongjian.datacenter.admin.dto.project.OptProjectParams;
+import com.dongjian.datacenter.admin.dto.project.ProjectSearchParams;
+import com.dongjian.datacenter.admin.model.BasicProject;
+import com.dongjian.datacenter.admin.vo.project.ProjectPageVO;
+
+@Mapper
+public interface BasicProjectMapperExt {
+
+ int checkExist(OptProjectParams optProjectParams);
+
+ List getListPage(ProjectSearchParams pageSearchParam);
+
+ void selfInsertSelective(BasicProject basicProject);
+
+ BasicProject selfSelectByPrimaryKey(Map paramMap);
+
+ void selfUpdateByPrimaryKeySelective(BasicProject basicProject);
+
+}
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleMapperExt.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleMapperExt.java
new file mode 100644
index 0000000..87a1251
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleMapperExt.java
@@ -0,0 +1,23 @@
+package com.dongjian.datacenter.admin.dao.ex;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.dongjian.datacenter.admin.dao.auto.BasicRoleMapper;
+import com.dongjian.datacenter.admin.dto.role.OptRoleParam;
+import com.dongjian.datacenter.admin.dto.role.PageSearchParam;
+import com.dongjian.datacenter.admin.vo.TreeMenusDTO;
+import com.dongjian.datacenter.admin.vo.role.RolePageDTO;
+
+@Mapper
+public interface BasicRoleMapperExt extends BasicRoleMapper {
+
+ Long checkExist(OptRoleParam param);
+
+ List getOwnMenuIds(Map paramMap);
+
+ List getListPage(PageSearchParam pageSearchParam);
+
+}
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleMenuRelationMapperExt.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleMenuRelationMapperExt.java
new file mode 100644
index 0000000..51db6e2
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleMenuRelationMapperExt.java
@@ -0,0 +1,16 @@
+package com.dongjian.datacenter.admin.dao.ex;
+
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.dongjian.datacenter.admin.dao.auto.BasicRoleMenuRelationMapper;
+
+@Mapper
+public interface BasicRoleMenuRelationMapperExt extends BasicRoleMenuRelationMapper {
+
+ void batchInsert(Map paramMap);
+
+ String getMenuIdsByRoleId(Long roleId);
+
+}
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleUserRelationMapperExt.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleUserRelationMapperExt.java
new file mode 100644
index 0000000..d45d855
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicRoleUserRelationMapperExt.java
@@ -0,0 +1,10 @@
+package com.dongjian.datacenter.admin.dao.ex;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.dongjian.datacenter.admin.dao.auto.BasicRoleUserRelationMapper;
+
+@Mapper
+public interface BasicRoleUserRelationMapperExt extends BasicRoleUserRelationMapper {
+
+}
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicUserMapperExt.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicUserMapperExt.java
new file mode 100644
index 0000000..6d7a7a9
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/BasicUserMapperExt.java
@@ -0,0 +1,25 @@
+package com.dongjian.datacenter.admin.dao.ex;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import com.dongjian.datacenter.admin.dao.auto.BasicUserMapper;
+import com.dongjian.datacenter.admin.dto.user.OptUserParam;
+import com.dongjian.datacenter.admin.dto.user.PageSearchParam;
+import com.dongjian.datacenter.admin.vo.user.UserInfoVO;
+import com.dongjian.datacenter.admin.vo.user.UserPageDTO;
+
+@Mapper
+public interface BasicUserMapperExt extends BasicUserMapper{
+
+ Long checkExist(OptUserParam param);
+
+ List getListPage(PageSearchParam pageSearchParam);
+
+ String getMenuIdsByUserId(Map menuMap);
+
+ UserInfoVO getAccountInfo(Map paramMap);
+
+}
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/LoginHistoryMapperExt.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/LoginHistoryMapperExt.java
new file mode 100644
index 0000000..4e27b98
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/LoginHistoryMapperExt.java
@@ -0,0 +1,10 @@
+package com.dongjian.datacenter.admin.dao.ex;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.dongjian.datacenter.admin.dao.auto.LoginHistoryMapper;
+
+@Mapper
+public interface LoginHistoryMapperExt extends LoginHistoryMapper{
+
+}
diff --git a/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/SysEnvMapperExt.java b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/SysEnvMapperExt.java
new file mode 100644
index 0000000..ffd2678
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/java/com/dongjian/datacenter/admin/dao/ex/SysEnvMapperExt.java
@@ -0,0 +1,11 @@
+package com.dongjian.datacenter.admin.dao.ex;
+
+
+import com.dongjian.datacenter.admin.dao.auto.SysEnvMapper;
+import com.dongjian.datacenter.admin.model.SysEnv;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface SysEnvMapperExt extends SysEnvMapper {
+ SysEnv selectByPrimaryKeyWithCompanyId(String envKey, String companyId);
+}
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicCompanyMapper.xml b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicCompanyMapper.xml
new file mode 100644
index 0000000..9a93e47
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicCompanyMapper.xml
@@ -0,0 +1,583 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+ id, parent_id, company_name, mfa_switch, flag, create_time, creator_id, modify_time,
+ modifier_id, apikey, aurora_flag, aurora_url, aurora_read_url, aurora_username, aurora_password,
+ redis_db_id, third_api_host, lock_switch
+
+
+
+ bearer_token
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ ,
+
+ from basic_company
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ from basic_company
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ select
+
+ ,
+
+ from basic_company
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from basic_company
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from basic_company
+
+
+
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into basic_company (parent_id, company_name, mfa_switch,
+ flag, create_time, creator_id,
+ modify_time, modifier_id, apikey,
+ aurora_flag, aurora_url, aurora_read_url,
+ aurora_username, aurora_password, redis_db_id,
+ third_api_host, lock_switch, bearer_token
+ )
+ values (#{parentId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{mfaSwitch,jdbcType=INTEGER},
+ #{flag,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
+ #{modifyTime,jdbcType=BIGINT}, #{modifierId,jdbcType=BIGINT}, #{apikey,jdbcType=VARCHAR},
+ #{auroraFlag,jdbcType=INTEGER}, #{auroraUrl,jdbcType=VARCHAR}, #{auroraReadUrl,jdbcType=VARCHAR},
+ #{auroraUsername,jdbcType=VARCHAR}, #{auroraPassword,jdbcType=VARCHAR}, #{redisDbId,jdbcType=INTEGER},
+ #{thirdApiHost,jdbcType=VARCHAR}, #{lockSwitch,jdbcType=INTEGER}, #{bearerToken,jdbcType=LONGVARCHAR}
+ )
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into basic_company
+
+
+ parent_id,
+
+
+ company_name,
+
+
+ mfa_switch,
+
+
+ flag,
+
+
+ create_time,
+
+
+ creator_id,
+
+
+ modify_time,
+
+
+ modifier_id,
+
+
+ apikey,
+
+
+ aurora_flag,
+
+
+ aurora_url,
+
+
+ aurora_read_url,
+
+
+ aurora_username,
+
+
+ aurora_password,
+
+
+ redis_db_id,
+
+
+ third_api_host,
+
+
+ lock_switch,
+
+
+ bearer_token,
+
+
+
+
+ #{parentId,jdbcType=BIGINT},
+
+
+ #{companyName,jdbcType=VARCHAR},
+
+
+ #{mfaSwitch,jdbcType=INTEGER},
+
+
+ #{flag,jdbcType=INTEGER},
+
+
+ #{createTime,jdbcType=BIGINT},
+
+
+ #{creatorId,jdbcType=BIGINT},
+
+
+ #{modifyTime,jdbcType=BIGINT},
+
+
+ #{modifierId,jdbcType=BIGINT},
+
+
+ #{apikey,jdbcType=VARCHAR},
+
+
+ #{auroraFlag,jdbcType=INTEGER},
+
+
+ #{auroraUrl,jdbcType=VARCHAR},
+
+
+ #{auroraReadUrl,jdbcType=VARCHAR},
+
+
+ #{auroraUsername,jdbcType=VARCHAR},
+
+
+ #{auroraPassword,jdbcType=VARCHAR},
+
+
+ #{redisDbId,jdbcType=INTEGER},
+
+
+ #{thirdApiHost,jdbcType=VARCHAR},
+
+
+ #{lockSwitch,jdbcType=INTEGER},
+
+
+ #{bearerToken,jdbcType=LONGVARCHAR},
+
+
+
+
+
+ select count(*) from basic_company
+
+
+
+
+
+
+ update basic_company
+
+
+ id = #{record.id,jdbcType=BIGINT},
+
+
+ parent_id = #{record.parentId,jdbcType=BIGINT},
+
+
+ company_name = #{record.companyName,jdbcType=VARCHAR},
+
+
+ mfa_switch = #{record.mfaSwitch,jdbcType=INTEGER},
+
+
+ flag = #{record.flag,jdbcType=INTEGER},
+
+
+ create_time = #{record.createTime,jdbcType=BIGINT},
+
+
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+
+
+ modify_time = #{record.modifyTime,jdbcType=BIGINT},
+
+
+ modifier_id = #{record.modifierId,jdbcType=BIGINT},
+
+
+ apikey = #{record.apikey,jdbcType=VARCHAR},
+
+
+ aurora_flag = #{record.auroraFlag,jdbcType=INTEGER},
+
+
+ aurora_url = #{record.auroraUrl,jdbcType=VARCHAR},
+
+
+ aurora_read_url = #{record.auroraReadUrl,jdbcType=VARCHAR},
+
+
+ aurora_username = #{record.auroraUsername,jdbcType=VARCHAR},
+
+
+ aurora_password = #{record.auroraPassword,jdbcType=VARCHAR},
+
+
+ redis_db_id = #{record.redisDbId,jdbcType=INTEGER},
+
+
+ third_api_host = #{record.thirdApiHost,jdbcType=VARCHAR},
+
+
+ lock_switch = #{record.lockSwitch,jdbcType=INTEGER},
+
+
+ bearer_token = #{record.bearerToken,jdbcType=LONGVARCHAR},
+
+
+
+
+
+
+
+
+ update basic_company
+ set id = #{record.id,jdbcType=BIGINT},
+ parent_id = #{record.parentId,jdbcType=BIGINT},
+ company_name = #{record.companyName,jdbcType=VARCHAR},
+ mfa_switch = #{record.mfaSwitch,jdbcType=INTEGER},
+ flag = #{record.flag,jdbcType=INTEGER},
+ create_time = #{record.createTime,jdbcType=BIGINT},
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+ modify_time = #{record.modifyTime,jdbcType=BIGINT},
+ modifier_id = #{record.modifierId,jdbcType=BIGINT},
+ apikey = #{record.apikey,jdbcType=VARCHAR},
+ aurora_flag = #{record.auroraFlag,jdbcType=INTEGER},
+ aurora_url = #{record.auroraUrl,jdbcType=VARCHAR},
+ aurora_read_url = #{record.auroraReadUrl,jdbcType=VARCHAR},
+ aurora_username = #{record.auroraUsername,jdbcType=VARCHAR},
+ aurora_password = #{record.auroraPassword,jdbcType=VARCHAR},
+ redis_db_id = #{record.redisDbId,jdbcType=INTEGER},
+ third_api_host = #{record.thirdApiHost,jdbcType=VARCHAR},
+ lock_switch = #{record.lockSwitch,jdbcType=INTEGER},
+ bearer_token = #{record.bearerToken,jdbcType=LONGVARCHAR}
+
+
+
+
+
+
+ update basic_company
+ set id = #{record.id,jdbcType=BIGINT},
+ parent_id = #{record.parentId,jdbcType=BIGINT},
+ company_name = #{record.companyName,jdbcType=VARCHAR},
+ mfa_switch = #{record.mfaSwitch,jdbcType=INTEGER},
+ flag = #{record.flag,jdbcType=INTEGER},
+ create_time = #{record.createTime,jdbcType=BIGINT},
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+ modify_time = #{record.modifyTime,jdbcType=BIGINT},
+ modifier_id = #{record.modifierId,jdbcType=BIGINT},
+ apikey = #{record.apikey,jdbcType=VARCHAR},
+ aurora_flag = #{record.auroraFlag,jdbcType=INTEGER},
+ aurora_url = #{record.auroraUrl,jdbcType=VARCHAR},
+ aurora_read_url = #{record.auroraReadUrl,jdbcType=VARCHAR},
+ aurora_username = #{record.auroraUsername,jdbcType=VARCHAR},
+ aurora_password = #{record.auroraPassword,jdbcType=VARCHAR},
+ redis_db_id = #{record.redisDbId,jdbcType=INTEGER},
+ third_api_host = #{record.thirdApiHost,jdbcType=VARCHAR},
+ lock_switch = #{record.lockSwitch,jdbcType=INTEGER}
+
+
+
+
+
+
+ update basic_company
+
+
+ parent_id = #{parentId,jdbcType=BIGINT},
+
+
+ company_name = #{companyName,jdbcType=VARCHAR},
+
+
+ mfa_switch = #{mfaSwitch,jdbcType=INTEGER},
+
+
+ flag = #{flag,jdbcType=INTEGER},
+
+
+ create_time = #{createTime,jdbcType=BIGINT},
+
+
+ creator_id = #{creatorId,jdbcType=BIGINT},
+
+
+ modify_time = #{modifyTime,jdbcType=BIGINT},
+
+
+ modifier_id = #{modifierId,jdbcType=BIGINT},
+
+
+ apikey = #{apikey,jdbcType=VARCHAR},
+
+
+ aurora_flag = #{auroraFlag,jdbcType=INTEGER},
+
+
+ aurora_url = #{auroraUrl,jdbcType=VARCHAR},
+
+
+ aurora_read_url = #{auroraReadUrl,jdbcType=VARCHAR},
+
+
+ aurora_username = #{auroraUsername,jdbcType=VARCHAR},
+
+
+ aurora_password = #{auroraPassword,jdbcType=VARCHAR},
+
+
+ redis_db_id = #{redisDbId,jdbcType=INTEGER},
+
+
+ third_api_host = #{thirdApiHost,jdbcType=VARCHAR},
+
+
+ lock_switch = #{lockSwitch,jdbcType=INTEGER},
+
+
+ bearer_token = #{bearerToken,jdbcType=LONGVARCHAR},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ update basic_company
+ set parent_id = #{parentId,jdbcType=BIGINT},
+ company_name = #{companyName,jdbcType=VARCHAR},
+ mfa_switch = #{mfaSwitch,jdbcType=INTEGER},
+ flag = #{flag,jdbcType=INTEGER},
+ create_time = #{createTime,jdbcType=BIGINT},
+ creator_id = #{creatorId,jdbcType=BIGINT},
+ modify_time = #{modifyTime,jdbcType=BIGINT},
+ modifier_id = #{modifierId,jdbcType=BIGINT},
+ apikey = #{apikey,jdbcType=VARCHAR},
+ aurora_flag = #{auroraFlag,jdbcType=INTEGER},
+ aurora_url = #{auroraUrl,jdbcType=VARCHAR},
+ aurora_read_url = #{auroraReadUrl,jdbcType=VARCHAR},
+ aurora_username = #{auroraUsername,jdbcType=VARCHAR},
+ aurora_password = #{auroraPassword,jdbcType=VARCHAR},
+ redis_db_id = #{redisDbId,jdbcType=INTEGER},
+ third_api_host = #{thirdApiHost,jdbcType=VARCHAR},
+ lock_switch = #{lockSwitch,jdbcType=INTEGER},
+ bearer_token = #{bearerToken,jdbcType=LONGVARCHAR}
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ update basic_company
+ set parent_id = #{parentId,jdbcType=BIGINT},
+ company_name = #{companyName,jdbcType=VARCHAR},
+ mfa_switch = #{mfaSwitch,jdbcType=INTEGER},
+ flag = #{flag,jdbcType=INTEGER},
+ create_time = #{createTime,jdbcType=BIGINT},
+ creator_id = #{creatorId,jdbcType=BIGINT},
+ modify_time = #{modifyTime,jdbcType=BIGINT},
+ modifier_id = #{modifierId,jdbcType=BIGINT},
+ apikey = #{apikey,jdbcType=VARCHAR},
+ aurora_flag = #{auroraFlag,jdbcType=INTEGER},
+ aurora_url = #{auroraUrl,jdbcType=VARCHAR},
+ aurora_read_url = #{auroraReadUrl,jdbcType=VARCHAR},
+ aurora_username = #{auroraUsername,jdbcType=VARCHAR},
+ aurora_password = #{auroraPassword,jdbcType=VARCHAR},
+ redis_db_id = #{redisDbId,jdbcType=INTEGER},
+ third_api_host = #{thirdApiHost,jdbcType=VARCHAR},
+ lock_switch = #{lockSwitch,jdbcType=INTEGER}
+ where id = #{id,jdbcType=BIGINT}
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicMenuMapper.xml b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicMenuMapper.xml
new file mode 100644
index 0000000..c716760
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicMenuMapper.xml
@@ -0,0 +1,335 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+ id, parent_menu_id, menu_name, menu_name_en, menu_name_jp, remark, menu_level, flag,
+ create_time
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ from basic_menu
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ select
+
+ from basic_menu
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from basic_menu
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from basic_menu
+
+
+
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into basic_menu (parent_menu_id, menu_name, menu_name_en,
+ menu_name_jp, remark, menu_level,
+ flag, create_time)
+ values (#{parentMenuId,jdbcType=BIGINT}, #{menuName,jdbcType=VARCHAR}, #{menuNameEn,jdbcType=VARCHAR},
+ #{menuNameJp,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{menuLevel,jdbcType=INTEGER},
+ #{flag,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT})
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into basic_menu
+
+
+ parent_menu_id,
+
+
+ menu_name,
+
+
+ menu_name_en,
+
+
+ menu_name_jp,
+
+
+ remark,
+
+
+ menu_level,
+
+
+ flag,
+
+
+ create_time,
+
+
+
+
+ #{parentMenuId,jdbcType=BIGINT},
+
+
+ #{menuName,jdbcType=VARCHAR},
+
+
+ #{menuNameEn,jdbcType=VARCHAR},
+
+
+ #{menuNameJp,jdbcType=VARCHAR},
+
+
+ #{remark,jdbcType=VARCHAR},
+
+
+ #{menuLevel,jdbcType=INTEGER},
+
+
+ #{flag,jdbcType=INTEGER},
+
+
+ #{createTime,jdbcType=BIGINT},
+
+
+
+
+
+ select count(*) from basic_menu
+
+
+
+
+
+
+ update basic_menu
+
+
+ id = #{record.id,jdbcType=BIGINT},
+
+
+ parent_menu_id = #{record.parentMenuId,jdbcType=BIGINT},
+
+
+ menu_name = #{record.menuName,jdbcType=VARCHAR},
+
+
+ menu_name_en = #{record.menuNameEn,jdbcType=VARCHAR},
+
+
+ menu_name_jp = #{record.menuNameJp,jdbcType=VARCHAR},
+
+
+ remark = #{record.remark,jdbcType=VARCHAR},
+
+
+ menu_level = #{record.menuLevel,jdbcType=INTEGER},
+
+
+ flag = #{record.flag,jdbcType=INTEGER},
+
+
+ create_time = #{record.createTime,jdbcType=BIGINT},
+
+
+
+
+
+
+
+
+ update basic_menu
+ set id = #{record.id,jdbcType=BIGINT},
+ parent_menu_id = #{record.parentMenuId,jdbcType=BIGINT},
+ menu_name = #{record.menuName,jdbcType=VARCHAR},
+ menu_name_en = #{record.menuNameEn,jdbcType=VARCHAR},
+ menu_name_jp = #{record.menuNameJp,jdbcType=VARCHAR},
+ remark = #{record.remark,jdbcType=VARCHAR},
+ menu_level = #{record.menuLevel,jdbcType=INTEGER},
+ flag = #{record.flag,jdbcType=INTEGER},
+ create_time = #{record.createTime,jdbcType=BIGINT}
+
+
+
+
+
+
+ update basic_menu
+
+
+ parent_menu_id = #{parentMenuId,jdbcType=BIGINT},
+
+
+ menu_name = #{menuName,jdbcType=VARCHAR},
+
+
+ menu_name_en = #{menuNameEn,jdbcType=VARCHAR},
+
+
+ menu_name_jp = #{menuNameJp,jdbcType=VARCHAR},
+
+
+ remark = #{remark,jdbcType=VARCHAR},
+
+
+ menu_level = #{menuLevel,jdbcType=INTEGER},
+
+
+ flag = #{flag,jdbcType=INTEGER},
+
+
+ create_time = #{createTime,jdbcType=BIGINT},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ update basic_menu
+ set parent_menu_id = #{parentMenuId,jdbcType=BIGINT},
+ menu_name = #{menuName,jdbcType=VARCHAR},
+ menu_name_en = #{menuNameEn,jdbcType=VARCHAR},
+ menu_name_jp = #{menuNameJp,jdbcType=VARCHAR},
+ remark = #{remark,jdbcType=VARCHAR},
+ menu_level = #{menuLevel,jdbcType=INTEGER},
+ flag = #{flag,jdbcType=INTEGER},
+ create_time = #{createTime,jdbcType=BIGINT}
+ where id = #{id,jdbcType=BIGINT}
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleMapper.xml b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleMapper.xml
new file mode 100644
index 0000000..0ece106
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleMapper.xml
@@ -0,0 +1,335 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+ id, company_id, role_name, description, flag, creator_id, create_time, modifier_id,
+ modify_time
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ from basic_role
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ select
+
+ from basic_role
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from basic_role
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from basic_role
+
+
+
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into basic_role (company_id, role_name, description,
+ flag, creator_id, create_time,
+ modifier_id, modify_time)
+ values (#{companyId,jdbcType=BIGINT}, #{roleName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
+ #{flag,jdbcType=INTEGER}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT},
+ #{modifierId,jdbcType=BIGINT}, #{modifyTime,jdbcType=BIGINT})
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into basic_role
+
+
+ company_id,
+
+
+ role_name,
+
+
+ description,
+
+
+ flag,
+
+
+ creator_id,
+
+
+ create_time,
+
+
+ modifier_id,
+
+
+ modify_time,
+
+
+
+
+ #{companyId,jdbcType=BIGINT},
+
+
+ #{roleName,jdbcType=VARCHAR},
+
+
+ #{description,jdbcType=VARCHAR},
+
+
+ #{flag,jdbcType=INTEGER},
+
+
+ #{creatorId,jdbcType=BIGINT},
+
+
+ #{createTime,jdbcType=BIGINT},
+
+
+ #{modifierId,jdbcType=BIGINT},
+
+
+ #{modifyTime,jdbcType=BIGINT},
+
+
+
+
+
+ select count(*) from basic_role
+
+
+
+
+
+
+ update basic_role
+
+
+ id = #{record.id,jdbcType=BIGINT},
+
+
+ company_id = #{record.companyId,jdbcType=BIGINT},
+
+
+ role_name = #{record.roleName,jdbcType=VARCHAR},
+
+
+ description = #{record.description,jdbcType=VARCHAR},
+
+
+ flag = #{record.flag,jdbcType=INTEGER},
+
+
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+
+
+ create_time = #{record.createTime,jdbcType=BIGINT},
+
+
+ modifier_id = #{record.modifierId,jdbcType=BIGINT},
+
+
+ modify_time = #{record.modifyTime,jdbcType=BIGINT},
+
+
+
+
+
+
+
+
+ update basic_role
+ set id = #{record.id,jdbcType=BIGINT},
+ company_id = #{record.companyId,jdbcType=BIGINT},
+ role_name = #{record.roleName,jdbcType=VARCHAR},
+ description = #{record.description,jdbcType=VARCHAR},
+ flag = #{record.flag,jdbcType=INTEGER},
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+ create_time = #{record.createTime,jdbcType=BIGINT},
+ modifier_id = #{record.modifierId,jdbcType=BIGINT},
+ modify_time = #{record.modifyTime,jdbcType=BIGINT}
+
+
+
+
+
+
+ update basic_role
+
+
+ company_id = #{companyId,jdbcType=BIGINT},
+
+
+ role_name = #{roleName,jdbcType=VARCHAR},
+
+
+ description = #{description,jdbcType=VARCHAR},
+
+
+ flag = #{flag,jdbcType=INTEGER},
+
+
+ creator_id = #{creatorId,jdbcType=BIGINT},
+
+
+ create_time = #{createTime,jdbcType=BIGINT},
+
+
+ modifier_id = #{modifierId,jdbcType=BIGINT},
+
+
+ modify_time = #{modifyTime,jdbcType=BIGINT},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ update basic_role
+ set company_id = #{companyId,jdbcType=BIGINT},
+ role_name = #{roleName,jdbcType=VARCHAR},
+ description = #{description,jdbcType=VARCHAR},
+ flag = #{flag,jdbcType=INTEGER},
+ creator_id = #{creatorId,jdbcType=BIGINT},
+ create_time = #{createTime,jdbcType=BIGINT},
+ modifier_id = #{modifierId,jdbcType=BIGINT},
+ modify_time = #{modifyTime,jdbcType=BIGINT}
+ where id = #{id,jdbcType=BIGINT}
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleMenuRelationMapper.xml b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleMenuRelationMapper.xml
new file mode 100644
index 0000000..9b82090
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleMenuRelationMapper.xml
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+ role_id, menu_id, creator_id, create_time
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ from basic_role_menu_relation
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ delete from basic_role_menu_relation
+
+
+
+
+
+
+ insert into basic_role_menu_relation (role_id, menu_id, creator_id,
+ create_time)
+ values (#{roleId,jdbcType=BIGINT}, #{menuId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
+ #{createTime,jdbcType=BIGINT})
+
+
+
+ insert into basic_role_menu_relation
+
+
+ role_id,
+
+
+ menu_id,
+
+
+ creator_id,
+
+
+ create_time,
+
+
+
+
+ #{roleId,jdbcType=BIGINT},
+
+
+ #{menuId,jdbcType=BIGINT},
+
+
+ #{creatorId,jdbcType=BIGINT},
+
+
+ #{createTime,jdbcType=BIGINT},
+
+
+
+
+
+ select count(*) from basic_role_menu_relation
+
+
+
+
+
+
+ update basic_role_menu_relation
+
+
+ role_id = #{record.roleId,jdbcType=BIGINT},
+
+
+ menu_id = #{record.menuId,jdbcType=BIGINT},
+
+
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+
+
+ create_time = #{record.createTime,jdbcType=BIGINT},
+
+
+
+
+
+
+
+
+ update basic_role_menu_relation
+ set role_id = #{record.roleId,jdbcType=BIGINT},
+ menu_id = #{record.menuId,jdbcType=BIGINT},
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+ create_time = #{record.createTime,jdbcType=BIGINT}
+
+
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleUserRelationMapper.xml b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleUserRelationMapper.xml
new file mode 100644
index 0000000..68f1e73
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicRoleUserRelationMapper.xml
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+ user_id, role_id, creator_id, create_time
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ from basic_role_user_relation
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ delete from basic_role_user_relation
+
+
+
+
+
+
+ insert into basic_role_user_relation (user_id, role_id, creator_id,
+ create_time)
+ values (#{userId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
+ #{createTime,jdbcType=BIGINT})
+
+
+
+ insert into basic_role_user_relation
+
+
+ user_id,
+
+
+ role_id,
+
+
+ creator_id,
+
+
+ create_time,
+
+
+
+
+ #{userId,jdbcType=BIGINT},
+
+
+ #{roleId,jdbcType=BIGINT},
+
+
+ #{creatorId,jdbcType=BIGINT},
+
+
+ #{createTime,jdbcType=BIGINT},
+
+
+
+
+
+ select count(*) from basic_role_user_relation
+
+
+
+
+
+
+ update basic_role_user_relation
+
+
+ user_id = #{record.userId,jdbcType=BIGINT},
+
+
+ role_id = #{record.roleId,jdbcType=BIGINT},
+
+
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+
+
+ create_time = #{record.createTime,jdbcType=BIGINT},
+
+
+
+
+
+
+
+
+ update basic_role_user_relation
+ set user_id = #{record.userId,jdbcType=BIGINT},
+ role_id = #{record.roleId,jdbcType=BIGINT},
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+ create_time = #{record.createTime,jdbcType=BIGINT}
+
+
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicUserMapper.xml b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicUserMapper.xml
new file mode 100644
index 0000000..b85caf8
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/auto/BasicUserMapper.xml
@@ -0,0 +1,494 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+ id, user_type, company_id, username, login_name, `password`, salt, email, mfa_secret,
+ mfa_bind, mobile_number, last_login_time, flag, expire_time, create_time, creator_id,
+ modify_time, modifier_id, super_role
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ from basic_user
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ select
+
+ from basic_user
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from basic_user
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from basic_user
+
+
+
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into basic_user (user_type, company_id, username,
+ login_name, `password`, salt,
+ email, mfa_secret, mfa_bind,
+ mobile_number, last_login_time, flag,
+ expire_time, create_time, creator_id,
+ modify_time, modifier_id, super_role
+ )
+ values (#{userType,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR},
+ #{loginName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR},
+ #{email,jdbcType=VARCHAR}, #{mfaSecret,jdbcType=VARCHAR}, #{mfaBind,jdbcType=INTEGER},
+ #{mobileNumber,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=BIGINT}, #{flag,jdbcType=INTEGER},
+ #{expireTime,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
+ #{modifyTime,jdbcType=BIGINT}, #{modifierId,jdbcType=BIGINT}, #{superRole,jdbcType=INTEGER}
+ )
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into basic_user
+
+
+ user_type,
+
+
+ company_id,
+
+
+ username,
+
+
+ login_name,
+
+
+ `password`,
+
+
+ salt,
+
+
+ email,
+
+
+ mfa_secret,
+
+
+ mfa_bind,
+
+
+ mobile_number,
+
+
+ last_login_time,
+
+
+ flag,
+
+
+ expire_time,
+
+
+ create_time,
+
+
+ creator_id,
+
+
+ modify_time,
+
+
+ modifier_id,
+
+
+ super_role,
+
+
+
+
+ #{userType,jdbcType=INTEGER},
+
+
+ #{companyId,jdbcType=BIGINT},
+
+
+ #{username,jdbcType=VARCHAR},
+
+
+ #{loginName,jdbcType=VARCHAR},
+
+
+ #{password,jdbcType=VARCHAR},
+
+
+ #{salt,jdbcType=VARCHAR},
+
+
+ #{email,jdbcType=VARCHAR},
+
+
+ #{mfaSecret,jdbcType=VARCHAR},
+
+
+ #{mfaBind,jdbcType=INTEGER},
+
+
+ #{mobileNumber,jdbcType=VARCHAR},
+
+
+ #{lastLoginTime,jdbcType=BIGINT},
+
+
+ #{flag,jdbcType=INTEGER},
+
+
+ #{expireTime,jdbcType=BIGINT},
+
+
+ #{createTime,jdbcType=BIGINT},
+
+
+ #{creatorId,jdbcType=BIGINT},
+
+
+ #{modifyTime,jdbcType=BIGINT},
+
+
+ #{modifierId,jdbcType=BIGINT},
+
+
+ #{superRole,jdbcType=INTEGER},
+
+
+
+
+
+ select count(*) from basic_user
+
+
+
+
+
+
+ update basic_user
+
+
+ id = #{record.id,jdbcType=BIGINT},
+
+
+ user_type = #{record.userType,jdbcType=INTEGER},
+
+
+ company_id = #{record.companyId,jdbcType=BIGINT},
+
+
+ username = #{record.username,jdbcType=VARCHAR},
+
+
+ login_name = #{record.loginName,jdbcType=VARCHAR},
+
+
+ `password` = #{record.password,jdbcType=VARCHAR},
+
+
+ salt = #{record.salt,jdbcType=VARCHAR},
+
+
+ email = #{record.email,jdbcType=VARCHAR},
+
+
+ mfa_secret = #{record.mfaSecret,jdbcType=VARCHAR},
+
+
+ mfa_bind = #{record.mfaBind,jdbcType=INTEGER},
+
+
+ mobile_number = #{record.mobileNumber,jdbcType=VARCHAR},
+
+
+ last_login_time = #{record.lastLoginTime,jdbcType=BIGINT},
+
+
+ flag = #{record.flag,jdbcType=INTEGER},
+
+
+ expire_time = #{record.expireTime,jdbcType=BIGINT},
+
+
+ create_time = #{record.createTime,jdbcType=BIGINT},
+
+
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+
+
+ modify_time = #{record.modifyTime,jdbcType=BIGINT},
+
+
+ modifier_id = #{record.modifierId,jdbcType=BIGINT},
+
+
+ super_role = #{record.superRole,jdbcType=INTEGER},
+
+
+
+
+
+
+
+
+ update basic_user
+ set id = #{record.id,jdbcType=BIGINT},
+ user_type = #{record.userType,jdbcType=INTEGER},
+ company_id = #{record.companyId,jdbcType=BIGINT},
+ username = #{record.username,jdbcType=VARCHAR},
+ login_name = #{record.loginName,jdbcType=VARCHAR},
+ `password` = #{record.password,jdbcType=VARCHAR},
+ salt = #{record.salt,jdbcType=VARCHAR},
+ email = #{record.email,jdbcType=VARCHAR},
+ mfa_secret = #{record.mfaSecret,jdbcType=VARCHAR},
+ mfa_bind = #{record.mfaBind,jdbcType=INTEGER},
+ mobile_number = #{record.mobileNumber,jdbcType=VARCHAR},
+ last_login_time = #{record.lastLoginTime,jdbcType=BIGINT},
+ flag = #{record.flag,jdbcType=INTEGER},
+ expire_time = #{record.expireTime,jdbcType=BIGINT},
+ create_time = #{record.createTime,jdbcType=BIGINT},
+ creator_id = #{record.creatorId,jdbcType=BIGINT},
+ modify_time = #{record.modifyTime,jdbcType=BIGINT},
+ modifier_id = #{record.modifierId,jdbcType=BIGINT},
+ super_role = #{record.superRole,jdbcType=INTEGER}
+
+
+
+
+
+
+ update basic_user
+
+
+ user_type = #{userType,jdbcType=INTEGER},
+
+
+ company_id = #{companyId,jdbcType=BIGINT},
+
+
+ username = #{username,jdbcType=VARCHAR},
+
+
+ login_name = #{loginName,jdbcType=VARCHAR},
+
+
+ `password` = #{password,jdbcType=VARCHAR},
+
+
+ salt = #{salt,jdbcType=VARCHAR},
+
+
+ email = #{email,jdbcType=VARCHAR},
+
+
+ mfa_secret = #{mfaSecret,jdbcType=VARCHAR},
+
+
+ mfa_bind = #{mfaBind,jdbcType=INTEGER},
+
+
+ mobile_number = #{mobileNumber,jdbcType=VARCHAR},
+
+
+ last_login_time = #{lastLoginTime,jdbcType=BIGINT},
+
+
+ flag = #{flag,jdbcType=INTEGER},
+
+
+ expire_time = #{expireTime,jdbcType=BIGINT},
+
+
+ create_time = #{createTime,jdbcType=BIGINT},
+
+
+ creator_id = #{creatorId,jdbcType=BIGINT},
+
+
+ modify_time = #{modifyTime,jdbcType=BIGINT},
+
+
+ modifier_id = #{modifierId,jdbcType=BIGINT},
+
+
+ super_role = #{superRole,jdbcType=INTEGER},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ update basic_user
+ set user_type = #{userType,jdbcType=INTEGER},
+ company_id = #{companyId,jdbcType=BIGINT},
+ username = #{username,jdbcType=VARCHAR},
+ login_name = #{loginName,jdbcType=VARCHAR},
+ `password` = #{password,jdbcType=VARCHAR},
+ salt = #{salt,jdbcType=VARCHAR},
+ email = #{email,jdbcType=VARCHAR},
+ mfa_secret = #{mfaSecret,jdbcType=VARCHAR},
+ mfa_bind = #{mfaBind,jdbcType=INTEGER},
+ mobile_number = #{mobileNumber,jdbcType=VARCHAR},
+ last_login_time = #{lastLoginTime,jdbcType=BIGINT},
+ flag = #{flag,jdbcType=INTEGER},
+ expire_time = #{expireTime,jdbcType=BIGINT},
+ create_time = #{createTime,jdbcType=BIGINT},
+ creator_id = #{creatorId,jdbcType=BIGINT},
+ modify_time = #{modifyTime,jdbcType=BIGINT},
+ modifier_id = #{modifierId,jdbcType=BIGINT},
+ super_role = #{superRole,jdbcType=INTEGER}
+ where id = #{id,jdbcType=BIGINT}
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/auto/LoginHistoryMapper.xml b/dongjian-center-admin-dao/src/main/resources/mappers/auto/LoginHistoryMapper.xml
new file mode 100644
index 0000000..39051c8
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/auto/LoginHistoryMapper.xml
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+ id, user_id, request_ip, login_time
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ from login_history
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ select
+
+ from login_history
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from login_history
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ delete from login_history
+
+
+
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into login_history (user_id, request_ip, login_time
+ )
+ values (#{userId,jdbcType=BIGINT}, #{requestIp,jdbcType=VARCHAR}, #{loginTime,jdbcType=BIGINT}
+ )
+
+
+
+
+ SELECT LAST_INSERT_ID()
+
+ insert into login_history
+
+
+ user_id,
+
+
+ request_ip,
+
+
+ login_time,
+
+
+
+
+ #{userId,jdbcType=BIGINT},
+
+
+ #{requestIp,jdbcType=VARCHAR},
+
+
+ #{loginTime,jdbcType=BIGINT},
+
+
+
+
+
+ select count(*) from login_history
+
+
+
+
+
+
+ update login_history
+
+
+ id = #{record.id,jdbcType=BIGINT},
+
+
+ user_id = #{record.userId,jdbcType=BIGINT},
+
+
+ request_ip = #{record.requestIp,jdbcType=VARCHAR},
+
+
+ login_time = #{record.loginTime,jdbcType=BIGINT},
+
+
+
+
+
+
+
+
+ update login_history
+ set id = #{record.id,jdbcType=BIGINT},
+ user_id = #{record.userId,jdbcType=BIGINT},
+ request_ip = #{record.requestIp,jdbcType=VARCHAR},
+ login_time = #{record.loginTime,jdbcType=BIGINT}
+
+
+
+
+
+
+ update login_history
+
+
+ user_id = #{userId,jdbcType=BIGINT},
+
+
+ request_ip = #{requestIp,jdbcType=VARCHAR},
+
+
+ login_time = #{loginTime,jdbcType=BIGINT},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ update login_history
+ set user_id = #{userId,jdbcType=BIGINT},
+ request_ip = #{requestIp,jdbcType=VARCHAR},
+ login_time = #{loginTime,jdbcType=BIGINT}
+ where id = #{id,jdbcType=BIGINT}
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/auto/SysEnvMapper.xml b/dongjian-center-admin-dao/src/main/resources/mappers/auto/SysEnvMapper.xml
new file mode 100644
index 0000000..1d69424
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/auto/SysEnvMapper.xml
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+ env_key, env_value
+
+
+
+ select
+
+ distinct
+
+ 'true' as QUERYID,
+
+ from sys_env
+
+
+
+
+ order by ${orderByClause}
+
+
+
+
+ select
+
+ from sys_env
+ where env_key = #{envKey,jdbcType=VARCHAR}
+
+
+
+ delete from sys_env
+ where env_key = #{envKey,jdbcType=VARCHAR}
+
+
+
+ delete from sys_env
+
+
+
+
+
+
+ insert into sys_env (env_key, env_value)
+ values (#{envKey,jdbcType=VARCHAR}, #{envValue,jdbcType=VARCHAR})
+
+
+
+ insert into sys_env
+
+
+ env_key,
+
+
+ env_value,
+
+
+
+
+ #{envKey,jdbcType=VARCHAR},
+
+
+ #{envValue,jdbcType=VARCHAR},
+
+
+
+
+
+ select count(*) from sys_env
+
+
+
+
+
+
+ update sys_env
+
+
+ env_key = #{record.envKey,jdbcType=VARCHAR},
+
+
+ env_value = #{record.envValue,jdbcType=VARCHAR},
+
+
+
+
+
+
+
+
+ update sys_env
+ set env_key = #{record.envKey,jdbcType=VARCHAR},
+ env_value = #{record.envValue,jdbcType=VARCHAR}
+
+
+
+
+
+
+ update sys_env
+
+
+ env_value = #{envValue,jdbcType=VARCHAR},
+
+
+ where env_key = #{envKey,jdbcType=VARCHAR}
+
+
+
+ update sys_env
+ set env_value = #{envValue,jdbcType=VARCHAR}
+ where env_key = #{envKey,jdbcType=VARCHAR}
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicCompanyMapperExt.xml b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicCompanyMapperExt.xml
new file mode 100644
index 0000000..3018793
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicCompanyMapperExt.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+ SELECT
+ bcom.id
+ FROM
+ basic_company bcom
+ WHERE bcom.flag != 1 and bcom.parent_id IN (${companyIds})
+
+
+
+ SELECT
+ bcom.id,
+ bcom.company_name companyName
+ FROM
+ basic_company bcom
+ WHERE bcom.flag != 1 AND bcom.id IN (${companyIds})
+
+
+
+
+ SELECT
+ COUNT(1)
+ FROM
+ basic_company
+ WHERE
+ flag != 1 AND company_name = #{companyName}
+
+ AND id != #{companyId}
+
+
+
+
+
+ SELECT
+ bcom.id companyId,
+ bcom.company_name companyName,
+ bcom.mfa_switch mfaSwitch,
+ bcom.lock_switch,
+ bcom.apikey,
+ bcom.bearer_token,
+ bcom.third_api_host,
+ parentcom.id parentId,
+ parentcom.company_name parentCompanyName
+ FROM
+ basic_company bcom
+ LEFT JOIN basic_company parentcom ON parentcom.id = bcom.parent_id
+ WHERE
+ bcom.flag != 1 AND bcom.id IN #{item}
+
+ AND bcom.company_name LIKE CONCAT('%',#{companyName},'%')
+
+
+
+
+
+ SELECT
+ bcom.id `key`,
+ bcom.parent_id parentKey,
+ bcom.company_name label
+ FROM
+ basic_company bcom
+ WHERE
+ bcom.flag != 1
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicProjectMapperExt.xml b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicProjectMapperExt.xml
new file mode 100644
index 0000000..e32ed4c
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicProjectMapperExt.xml
@@ -0,0 +1,142 @@
+
+
+
+
+
+ insert into data_center_third_${companyId}.basic_project
+
+
+ company_id,
+
+
+ project_name,
+
+
+ flag,
+
+
+ create_time,
+
+
+ creator_id,
+
+
+ modify_time,
+
+
+ modifier_id,
+
+
+ udf_project_id,
+
+
+
+
+ #{companyId,jdbcType=BIGINT},
+
+
+ #{projectName,jdbcType=VARCHAR},
+
+
+ #{flag,jdbcType=INTEGER},
+
+
+ #{createTime,jdbcType=BIGINT},
+
+
+ #{creatorId,jdbcType=BIGINT},
+
+
+ #{modifyTime,jdbcType=BIGINT},
+
+
+ #{modifierId,jdbcType=BIGINT},
+
+
+ #{udfProjectId,jdbcType=VARCHAR},
+
+
+
+
+
+
+ select
+ id, company_id, project_name, flag, create_time, creator_id, modify_time, modifier_id, udf_project_id
+ from
+ data_center_third_${companyId}.basic_project
+ where id = #{projectId}
+
+
+
+
+ update data_center_third_${companyId}.basic_project
+
+
+ company_id = #{companyId,jdbcType=BIGINT},
+
+
+ project_name = #{projectName,jdbcType=VARCHAR},
+
+
+ flag = #{flag,jdbcType=INTEGER},
+
+
+ create_time = #{createTime,jdbcType=BIGINT},
+
+
+ creator_id = #{creatorId,jdbcType=BIGINT},
+
+
+ modify_time = #{modifyTime,jdbcType=BIGINT},
+
+
+ modifier_id = #{modifierId,jdbcType=BIGINT},
+
+
+ udf_project_id = #{udfProjectId,jdbcType=VARCHAR},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+
+ SELECT
+ COUNT(1)
+ FROM
+ data_center_third_${companyId}.basic_project
+ WHERE
+ flag != 1 AND project_name = #{projectName}
+
+ AND company_id = #{companyId}
+
+
+ AND id != #{projectId}
+
+
+
+
+
+ SELECT
+ bpro.id projectId,
+ bpro.company_id companyId,
+ bcomp.company_name companyName,
+ bpro.project_name projectName,
+ bpro.udf_project_id udfProjectId
+ FROM
+ data_center_third_${companyId}.basic_project bpro
+ INNER JOIN basic_company bcomp ON bcomp.id = bpro.company_id
+ WHERE
+ bpro.flag != 1 AND bcomp.flag != 1
+ AND bpro.company_id = #{companyId}
+
+ AND bpro.id IN #{item}
+
+
+ AND bpro.project_name LIKE CONCAT('%',#{projectName},'%')
+
+ order by bpro.id desc
+
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicRoleMapperExt.xml b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicRoleMapperExt.xml
new file mode 100644
index 0000000..feffa14
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicRoleMapperExt.xml
@@ -0,0 +1,67 @@
+
+
+
+
+
+ SELECT
+ COUNT(1)
+ FROM
+ basic_role brole
+ WHERE
+ brole.flag != 1 AND brole.role_name = #{roleName} AND brole.company_id = #{companyId}
+
+ AND brole.id != #{roleId}
+
+
+
+
+
+
+
+ SELECT
+ brole.id roleId,
+ brole.role_name roleName,
+ brole.description,
+ brole.modify_time modifyTime
+ FROM
+ basic_role brole
+ WHERE
+ brole.flag != 1 AND brole.company_id IN #{item}
+ AND brole.id != IFNULL((SELECT role_id FROM basic_role_user_relation WHERE user_id = #{userId}), -9)
+
+ AND brole.role_name LIKE CONCAT('%',#{roleName},'%')
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicRoleMenuRelationMapperExt.xml b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicRoleMenuRelationMapperExt.xml
new file mode 100644
index 0000000..d66a649
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicRoleMenuRelationMapperExt.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+ INSERT INTO
+ basic_role_menu_relation (role_id, menu_id, creator_id, create_time)
+ VALUES
+
+ (#{roleId}, #{item}, #{creatorId}, #{createTime})
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicUserMapperExt.xml b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicUserMapperExt.xml
new file mode 100644
index 0000000..0dd1884
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/ex/BasicUserMapperExt.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+ SELECT
+ COUNT(1)
+ FROM
+ basic_user buser
+ WHERE
+ buser.flag != 1 AND (buser.login_name = #{loginName})
+
+ AND buser.id != #{userId}
+
+
+
+
+
+ SELECT
+ bcom.id companyId,
+ bcom.company_name companyName,
+ buser.id userId,
+ buser.user_type userType,
+ buser.username username,
+ buser.login_name loginName,
+ buser.email,
+ buser.mfa_bind,
+ buser.mobile_number mobileNumber,
+ buser.create_time createTime,
+ any_value(brole.id) roleId,
+ any_value(brole.role_name) roleName
+ FROM
+ basic_user buser
+ INNER JOIN basic_company bcom ON buser.company_id = bcom.id
+ INNER JOIN basic_role_user_relation brur ON brur.user_id = buser.id
+ INNER JOIN basic_role brole ON brur.role_id = brole.id
+ WHERE
+ buser.flag != 1 AND brole.flag != 1 AND buser.company_id IN #{item}
+
+ AND buser.id != #{userId}
+
+
+ AND buser.user_type = #{userType}
+
+
+ AND (
+ buser.username LIKE CONCAT('%',#{keyword},'%')
+ OR
+ buser.email LIKE CONCAT('%',#{keyword},'%')
+ )
+
+
+
+
+
+
+
+
+ SELECT
+ buser.id,
+ buser.user_type,
+ buser.company_id,
+ buser.username,
+ buser.login_name,
+ buser.`password`,
+ buser.salt,
+ buser.email,
+ buser.mobile_number,
+ buser.mfa_secret,
+ buser.mfa_bind,
+ buser.last_login_time,
+ buser.flag,
+ buser.expire_time,
+ buser.create_time,
+ buser.creator_id,
+ buser.modify_time,
+ buser.modifier_id,
+ buser.super_role,
+ bcom.lock_switch,
+ bcom.parent_id parentCompanyId
+ FROM
+ basic_user buser
+ inner join basic_company bcom on bcom.id = buser.company_id
+ WHERE buser.flag != 1 and buser.user_type = 1 and bcom.flag != 1 and (login_name = #{loginname})
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mappers/ex/SysEnvMapperExt.xml b/dongjian-center-admin-dao/src/main/resources/mappers/ex/SysEnvMapperExt.xml
new file mode 100644
index 0000000..234b468
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mappers/ex/SysEnvMapperExt.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mybatis-generator/generatorConfig.xml b/dongjian-center-admin-dao/src/main/resources/mybatis-generator/generatorConfig.xml
new file mode 100644
index 0000000..5f0506f
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mybatis-generator/generatorConfig.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/mybatis-generator/mybatisGeneratorinit.properties b/dongjian-center-admin-dao/src/main/resources/mybatis-generator/mybatisGeneratorinit.properties
new file mode 100644
index 0000000..8b9516c
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/mybatis-generator/mybatisGeneratorinit.properties
@@ -0,0 +1,7 @@
+#Mybatis Generator configuration
+project =src/main/java
+resources=src/main/resources
+jdbc_driver =com.mysql.cj.jdbc.Driver
+jdbc_url=jdbc:mysql://rm-bp11k2zm2fr7864428o.mysql.rds.aliyuncs.com:3306/data_center_aeon_admin?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+jdbc_user=zhc
+jdbc_password=Youqu48bnb1
\ No newline at end of file
diff --git a/dongjian-center-admin-dao/src/main/resources/page-config.xml b/dongjian-center-admin-dao/src/main/resources/page-config.xml
new file mode 100644
index 0000000..90ae2bc
--- /dev/null
+++ b/dongjian-center-admin-dao/src/main/resources/page-config.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dongjian-center-admin-model/.gitignore b/dongjian-center-admin-model/.gitignore
new file mode 100644
index 0000000..aa23915
--- /dev/null
+++ b/dongjian-center-admin-model/.gitignore
@@ -0,0 +1,15 @@
+/target/
+/logs/
+/.idea/
+*.iml
+*.bak
+*.log
+/.settings/
+*.project
+*.classpath
+*.factorypath
+*.springBeans
+/.apt_generated/
+/.externalToolBuilders/
+/bin/
+application-*.properties
diff --git a/dongjian-center-admin-model/pom.xml b/dongjian-center-admin-model/pom.xml
new file mode 100644
index 0000000..1afa4e1
--- /dev/null
+++ b/dongjian-center-admin-model/pom.xml
@@ -0,0 +1,40 @@
+
+
+ 4.0.0
+
+ com.techsor
+ dongjian-center-admin
+ 0.0.1-SNAPSHOT
+
+ dongjian-center-admin-model
+ dongjian-center-admin-model
+ http://maven.apache.org
+
+ UTF-8
+
+
+
+
+ org.hibernate
+ hibernate-validator
+ 6.1.0.Final
+
+
+ org.glassfish
+ javax.el
+ 3.0.1-b11
+
+
+ org.hibernate
+ hibernate-validator-cdi
+ 6.1.0.Final
+
+
+
+ junit
+ junit
+ test
+
+
+
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/ApikeyInfo.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/ApikeyInfo.java
new file mode 100644
index 0000000..c8d3aff
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/ApikeyInfo.java
@@ -0,0 +1,13 @@
+package com.dongjian.datacenter.admin.aurora;
+
+import lombok.Data;
+
+@Data
+public class ApikeyInfo {
+
+ private String auroraUrl;
+
+ private String auroraUsername;
+
+ private String auroraPassword;
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/DataTarget.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/DataTarget.java
new file mode 100644
index 0000000..ff288c5
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/DataTarget.java
@@ -0,0 +1,29 @@
+package com.dongjian.datacenter.admin.aurora;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import lombok.Data;
+
+@Data
+public class DataTarget {
+
+ private String target_id;
+
+ private List maxData = new ArrayList<>();
+
+ private List minData = new ArrayList<>();
+
+ private List averageData = new ArrayList<>();
+
+ private List startData = new ArrayList<>();
+
+ private List endData = new ArrayList<>();
+
+ private List q1Data = new ArrayList<>();
+
+ private List q2Data = new ArrayList<>();
+
+ private List q3Data = new ArrayList<>();
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/ElementData.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/ElementData.java
new file mode 100644
index 0000000..5f37d00
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/ElementData.java
@@ -0,0 +1,11 @@
+package com.dongjian.datacenter.admin.aurora;
+
+import lombok.Data;
+
+@Data
+public class ElementData {
+
+ private long milliTimestamp;
+ private String time;
+ private Double value;
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/HistoricalDataDTO.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/HistoricalDataDTO.java
new file mode 100644
index 0000000..9c89e81
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/aurora/HistoricalDataDTO.java
@@ -0,0 +1,16 @@
+package com.dongjian.datacenter.admin.aurora;
+
+import lombok.Data;
+
+@Data
+public class HistoricalDataDTO {
+
+ private String rawData;
+
+ private long receiveTs;
+
+ private String targetId;
+
+ private String targetIdMapper;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/BaseSearchNoCompanysParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/BaseSearchNoCompanysParams.java
new file mode 100644
index 0000000..13bcc6e
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/BaseSearchNoCompanysParams.java
@@ -0,0 +1,25 @@
+package com.dongjian.datacenter.admin.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.Jiang
+* @time 2022年4月23日 下午1:55:22
+*/
+@Setter
+@Getter
+public class BaseSearchNoCompanysParams {
+
+ /** 页码 */
+ @Schema(description = "当前页码(默认第一页)",example = "1")
+ private Integer pageNum;
+ /** 每页显示的条数 */
+ @Schema(description = "每页显示的条数(默认20条)", example = "20")
+ private Integer pageSize;
+
+ @Schema(description = "用户ID", hidden = true)
+ private Long userId;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/BaseSearchParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/BaseSearchParams.java
new file mode 100644
index 0000000..e984cab
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/BaseSearchParams.java
@@ -0,0 +1,23 @@
+package com.dongjian.datacenter.admin.dto;
+
+import java.util.List;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.Jiang
+* @time 2022年4月23日 下午1:55:22
+*/
+@Setter
+@Getter
+public class BaseSearchParams extends BaseSearchNoCompanysParams{
+
+ @Schema(description = "查询对象所属企业ID,多个使用逗号连接")
+ private String companyIds;
+
+ @Schema(description = "查询对象所属企业ID", hidden = true)
+ private List companyIdList;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/account/CacheUserData.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/account/CacheUserData.java
new file mode 100644
index 0000000..608a5ee
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/account/CacheUserData.java
@@ -0,0 +1,23 @@
+package com.dongjian.datacenter.admin.dto.account;
+
+import lombok.Data;
+
+/**
+* @author Mr.Jiang
+* @time 2022年5月20日 下午2:08:50
+*/
+@Data
+public class CacheUserData {
+
+ private String accessToken;
+ private Long userId;
+ private Long companyId;
+ private String username;
+ private String loginName;
+ private String password;
+ private Long createTime;
+ private Long expireTime;
+ private String menuIds;
+// private String userGroupIds;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/account/LoginParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/account/LoginParam.java
new file mode 100644
index 0000000..667c745
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/account/LoginParam.java
@@ -0,0 +1,25 @@
+package com.dongjian.datacenter.admin.dto.account;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author Mr.Jiang
+* @time 2022年5月20日 下午7:13:50
+*/
+@Data
+public class LoginParam {
+
+ @Schema(description = "登录名",example = "admin")
+ private String loginname;
+
+ @Schema(description = "密码",example = "123456")
+ private String password;
+
+ @Schema(description = "验证码的请求标识ID",example = "111weyu2-123rt2u1-121ueiu2")
+ private String captchaRequestId;
+
+ @Schema(description = "验证码值",example = "Z3xA")
+ private String captcha;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/common/BaseTransDataEntityMockParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/common/BaseTransDataEntityMockParams.java
new file mode 100644
index 0000000..92f7306
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/common/BaseTransDataEntityMockParams.java
@@ -0,0 +1,20 @@
+package com.dongjian.datacenter.admin.dto.common;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Data
+public class BaseTransDataEntityMockParams {
+
+ @Schema(description = "hashId 32位UUID",example = "25-2121212112-121212-47")
+ private String hashId;
+ @Schema(description = "设备ID",example = "25,47")
+ private Integer id;
+ @Schema(description = "JSON内容",example = "25,47")
+ private String content;
+ @Schema(description = "时间戳",example = "251212121247")
+ private String ts;
+ @Schema(description = "公司名称",example = "ZETA")
+ private String company; //zifisense:纵行, nbi:农博, oviphone:oviphone
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/common/DatacenterV1QueryParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/common/DatacenterV1QueryParams.java
new file mode 100644
index 0000000..ff23dd8
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/common/DatacenterV1QueryParams.java
@@ -0,0 +1,27 @@
+package com.dongjian.datacenter.admin.dto.common;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Data
+public class DatacenterV1QueryParams {
+
+ @Schema(description = "apikey值",example = "25aoy89qu69hnoskj47", required = true)
+ private String apikey;
+
+ @Schema(description = "unix秒时间戳,endTime与startTime需在同一天内",example = "1658761235", required = true)
+ private long startTime;
+
+ @Schema(description = "unix秒时间戳,endTime与startTime需在同一天",example = "1698761235", required = true)
+ private long endTime;
+
+ @Schema(description = "设备ID",example = "bffffff1", required = true)
+ private String deviceId;
+
+ @Schema(description = "hashId 32位UUID",example = "25-2121212112-121212-47")
+ private String hashId;
+
+ @Schema(description = "日期,格式为 2023-10-23",example = "2023-10-23")
+ private String date;
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/CompanySearchParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/CompanySearchParams.java
new file mode 100644
index 0000000..166fe90
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/CompanySearchParams.java
@@ -0,0 +1,24 @@
+package com.dongjian.datacenter.admin.dto.company;
+
+import com.dongjian.datacenter.admin.dto.BaseSearchParams;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author Mr.Jiang
+* @time 2022年7月21日 下午8:50:31
+*/
+@Data
+public class CompanySearchParams extends BaseSearchParams{
+
+ @Schema(description = "企业名",example = "张三李四")
+ private String companyName;
+
+ @Schema(description = "登录账号的企业ID",example = "1", hidden = true)
+ private Long selfCompanyId;
+
+// @Schema(description = "1-未进入系统homepage页面获取,2-点击企业后进入系统后获取",example = "2")
+// private Integer searchType;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/DeleteCompanyParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/DeleteCompanyParams.java
new file mode 100644
index 0000000..27aab19
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/DeleteCompanyParams.java
@@ -0,0 +1,16 @@
+package com.dongjian.datacenter.admin.dto.company;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author Mr.Jiang
+* @time 2022年7月21日 下午8:50:31
+*/
+@Data
+public class DeleteCompanyParams{
+
+ @Schema(description = "企业ID,多个使用半角字符逗号连接",example = "2738967,587")
+ private String companyIds;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/OptCompanyParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/OptCompanyParams.java
new file mode 100644
index 0000000..68066d1
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/company/OptCompanyParams.java
@@ -0,0 +1,38 @@
+package com.dongjian.datacenter.admin.dto.company;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author Mr.Jiang
+* @time 2022年7月21日 下午8:50:31
+*/
+@Data
+public class OptCompanyParams{
+
+ @Schema(description = "企业唯一标识ID,新增时无此参数",example = "2738967")
+ private Long companyId;
+
+ @Schema(description = "父企业ID",example = "2738967", hidden = true)
+ private Long parentId;
+
+ @Schema(description = "企业名称",example = "testAccount1", required = true)
+ private String companyName;
+
+ @Schema(description = "mfa开关,0-关闭,1-开启",example = "1", required = true)
+ private Integer mfaSwitch;
+
+ @Schema(description = "Bearer Token", example = "Bearer Token1111111", required = true)
+ private String bearerToken;
+
+ @Schema(description = "third api host",example = "www.baiduc.com", required = true)
+ private String thirdApiHost;
+
+ @Schema(description = "Lock the account after 5 failed login attempts. 0 - Off, 1 - On", example = "1")
+ private Integer lockSwitch;
+
+// @Schema(description = "企业付费后的使用有效期",example = "1662435718429", required = true)
+// private Long expireTime;
+
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/DeleteProjectParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/DeleteProjectParams.java
new file mode 100644
index 0000000..c6e5bf4
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/DeleteProjectParams.java
@@ -0,0 +1,19 @@
+package com.dongjian.datacenter.admin.dto.project;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author Mr.Jiang
+* @time 2022年7月21日 下午8:50:31
+*/
+@Data
+public class DeleteProjectParams{
+
+ @Schema(description = "项目ID,多个使用半角字符逗号连接",example = "27,587")
+ private String projectIds;
+
+ @Schema(description = "项目所属的企业ID,多个使用半角字符逗号连接",example = "3,4")
+ private String companyIds;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/OptProjectParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/OptProjectParams.java
new file mode 100644
index 0000000..e66db72
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/OptProjectParams.java
@@ -0,0 +1,24 @@
+package com.dongjian.datacenter.admin.dto.project;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author Mr.Jiang
+* @time 2022年7月21日 下午8:50:31
+*/
+@Data
+public class OptProjectParams{
+
+ @Schema(description = "项目唯一标识ID,新增时无此参数",example = "2738967")
+ private Long projectId;
+
+ @Schema(description = "所属企业ID",example = "2738967")
+ private Long companyId;
+
+ @Schema(description = "项目名称",example = "testProject1", required = true)
+ private String projectName;
+
+ @Schema(description = "用户自定义ID",example = "XXXX", required = true)
+ private String udfProjectId;
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/ProjectSearchParams.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/ProjectSearchParams.java
new file mode 100644
index 0000000..a3184ef
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/project/ProjectSearchParams.java
@@ -0,0 +1,28 @@
+package com.dongjian.datacenter.admin.dto.project;
+
+import java.util.List;
+
+import com.dongjian.datacenter.admin.dto.BaseSearchNoCompanysParams;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author Mr.Jiang
+* @time 2022年7月21日 下午8:50:31
+*/
+@Data
+public class ProjectSearchParams extends BaseSearchNoCompanysParams{
+
+ @Schema(description = "项目名",example = "张三李四")
+ private String projectName;
+
+ @Schema(description = "项目id,多个逗号连接",example = "1,47")
+ private String projectIds;
+
+ @Schema(description = "项目id", hidden = true)
+ private List projectIdList;
+
+ @Schema(description = "企业id", required = true)
+ private Long companyId;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/DeleteRoleParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/DeleteRoleParam.java
new file mode 100644
index 0000000..50cc0fd
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/DeleteRoleParam.java
@@ -0,0 +1,18 @@
+package com.dongjian.datacenter.admin.dto.role;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.Jiang
+* @time 2022年4月23日 下午1:59:33
+*/
+@Setter
+@Getter
+public class DeleteRoleParam {
+
+ @Schema(description = "Id,多个使用逗号连接",example = "3,5", required = true)
+ private String roleIds;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/OptRoleParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/OptRoleParam.java
new file mode 100644
index 0000000..ea48bfd
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/OptRoleParam.java
@@ -0,0 +1,32 @@
+package com.dongjian.datacenter.admin.dto.role;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author zhc
+* @time 2022年6月14日10:56:38
+*/
+@Setter
+@Getter
+public class OptRoleParam {
+
+
+ @Schema(description = "角色ID, 新增时无此参数",example = "111", required = false)
+ private Long roleId;
+
+ @Schema(description = "角色名称",example = "管理员", required = true)
+ private String roleName;
+
+ @Schema(description = "描述",example = "这是管理员描述", required = true)
+ private String description;
+
+ @Schema(description = "菜单权限ID,使用逗号连接",example = "1,4,5,6", required = true)
+ private String menuIds;
+
+ @Schema(description = "所属企业ID",example = "2", hidden = true)
+ private Long companyId;
+
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/PageSearchParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/PageSearchParam.java
new file mode 100644
index 0000000..b9fbb66
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/role/PageSearchParam.java
@@ -0,0 +1,21 @@
+package com.dongjian.datacenter.admin.dto.role;
+
+import com.dongjian.datacenter.admin.dto.BaseSearchParams;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.zhc
+* @time 2022年7月27日12:06:35
+*/
+@Setter
+@Getter
+public class PageSearchParam extends BaseSearchParams{
+
+ @Schema(description = "角色名",example = "test", required = false)
+ private String roleName;
+
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/sysenv/SysEnvEditParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/sysenv/SysEnvEditParam.java
new file mode 100644
index 0000000..7663010
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/sysenv/SysEnvEditParam.java
@@ -0,0 +1,17 @@
+package com.dongjian.datacenter.admin.dto.sysenv;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author zhc
+* @time 2024年6月30日
+*/
+@Data
+public class SysEnvEditParam {
+ @Schema(description = "system environment key", example = "loytech")
+ private String envKey;
+
+ @Schema(description = "system environment value", example = "loytech")
+ private String envValue;
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/sysenv/SysEnvQueryParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/sysenv/SysEnvQueryParam.java
new file mode 100644
index 0000000..87e97ce
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/sysenv/SysEnvQueryParam.java
@@ -0,0 +1,15 @@
+package com.dongjian.datacenter.admin.dto.sysenv;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+* @author zhc
+* @time 2024年6月30日
+*/
+@Data
+public class SysEnvQueryParam {
+ @Schema(description = "system environment key", example = "loytech")
+ private String envKey;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/DeleteUserParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/DeleteUserParam.java
new file mode 100644
index 0000000..09a3caa
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/DeleteUserParam.java
@@ -0,0 +1,18 @@
+package com.dongjian.datacenter.admin.dto.user;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.Jiang
+* @time 2022年4月23日 下午1:59:33
+*/
+@Setter
+@Getter
+public class DeleteUserParam {
+
+ @Schema(description = "Id,多个使用逗号连接",example = "3,5", required = true)
+ private String userIds;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/ModifyPassword.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/ModifyPassword.java
new file mode 100644
index 0000000..54426bd
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/ModifyPassword.java
@@ -0,0 +1,21 @@
+package com.dongjian.datacenter.admin.dto.user;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.Jiang
+* @time 2022年4月23日 下午1:59:33
+*/
+@Setter
+@Getter
+public class ModifyPassword{
+
+ @Schema(description = "旧密码",example = "haoihg09278", required = true)
+ private String oldPassword;
+
+ @Schema(description = "新密码",example = "og.ayhgih", required = true)
+ private String newPassword;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/OptUserParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/OptUserParam.java
new file mode 100644
index 0000000..105d78a
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/OptUserParam.java
@@ -0,0 +1,41 @@
+package com.dongjian.datacenter.admin.dto.user;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author zhc
+* @time 2022年6月14日10:56:38
+*/
+@Setter
+@Getter
+public class OptUserParam {
+
+
+ @Schema(description = "用户ID, 新增时无此参数",example = "111", required = false)
+ private Long userId;
+
+ @Schema(description = "用户类型,1-管理平台用户,2-普通平台用户",example = "2", required = true)
+ private Integer userType;
+
+ @Schema(description = "角色ID",example = "24", required = false)
+ private Long roleId;
+
+ @Schema(description = "用户名",example = "管理员", required = true)
+ private String username;
+
+ @Schema(description = "登录名",example = "adminmin", hidden = true)
+ private String loginName;
+
+ @Schema(description = "用户邮箱",example = "1057897@qq.com", required = true)
+ private String email;
+
+ @Schema(description = "手机号码,这里要加上国际区号,比如日本是+81,传给后台的就是+81-08041165856,中国是+86,传给后台的就是+86-18841165856",example = "+81-08041165856", required = false)
+ private String mobileNumber;
+
+ @Schema(description = "所属企业ID",example = "2", hidden = true)
+ private Long companyId;
+
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/PageSearchParam.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/PageSearchParam.java
new file mode 100644
index 0000000..94cb13b
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/PageSearchParam.java
@@ -0,0 +1,23 @@
+package com.dongjian.datacenter.admin.dto.user;
+
+import com.dongjian.datacenter.admin.dto.BaseSearchParams;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.zhc
+* @time 2022年7月27日12:06:35
+*/
+@Setter
+@Getter
+public class PageSearchParam extends BaseSearchParams{
+
+ @Schema(description = "用户名/用户邮箱",example = "test", required = false)
+ private String keyword;
+
+ @Schema(description = "用户类型,1-管理平台用户,2-普通平台用户",example = "2", required = false)
+ private Integer userType;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/ResetPassword.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/ResetPassword.java
new file mode 100644
index 0000000..ab5e029
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/ResetPassword.java
@@ -0,0 +1,21 @@
+package com.dongjian.datacenter.admin.dto.user;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.Jiang
+* @time 2022年4月23日 下午1:59:33
+*/
+@Setter
+@Getter
+public class ResetPassword{
+
+ @Schema(description = "Id,多个使用逗号连接",example = "3,5", required = true)
+ private String userIds;
+
+// @Schema(description = "重置密码方式 1-管理员直接重置密码,账号邮箱接收该密码,2-发送重置密码链接到绑定的账户邮箱中,用户自己重置密码",example = "2", required = true)
+// private Integer resetType = 1;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/SwitchMfaBind.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/SwitchMfaBind.java
new file mode 100644
index 0000000..41078ef
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/dto/user/SwitchMfaBind.java
@@ -0,0 +1,18 @@
+package com.dongjian.datacenter.admin.dto.user;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+* @author Mr.Jiang
+* @time 2022年4月23日 下午1:59:33
+*/
+@Setter
+@Getter
+public class SwitchMfaBind{
+
+ @Schema(description = "Id,多个使用逗号连接",example = "3,5", required = true)
+ private String userIds;
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/AlertNotificationMethod.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/AlertNotificationMethod.java
new file mode 100644
index 0000000..187e9cd
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/AlertNotificationMethod.java
@@ -0,0 +1,27 @@
+package com.dongjian.datacenter.admin.enums;
+
+public enum AlertNotificationMethod {
+ api("api"),
+ mail("mail"),
+ apiAndMail("api&mail");
+
+ private final String value;
+
+ AlertNotificationMethod(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ // 可选:根据字符串值找到对应的枚举值
+ public static AlertNotificationMethod fromString(String text) {
+ for (AlertNotificationMethod method : AlertNotificationMethod.values()) {
+ if (method.value.equalsIgnoreCase(text)) {
+ return method;
+ }
+ }
+ throw new IllegalArgumentException("No constant with text " + text + " found");
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/DataSourceMethodEnum.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/DataSourceMethodEnum.java
new file mode 100644
index 0000000..c8897e7
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/DataSourceMethodEnum.java
@@ -0,0 +1,20 @@
+package com.dongjian.datacenter.admin.enums;
+
+public enum DataSourceMethodEnum {
+
+ MQTT("0"),
+ RESTFUL("1");
+
+ private String methodType;
+ DataSourceMethodEnum(String methodType) {
+ this.methodType = methodType;
+ }
+
+ public String getMethodType() {
+ return methodType;
+ }
+
+ public void setMethodType(String methodType) {
+ this.methodType = methodType;
+ }
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/DataSourceStateEnum.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/DataSourceStateEnum.java
new file mode 100644
index 0000000..2de3674
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/enums/DataSourceStateEnum.java
@@ -0,0 +1,21 @@
+package com.dongjian.datacenter.admin.enums;
+
+public enum DataSourceStateEnum {
+
+ ACTIVATE("0"),
+ FREEZE("1");
+
+
+ private String state;
+
+ DataSourceStateEnum(String state) {
+ this.state = state;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+
+
+}
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicCompany.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicCompany.java
new file mode 100644
index 0000000..71c298b
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicCompany.java
@@ -0,0 +1,676 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.io.Serializable;
+
+public class BasicCompany implements Serializable {
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.id
+ *
+ * @mbg.generated
+ */
+ private Long id;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.parent_id
+ *
+ * @mbg.generated
+ */
+ private Long parentId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.company_name
+ *
+ * @mbg.generated
+ */
+ private String companyName;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.mfa_switch
+ *
+ * @mbg.generated
+ */
+ private Integer mfaSwitch;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.flag
+ *
+ * @mbg.generated
+ */
+ private Integer flag;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.create_time
+ *
+ * @mbg.generated
+ */
+ private Long createTime;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.creator_id
+ *
+ * @mbg.generated
+ */
+ private Long creatorId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.modify_time
+ *
+ * @mbg.generated
+ */
+ private Long modifyTime;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.modifier_id
+ *
+ * @mbg.generated
+ */
+ private Long modifierId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.apikey
+ *
+ * @mbg.generated
+ */
+ private String apikey;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.aurora_flag
+ *
+ * @mbg.generated
+ */
+ private Integer auroraFlag;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.aurora_url
+ *
+ * @mbg.generated
+ */
+ private String auroraUrl;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.aurora_read_url
+ *
+ * @mbg.generated
+ */
+ private String auroraReadUrl;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.aurora_username
+ *
+ * @mbg.generated
+ */
+ private String auroraUsername;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.aurora_password
+ *
+ * @mbg.generated
+ */
+ private String auroraPassword;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.redis_db_id
+ *
+ * @mbg.generated
+ */
+ private Integer redisDbId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.third_api_host
+ *
+ * @mbg.generated
+ */
+ private String thirdApiHost;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.lock_switch
+ *
+ * @mbg.generated
+ */
+ private Integer lockSwitch;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_company.bearer_token
+ *
+ * @mbg.generated
+ */
+ private String bearerToken;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.id
+ *
+ * @return the value of basic_company.id
+ *
+ * @mbg.generated
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.id
+ *
+ * @param id the value for basic_company.id
+ *
+ * @mbg.generated
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.parent_id
+ *
+ * @return the value of basic_company.parent_id
+ *
+ * @mbg.generated
+ */
+ public Long getParentId() {
+ return parentId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.parent_id
+ *
+ * @param parentId the value for basic_company.parent_id
+ *
+ * @mbg.generated
+ */
+ public void setParentId(Long parentId) {
+ this.parentId = parentId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.company_name
+ *
+ * @return the value of basic_company.company_name
+ *
+ * @mbg.generated
+ */
+ public String getCompanyName() {
+ return companyName;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.company_name
+ *
+ * @param companyName the value for basic_company.company_name
+ *
+ * @mbg.generated
+ */
+ public void setCompanyName(String companyName) {
+ this.companyName = companyName == null ? null : companyName.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.mfa_switch
+ *
+ * @return the value of basic_company.mfa_switch
+ *
+ * @mbg.generated
+ */
+ public Integer getMfaSwitch() {
+ return mfaSwitch;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.mfa_switch
+ *
+ * @param mfaSwitch the value for basic_company.mfa_switch
+ *
+ * @mbg.generated
+ */
+ public void setMfaSwitch(Integer mfaSwitch) {
+ this.mfaSwitch = mfaSwitch;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.flag
+ *
+ * @return the value of basic_company.flag
+ *
+ * @mbg.generated
+ */
+ public Integer getFlag() {
+ return flag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.flag
+ *
+ * @param flag the value for basic_company.flag
+ *
+ * @mbg.generated
+ */
+ public void setFlag(Integer flag) {
+ this.flag = flag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.create_time
+ *
+ * @return the value of basic_company.create_time
+ *
+ * @mbg.generated
+ */
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.create_time
+ *
+ * @param createTime the value for basic_company.create_time
+ *
+ * @mbg.generated
+ */
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.creator_id
+ *
+ * @return the value of basic_company.creator_id
+ *
+ * @mbg.generated
+ */
+ public Long getCreatorId() {
+ return creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.creator_id
+ *
+ * @param creatorId the value for basic_company.creator_id
+ *
+ * @mbg.generated
+ */
+ public void setCreatorId(Long creatorId) {
+ this.creatorId = creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.modify_time
+ *
+ * @return the value of basic_company.modify_time
+ *
+ * @mbg.generated
+ */
+ public Long getModifyTime() {
+ return modifyTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.modify_time
+ *
+ * @param modifyTime the value for basic_company.modify_time
+ *
+ * @mbg.generated
+ */
+ public void setModifyTime(Long modifyTime) {
+ this.modifyTime = modifyTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.modifier_id
+ *
+ * @return the value of basic_company.modifier_id
+ *
+ * @mbg.generated
+ */
+ public Long getModifierId() {
+ return modifierId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.modifier_id
+ *
+ * @param modifierId the value for basic_company.modifier_id
+ *
+ * @mbg.generated
+ */
+ public void setModifierId(Long modifierId) {
+ this.modifierId = modifierId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.apikey
+ *
+ * @return the value of basic_company.apikey
+ *
+ * @mbg.generated
+ */
+ public String getApikey() {
+ return apikey;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.apikey
+ *
+ * @param apikey the value for basic_company.apikey
+ *
+ * @mbg.generated
+ */
+ public void setApikey(String apikey) {
+ this.apikey = apikey == null ? null : apikey.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.aurora_flag
+ *
+ * @return the value of basic_company.aurora_flag
+ *
+ * @mbg.generated
+ */
+ public Integer getAuroraFlag() {
+ return auroraFlag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.aurora_flag
+ *
+ * @param auroraFlag the value for basic_company.aurora_flag
+ *
+ * @mbg.generated
+ */
+ public void setAuroraFlag(Integer auroraFlag) {
+ this.auroraFlag = auroraFlag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.aurora_url
+ *
+ * @return the value of basic_company.aurora_url
+ *
+ * @mbg.generated
+ */
+ public String getAuroraUrl() {
+ return auroraUrl;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.aurora_url
+ *
+ * @param auroraUrl the value for basic_company.aurora_url
+ *
+ * @mbg.generated
+ */
+ public void setAuroraUrl(String auroraUrl) {
+ this.auroraUrl = auroraUrl == null ? null : auroraUrl.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.aurora_read_url
+ *
+ * @return the value of basic_company.aurora_read_url
+ *
+ * @mbg.generated
+ */
+ public String getAuroraReadUrl() {
+ return auroraReadUrl;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.aurora_read_url
+ *
+ * @param auroraReadUrl the value for basic_company.aurora_read_url
+ *
+ * @mbg.generated
+ */
+ public void setAuroraReadUrl(String auroraReadUrl) {
+ this.auroraReadUrl = auroraReadUrl == null ? null : auroraReadUrl.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.aurora_username
+ *
+ * @return the value of basic_company.aurora_username
+ *
+ * @mbg.generated
+ */
+ public String getAuroraUsername() {
+ return auroraUsername;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.aurora_username
+ *
+ * @param auroraUsername the value for basic_company.aurora_username
+ *
+ * @mbg.generated
+ */
+ public void setAuroraUsername(String auroraUsername) {
+ this.auroraUsername = auroraUsername == null ? null : auroraUsername.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.aurora_password
+ *
+ * @return the value of basic_company.aurora_password
+ *
+ * @mbg.generated
+ */
+ public String getAuroraPassword() {
+ return auroraPassword;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.aurora_password
+ *
+ * @param auroraPassword the value for basic_company.aurora_password
+ *
+ * @mbg.generated
+ */
+ public void setAuroraPassword(String auroraPassword) {
+ this.auroraPassword = auroraPassword == null ? null : auroraPassword.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.redis_db_id
+ *
+ * @return the value of basic_company.redis_db_id
+ *
+ * @mbg.generated
+ */
+ public Integer getRedisDbId() {
+ return redisDbId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.redis_db_id
+ *
+ * @param redisDbId the value for basic_company.redis_db_id
+ *
+ * @mbg.generated
+ */
+ public void setRedisDbId(Integer redisDbId) {
+ this.redisDbId = redisDbId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.third_api_host
+ *
+ * @return the value of basic_company.third_api_host
+ *
+ * @mbg.generated
+ */
+ public String getThirdApiHost() {
+ return thirdApiHost;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.third_api_host
+ *
+ * @param thirdApiHost the value for basic_company.third_api_host
+ *
+ * @mbg.generated
+ */
+ public void setThirdApiHost(String thirdApiHost) {
+ this.thirdApiHost = thirdApiHost == null ? null : thirdApiHost.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.lock_switch
+ *
+ * @return the value of basic_company.lock_switch
+ *
+ * @mbg.generated
+ */
+ public Integer getLockSwitch() {
+ return lockSwitch;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.lock_switch
+ *
+ * @param lockSwitch the value for basic_company.lock_switch
+ *
+ * @mbg.generated
+ */
+ public void setLockSwitch(Integer lockSwitch) {
+ this.lockSwitch = lockSwitch;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_company.bearer_token
+ *
+ * @return the value of basic_company.bearer_token
+ *
+ * @mbg.generated
+ */
+ public String getBearerToken() {
+ return bearerToken;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_company.bearer_token
+ *
+ * @param bearerToken the value for basic_company.bearer_token
+ *
+ * @mbg.generated
+ */
+ public void setBearerToken(String bearerToken) {
+ this.bearerToken = bearerToken == null ? null : bearerToken.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", parentId=").append(parentId);
+ sb.append(", companyName=").append(companyName);
+ sb.append(", mfaSwitch=").append(mfaSwitch);
+ sb.append(", flag=").append(flag);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", creatorId=").append(creatorId);
+ sb.append(", modifyTime=").append(modifyTime);
+ sb.append(", modifierId=").append(modifierId);
+ sb.append(", apikey=").append(apikey);
+ sb.append(", auroraFlag=").append(auroraFlag);
+ sb.append(", auroraUrl=").append(auroraUrl);
+ sb.append(", auroraReadUrl=").append(auroraReadUrl);
+ sb.append(", auroraUsername=").append(auroraUsername);
+ sb.append(", auroraPassword=").append(auroraPassword);
+ sb.append(", redisDbId=").append(redisDbId);
+ sb.append(", thirdApiHost=").append(thirdApiHost);
+ sb.append(", lockSwitch=").append(lockSwitch);
+ sb.append(", bearerToken=").append(bearerToken);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicCompanyExample.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicCompanyExample.java
new file mode 100644
index 0000000..ef7d998
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicCompanyExample.java
@@ -0,0 +1,1452 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BasicCompanyExample {
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ protected String orderByClause;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ protected boolean distinct;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public BasicCompanyExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(Long value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(Long value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(Long value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(Long value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(Long value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(Long value1, Long value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(Long value1, Long value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdIsNull() {
+ addCriterion("parent_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdIsNotNull() {
+ addCriterion("parent_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdEqualTo(Long value) {
+ addCriterion("parent_id =", value, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdNotEqualTo(Long value) {
+ addCriterion("parent_id <>", value, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdGreaterThan(Long value) {
+ addCriterion("parent_id >", value, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("parent_id >=", value, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdLessThan(Long value) {
+ addCriterion("parent_id <", value, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdLessThanOrEqualTo(Long value) {
+ addCriterion("parent_id <=", value, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdIn(List values) {
+ addCriterion("parent_id in", values, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdNotIn(List values) {
+ addCriterion("parent_id not in", values, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdBetween(Long value1, Long value2) {
+ addCriterion("parent_id between", value1, value2, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentIdNotBetween(Long value1, Long value2) {
+ addCriterion("parent_id not between", value1, value2, "parentId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameIsNull() {
+ addCriterion("company_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameIsNotNull() {
+ addCriterion("company_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameEqualTo(String value) {
+ addCriterion("company_name =", value, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameNotEqualTo(String value) {
+ addCriterion("company_name <>", value, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameGreaterThan(String value) {
+ addCriterion("company_name >", value, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameGreaterThanOrEqualTo(String value) {
+ addCriterion("company_name >=", value, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameLessThan(String value) {
+ addCriterion("company_name <", value, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameLessThanOrEqualTo(String value) {
+ addCriterion("company_name <=", value, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameLike(String value) {
+ addCriterion("company_name like", value, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameNotLike(String value) {
+ addCriterion("company_name not like", value, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameIn(List values) {
+ addCriterion("company_name in", values, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameNotIn(List values) {
+ addCriterion("company_name not in", values, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameBetween(String value1, String value2) {
+ addCriterion("company_name between", value1, value2, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyNameNotBetween(String value1, String value2) {
+ addCriterion("company_name not between", value1, value2, "companyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchIsNull() {
+ addCriterion("mfa_switch is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchIsNotNull() {
+ addCriterion("mfa_switch is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchEqualTo(Integer value) {
+ addCriterion("mfa_switch =", value, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchNotEqualTo(Integer value) {
+ addCriterion("mfa_switch <>", value, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchGreaterThan(Integer value) {
+ addCriterion("mfa_switch >", value, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchGreaterThanOrEqualTo(Integer value) {
+ addCriterion("mfa_switch >=", value, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchLessThan(Integer value) {
+ addCriterion("mfa_switch <", value, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchLessThanOrEqualTo(Integer value) {
+ addCriterion("mfa_switch <=", value, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchIn(List values) {
+ addCriterion("mfa_switch in", values, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchNotIn(List values) {
+ addCriterion("mfa_switch not in", values, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchBetween(Integer value1, Integer value2) {
+ addCriterion("mfa_switch between", value1, value2, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSwitchNotBetween(Integer value1, Integer value2) {
+ addCriterion("mfa_switch not between", value1, value2, "mfaSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIsNull() {
+ addCriterion("flag is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIsNotNull() {
+ addCriterion("flag is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagEqualTo(Integer value) {
+ addCriterion("flag =", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotEqualTo(Integer value) {
+ addCriterion("flag <>", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagGreaterThan(Integer value) {
+ addCriterion("flag >", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagGreaterThanOrEqualTo(Integer value) {
+ addCriterion("flag >=", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagLessThan(Integer value) {
+ addCriterion("flag <", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagLessThanOrEqualTo(Integer value) {
+ addCriterion("flag <=", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIn(List values) {
+ addCriterion("flag in", values, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotIn(List values) {
+ addCriterion("flag not in", values, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagBetween(Integer value1, Integer value2) {
+ addCriterion("flag between", value1, value2, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotBetween(Integer value1, Integer value2) {
+ addCriterion("flag not between", value1, value2, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Long value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Long value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Long value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Long value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Long value1, Long value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNull() {
+ addCriterion("creator_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNotNull() {
+ addCriterion("creator_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdEqualTo(Long value) {
+ addCriterion("creator_id =", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotEqualTo(Long value) {
+ addCriterion("creator_id <>", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThan(Long value) {
+ addCriterion("creator_id >", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("creator_id >=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThan(Long value) {
+ addCriterion("creator_id <", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
+ addCriterion("creator_id <=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIn(List values) {
+ addCriterion("creator_id in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotIn(List values) {
+ addCriterion("creator_id not in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdBetween(Long value1, Long value2) {
+ addCriterion("creator_id between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
+ addCriterion("creator_id not between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIsNull() {
+ addCriterion("modify_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIsNotNull() {
+ addCriterion("modify_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeEqualTo(Long value) {
+ addCriterion("modify_time =", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotEqualTo(Long value) {
+ addCriterion("modify_time <>", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeGreaterThan(Long value) {
+ addCriterion("modify_time >", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("modify_time >=", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeLessThan(Long value) {
+ addCriterion("modify_time <", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeLessThanOrEqualTo(Long value) {
+ addCriterion("modify_time <=", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIn(List values) {
+ addCriterion("modify_time in", values, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotIn(List values) {
+ addCriterion("modify_time not in", values, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeBetween(Long value1, Long value2) {
+ addCriterion("modify_time between", value1, value2, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotBetween(Long value1, Long value2) {
+ addCriterion("modify_time not between", value1, value2, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIsNull() {
+ addCriterion("modifier_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIsNotNull() {
+ addCriterion("modifier_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdEqualTo(Long value) {
+ addCriterion("modifier_id =", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdNotEqualTo(Long value) {
+ addCriterion("modifier_id <>", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdGreaterThan(Long value) {
+ addCriterion("modifier_id >", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("modifier_id >=", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdLessThan(Long value) {
+ addCriterion("modifier_id <", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdLessThanOrEqualTo(Long value) {
+ addCriterion("modifier_id <=", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIn(List values) {
+ addCriterion("modifier_id in", values, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdNotIn(List values) {
+ addCriterion("modifier_id not in", values, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdBetween(Long value1, Long value2) {
+ addCriterion("modifier_id between", value1, value2, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdNotBetween(Long value1, Long value2) {
+ addCriterion("modifier_id not between", value1, value2, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyIsNull() {
+ addCriterion("apikey is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyIsNotNull() {
+ addCriterion("apikey is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyEqualTo(String value) {
+ addCriterion("apikey =", value, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyNotEqualTo(String value) {
+ addCriterion("apikey <>", value, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyGreaterThan(String value) {
+ addCriterion("apikey >", value, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyGreaterThanOrEqualTo(String value) {
+ addCriterion("apikey >=", value, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyLessThan(String value) {
+ addCriterion("apikey <", value, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyLessThanOrEqualTo(String value) {
+ addCriterion("apikey <=", value, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyLike(String value) {
+ addCriterion("apikey like", value, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyNotLike(String value) {
+ addCriterion("apikey not like", value, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyIn(List values) {
+ addCriterion("apikey in", values, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyNotIn(List values) {
+ addCriterion("apikey not in", values, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyBetween(String value1, String value2) {
+ addCriterion("apikey between", value1, value2, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andApikeyNotBetween(String value1, String value2) {
+ addCriterion("apikey not between", value1, value2, "apikey");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagIsNull() {
+ addCriterion("aurora_flag is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagIsNotNull() {
+ addCriterion("aurora_flag is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagEqualTo(Integer value) {
+ addCriterion("aurora_flag =", value, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagNotEqualTo(Integer value) {
+ addCriterion("aurora_flag <>", value, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagGreaterThan(Integer value) {
+ addCriterion("aurora_flag >", value, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagGreaterThanOrEqualTo(Integer value) {
+ addCriterion("aurora_flag >=", value, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagLessThan(Integer value) {
+ addCriterion("aurora_flag <", value, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagLessThanOrEqualTo(Integer value) {
+ addCriterion("aurora_flag <=", value, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagIn(List values) {
+ addCriterion("aurora_flag in", values, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagNotIn(List values) {
+ addCriterion("aurora_flag not in", values, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagBetween(Integer value1, Integer value2) {
+ addCriterion("aurora_flag between", value1, value2, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraFlagNotBetween(Integer value1, Integer value2) {
+ addCriterion("aurora_flag not between", value1, value2, "auroraFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlIsNull() {
+ addCriterion("aurora_url is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlIsNotNull() {
+ addCriterion("aurora_url is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlEqualTo(String value) {
+ addCriterion("aurora_url =", value, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlNotEqualTo(String value) {
+ addCriterion("aurora_url <>", value, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlGreaterThan(String value) {
+ addCriterion("aurora_url >", value, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlGreaterThanOrEqualTo(String value) {
+ addCriterion("aurora_url >=", value, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlLessThan(String value) {
+ addCriterion("aurora_url <", value, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlLessThanOrEqualTo(String value) {
+ addCriterion("aurora_url <=", value, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlLike(String value) {
+ addCriterion("aurora_url like", value, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlNotLike(String value) {
+ addCriterion("aurora_url not like", value, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlIn(List values) {
+ addCriterion("aurora_url in", values, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlNotIn(List values) {
+ addCriterion("aurora_url not in", values, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlBetween(String value1, String value2) {
+ addCriterion("aurora_url between", value1, value2, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUrlNotBetween(String value1, String value2) {
+ addCriterion("aurora_url not between", value1, value2, "auroraUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlIsNull() {
+ addCriterion("aurora_read_url is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlIsNotNull() {
+ addCriterion("aurora_read_url is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlEqualTo(String value) {
+ addCriterion("aurora_read_url =", value, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlNotEqualTo(String value) {
+ addCriterion("aurora_read_url <>", value, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlGreaterThan(String value) {
+ addCriterion("aurora_read_url >", value, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlGreaterThanOrEqualTo(String value) {
+ addCriterion("aurora_read_url >=", value, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlLessThan(String value) {
+ addCriterion("aurora_read_url <", value, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlLessThanOrEqualTo(String value) {
+ addCriterion("aurora_read_url <=", value, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlLike(String value) {
+ addCriterion("aurora_read_url like", value, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlNotLike(String value) {
+ addCriterion("aurora_read_url not like", value, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlIn(List values) {
+ addCriterion("aurora_read_url in", values, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlNotIn(List values) {
+ addCriterion("aurora_read_url not in", values, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlBetween(String value1, String value2) {
+ addCriterion("aurora_read_url between", value1, value2, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraReadUrlNotBetween(String value1, String value2) {
+ addCriterion("aurora_read_url not between", value1, value2, "auroraReadUrl");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameIsNull() {
+ addCriterion("aurora_username is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameIsNotNull() {
+ addCriterion("aurora_username is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameEqualTo(String value) {
+ addCriterion("aurora_username =", value, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameNotEqualTo(String value) {
+ addCriterion("aurora_username <>", value, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameGreaterThan(String value) {
+ addCriterion("aurora_username >", value, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameGreaterThanOrEqualTo(String value) {
+ addCriterion("aurora_username >=", value, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameLessThan(String value) {
+ addCriterion("aurora_username <", value, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameLessThanOrEqualTo(String value) {
+ addCriterion("aurora_username <=", value, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameLike(String value) {
+ addCriterion("aurora_username like", value, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameNotLike(String value) {
+ addCriterion("aurora_username not like", value, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameIn(List values) {
+ addCriterion("aurora_username in", values, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameNotIn(List values) {
+ addCriterion("aurora_username not in", values, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameBetween(String value1, String value2) {
+ addCriterion("aurora_username between", value1, value2, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraUsernameNotBetween(String value1, String value2) {
+ addCriterion("aurora_username not between", value1, value2, "auroraUsername");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordIsNull() {
+ addCriterion("aurora_password is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordIsNotNull() {
+ addCriterion("aurora_password is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordEqualTo(String value) {
+ addCriterion("aurora_password =", value, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordNotEqualTo(String value) {
+ addCriterion("aurora_password <>", value, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordGreaterThan(String value) {
+ addCriterion("aurora_password >", value, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordGreaterThanOrEqualTo(String value) {
+ addCriterion("aurora_password >=", value, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordLessThan(String value) {
+ addCriterion("aurora_password <", value, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordLessThanOrEqualTo(String value) {
+ addCriterion("aurora_password <=", value, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordLike(String value) {
+ addCriterion("aurora_password like", value, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordNotLike(String value) {
+ addCriterion("aurora_password not like", value, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordIn(List values) {
+ addCriterion("aurora_password in", values, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordNotIn(List values) {
+ addCriterion("aurora_password not in", values, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordBetween(String value1, String value2) {
+ addCriterion("aurora_password between", value1, value2, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuroraPasswordNotBetween(String value1, String value2) {
+ addCriterion("aurora_password not between", value1, value2, "auroraPassword");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdIsNull() {
+ addCriterion("redis_db_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdIsNotNull() {
+ addCriterion("redis_db_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdEqualTo(Integer value) {
+ addCriterion("redis_db_id =", value, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdNotEqualTo(Integer value) {
+ addCriterion("redis_db_id <>", value, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdGreaterThan(Integer value) {
+ addCriterion("redis_db_id >", value, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("redis_db_id >=", value, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdLessThan(Integer value) {
+ addCriterion("redis_db_id <", value, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdLessThanOrEqualTo(Integer value) {
+ addCriterion("redis_db_id <=", value, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdIn(List values) {
+ addCriterion("redis_db_id in", values, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdNotIn(List values) {
+ addCriterion("redis_db_id not in", values, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdBetween(Integer value1, Integer value2) {
+ addCriterion("redis_db_id between", value1, value2, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRedisDbIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("redis_db_id not between", value1, value2, "redisDbId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostIsNull() {
+ addCriterion("third_api_host is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostIsNotNull() {
+ addCriterion("third_api_host is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostEqualTo(String value) {
+ addCriterion("third_api_host =", value, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostNotEqualTo(String value) {
+ addCriterion("third_api_host <>", value, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostGreaterThan(String value) {
+ addCriterion("third_api_host >", value, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostGreaterThanOrEqualTo(String value) {
+ addCriterion("third_api_host >=", value, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostLessThan(String value) {
+ addCriterion("third_api_host <", value, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostLessThanOrEqualTo(String value) {
+ addCriterion("third_api_host <=", value, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostLike(String value) {
+ addCriterion("third_api_host like", value, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostNotLike(String value) {
+ addCriterion("third_api_host not like", value, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostIn(List values) {
+ addCriterion("third_api_host in", values, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostNotIn(List values) {
+ addCriterion("third_api_host not in", values, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostBetween(String value1, String value2) {
+ addCriterion("third_api_host between", value1, value2, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdApiHostNotBetween(String value1, String value2) {
+ addCriterion("third_api_host not between", value1, value2, "thirdApiHost");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchIsNull() {
+ addCriterion("lock_switch is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchIsNotNull() {
+ addCriterion("lock_switch is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchEqualTo(Integer value) {
+ addCriterion("lock_switch =", value, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchNotEqualTo(Integer value) {
+ addCriterion("lock_switch <>", value, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchGreaterThan(Integer value) {
+ addCriterion("lock_switch >", value, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchGreaterThanOrEqualTo(Integer value) {
+ addCriterion("lock_switch >=", value, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchLessThan(Integer value) {
+ addCriterion("lock_switch <", value, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchLessThanOrEqualTo(Integer value) {
+ addCriterion("lock_switch <=", value, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchIn(List values) {
+ addCriterion("lock_switch in", values, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchNotIn(List values) {
+ addCriterion("lock_switch not in", values, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchBetween(Integer value1, Integer value2) {
+ addCriterion("lock_switch between", value1, value2, "lockSwitch");
+ return (Criteria) this;
+ }
+
+ public Criteria andLockSwitchNotBetween(Integer value1, Integer value2) {
+ addCriterion("lock_switch not between", value1, value2, "lockSwitch");
+ return (Criteria) this;
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_company
+ *
+ * @mbg.generated do_not_delete_during_merge
+ */
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_company
+ *
+ * @mbg.generated
+ */
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicMenu.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicMenu.java
new file mode 100644
index 0000000..e9fe1e6
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicMenu.java
@@ -0,0 +1,336 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.io.Serializable;
+
+public class BasicMenu implements Serializable {
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.id
+ *
+ * @mbg.generated
+ */
+ private Long id;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.parent_menu_id
+ *
+ * @mbg.generated
+ */
+ private Long parentMenuId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.menu_name
+ *
+ * @mbg.generated
+ */
+ private String menuName;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.menu_name_en
+ *
+ * @mbg.generated
+ */
+ private String menuNameEn;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.menu_name_jp
+ *
+ * @mbg.generated
+ */
+ private String menuNameJp;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.remark
+ *
+ * @mbg.generated
+ */
+ private String remark;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.menu_level
+ *
+ * @mbg.generated
+ */
+ private Integer menuLevel;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.flag
+ *
+ * @mbg.generated
+ */
+ private Integer flag;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_menu.create_time
+ *
+ * @mbg.generated
+ */
+ private Long createTime;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.id
+ *
+ * @return the value of basic_menu.id
+ *
+ * @mbg.generated
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.id
+ *
+ * @param id the value for basic_menu.id
+ *
+ * @mbg.generated
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.parent_menu_id
+ *
+ * @return the value of basic_menu.parent_menu_id
+ *
+ * @mbg.generated
+ */
+ public Long getParentMenuId() {
+ return parentMenuId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.parent_menu_id
+ *
+ * @param parentMenuId the value for basic_menu.parent_menu_id
+ *
+ * @mbg.generated
+ */
+ public void setParentMenuId(Long parentMenuId) {
+ this.parentMenuId = parentMenuId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.menu_name
+ *
+ * @return the value of basic_menu.menu_name
+ *
+ * @mbg.generated
+ */
+ public String getMenuName() {
+ return menuName;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.menu_name
+ *
+ * @param menuName the value for basic_menu.menu_name
+ *
+ * @mbg.generated
+ */
+ public void setMenuName(String menuName) {
+ this.menuName = menuName == null ? null : menuName.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.menu_name_en
+ *
+ * @return the value of basic_menu.menu_name_en
+ *
+ * @mbg.generated
+ */
+ public String getMenuNameEn() {
+ return menuNameEn;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.menu_name_en
+ *
+ * @param menuNameEn the value for basic_menu.menu_name_en
+ *
+ * @mbg.generated
+ */
+ public void setMenuNameEn(String menuNameEn) {
+ this.menuNameEn = menuNameEn == null ? null : menuNameEn.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.menu_name_jp
+ *
+ * @return the value of basic_menu.menu_name_jp
+ *
+ * @mbg.generated
+ */
+ public String getMenuNameJp() {
+ return menuNameJp;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.menu_name_jp
+ *
+ * @param menuNameJp the value for basic_menu.menu_name_jp
+ *
+ * @mbg.generated
+ */
+ public void setMenuNameJp(String menuNameJp) {
+ this.menuNameJp = menuNameJp == null ? null : menuNameJp.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.remark
+ *
+ * @return the value of basic_menu.remark
+ *
+ * @mbg.generated
+ */
+ public String getRemark() {
+ return remark;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.remark
+ *
+ * @param remark the value for basic_menu.remark
+ *
+ * @mbg.generated
+ */
+ public void setRemark(String remark) {
+ this.remark = remark == null ? null : remark.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.menu_level
+ *
+ * @return the value of basic_menu.menu_level
+ *
+ * @mbg.generated
+ */
+ public Integer getMenuLevel() {
+ return menuLevel;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.menu_level
+ *
+ * @param menuLevel the value for basic_menu.menu_level
+ *
+ * @mbg.generated
+ */
+ public void setMenuLevel(Integer menuLevel) {
+ this.menuLevel = menuLevel;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.flag
+ *
+ * @return the value of basic_menu.flag
+ *
+ * @mbg.generated
+ */
+ public Integer getFlag() {
+ return flag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.flag
+ *
+ * @param flag the value for basic_menu.flag
+ *
+ * @mbg.generated
+ */
+ public void setFlag(Integer flag) {
+ this.flag = flag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_menu.create_time
+ *
+ * @return the value of basic_menu.create_time
+ *
+ * @mbg.generated
+ */
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_menu.create_time
+ *
+ * @param createTime the value for basic_menu.create_time
+ *
+ * @mbg.generated
+ */
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", parentMenuId=").append(parentMenuId);
+ sb.append(", menuName=").append(menuName);
+ sb.append(", menuNameEn=").append(menuNameEn);
+ sb.append(", menuNameJp=").append(menuNameJp);
+ sb.append(", remark=").append(remark);
+ sb.append(", menuLevel=").append(menuLevel);
+ sb.append(", flag=").append(flag);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicMenuExample.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicMenuExample.java
new file mode 100644
index 0000000..9165747
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicMenuExample.java
@@ -0,0 +1,882 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BasicMenuExample {
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ protected String orderByClause;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ protected boolean distinct;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public BasicMenuExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(Long value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(Long value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(Long value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(Long value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(Long value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(Long value1, Long value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(Long value1, Long value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdIsNull() {
+ addCriterion("parent_menu_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdIsNotNull() {
+ addCriterion("parent_menu_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdEqualTo(Long value) {
+ addCriterion("parent_menu_id =", value, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdNotEqualTo(Long value) {
+ addCriterion("parent_menu_id <>", value, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdGreaterThan(Long value) {
+ addCriterion("parent_menu_id >", value, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("parent_menu_id >=", value, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdLessThan(Long value) {
+ addCriterion("parent_menu_id <", value, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdLessThanOrEqualTo(Long value) {
+ addCriterion("parent_menu_id <=", value, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdIn(List values) {
+ addCriterion("parent_menu_id in", values, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdNotIn(List values) {
+ addCriterion("parent_menu_id not in", values, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdBetween(Long value1, Long value2) {
+ addCriterion("parent_menu_id between", value1, value2, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andParentMenuIdNotBetween(Long value1, Long value2) {
+ addCriterion("parent_menu_id not between", value1, value2, "parentMenuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameIsNull() {
+ addCriterion("menu_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameIsNotNull() {
+ addCriterion("menu_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEqualTo(String value) {
+ addCriterion("menu_name =", value, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameNotEqualTo(String value) {
+ addCriterion("menu_name <>", value, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameGreaterThan(String value) {
+ addCriterion("menu_name >", value, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameGreaterThanOrEqualTo(String value) {
+ addCriterion("menu_name >=", value, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameLessThan(String value) {
+ addCriterion("menu_name <", value, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameLessThanOrEqualTo(String value) {
+ addCriterion("menu_name <=", value, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameLike(String value) {
+ addCriterion("menu_name like", value, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameNotLike(String value) {
+ addCriterion("menu_name not like", value, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameIn(List values) {
+ addCriterion("menu_name in", values, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameNotIn(List values) {
+ addCriterion("menu_name not in", values, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameBetween(String value1, String value2) {
+ addCriterion("menu_name between", value1, value2, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameNotBetween(String value1, String value2) {
+ addCriterion("menu_name not between", value1, value2, "menuName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnIsNull() {
+ addCriterion("menu_name_en is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnIsNotNull() {
+ addCriterion("menu_name_en is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnEqualTo(String value) {
+ addCriterion("menu_name_en =", value, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnNotEqualTo(String value) {
+ addCriterion("menu_name_en <>", value, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnGreaterThan(String value) {
+ addCriterion("menu_name_en >", value, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnGreaterThanOrEqualTo(String value) {
+ addCriterion("menu_name_en >=", value, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnLessThan(String value) {
+ addCriterion("menu_name_en <", value, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnLessThanOrEqualTo(String value) {
+ addCriterion("menu_name_en <=", value, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnLike(String value) {
+ addCriterion("menu_name_en like", value, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnNotLike(String value) {
+ addCriterion("menu_name_en not like", value, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnIn(List values) {
+ addCriterion("menu_name_en in", values, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnNotIn(List values) {
+ addCriterion("menu_name_en not in", values, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnBetween(String value1, String value2) {
+ addCriterion("menu_name_en between", value1, value2, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameEnNotBetween(String value1, String value2) {
+ addCriterion("menu_name_en not between", value1, value2, "menuNameEn");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpIsNull() {
+ addCriterion("menu_name_jp is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpIsNotNull() {
+ addCriterion("menu_name_jp is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpEqualTo(String value) {
+ addCriterion("menu_name_jp =", value, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpNotEqualTo(String value) {
+ addCriterion("menu_name_jp <>", value, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpGreaterThan(String value) {
+ addCriterion("menu_name_jp >", value, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpGreaterThanOrEqualTo(String value) {
+ addCriterion("menu_name_jp >=", value, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpLessThan(String value) {
+ addCriterion("menu_name_jp <", value, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpLessThanOrEqualTo(String value) {
+ addCriterion("menu_name_jp <=", value, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpLike(String value) {
+ addCriterion("menu_name_jp like", value, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpNotLike(String value) {
+ addCriterion("menu_name_jp not like", value, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpIn(List values) {
+ addCriterion("menu_name_jp in", values, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpNotIn(List values) {
+ addCriterion("menu_name_jp not in", values, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpBetween(String value1, String value2) {
+ addCriterion("menu_name_jp between", value1, value2, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuNameJpNotBetween(String value1, String value2) {
+ addCriterion("menu_name_jp not between", value1, value2, "menuNameJp");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkIsNull() {
+ addCriterion("remark is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkIsNotNull() {
+ addCriterion("remark is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkEqualTo(String value) {
+ addCriterion("remark =", value, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkNotEqualTo(String value) {
+ addCriterion("remark <>", value, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkGreaterThan(String value) {
+ addCriterion("remark >", value, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkGreaterThanOrEqualTo(String value) {
+ addCriterion("remark >=", value, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkLessThan(String value) {
+ addCriterion("remark <", value, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkLessThanOrEqualTo(String value) {
+ addCriterion("remark <=", value, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkLike(String value) {
+ addCriterion("remark like", value, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkNotLike(String value) {
+ addCriterion("remark not like", value, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkIn(List values) {
+ addCriterion("remark in", values, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkNotIn(List values) {
+ addCriterion("remark not in", values, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkBetween(String value1, String value2) {
+ addCriterion("remark between", value1, value2, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andRemarkNotBetween(String value1, String value2) {
+ addCriterion("remark not between", value1, value2, "remark");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelIsNull() {
+ addCriterion("menu_level is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelIsNotNull() {
+ addCriterion("menu_level is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelEqualTo(Integer value) {
+ addCriterion("menu_level =", value, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelNotEqualTo(Integer value) {
+ addCriterion("menu_level <>", value, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelGreaterThan(Integer value) {
+ addCriterion("menu_level >", value, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelGreaterThanOrEqualTo(Integer value) {
+ addCriterion("menu_level >=", value, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelLessThan(Integer value) {
+ addCriterion("menu_level <", value, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelLessThanOrEqualTo(Integer value) {
+ addCriterion("menu_level <=", value, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelIn(List values) {
+ addCriterion("menu_level in", values, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelNotIn(List values) {
+ addCriterion("menu_level not in", values, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelBetween(Integer value1, Integer value2) {
+ addCriterion("menu_level between", value1, value2, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuLevelNotBetween(Integer value1, Integer value2) {
+ addCriterion("menu_level not between", value1, value2, "menuLevel");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIsNull() {
+ addCriterion("flag is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIsNotNull() {
+ addCriterion("flag is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagEqualTo(Integer value) {
+ addCriterion("flag =", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotEqualTo(Integer value) {
+ addCriterion("flag <>", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagGreaterThan(Integer value) {
+ addCriterion("flag >", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagGreaterThanOrEqualTo(Integer value) {
+ addCriterion("flag >=", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagLessThan(Integer value) {
+ addCriterion("flag <", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagLessThanOrEqualTo(Integer value) {
+ addCriterion("flag <=", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIn(List values) {
+ addCriterion("flag in", values, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotIn(List values) {
+ addCriterion("flag not in", values, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagBetween(Integer value1, Integer value2) {
+ addCriterion("flag between", value1, value2, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotBetween(Integer value1, Integer value2) {
+ addCriterion("flag not between", value1, value2, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Long value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Long value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Long value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Long value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Long value1, Long value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_menu
+ *
+ * @mbg.generated do_not_delete_during_merge
+ */
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_menu
+ *
+ * @mbg.generated
+ */
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicProject.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicProject.java
new file mode 100644
index 0000000..abcfab2
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicProject.java
@@ -0,0 +1,52 @@
+package com.dongjian.datacenter.admin.model;
+
+import lombok.Data;
+
+@Data
+public class BasicProject {
+
+ private Long id;
+
+
+ private Long companyId;
+
+
+ private String projectName;
+
+
+ private Integer flag;
+
+
+ private Long createTime;
+
+
+ private Long creatorId;
+
+
+ private Long modifyTime;
+
+
+ private Long modifierId;
+
+
+ private String udfProjectId;
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", companyId=").append(companyId);
+ sb.append(", projectName=").append(projectName);
+ sb.append(", flag=").append(flag);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", creatorId=").append(creatorId);
+ sb.append(", modifyTime=").append(modifyTime);
+ sb.append(", modifierId=").append(modifierId);
+ sb.append(", udfProjectId=").append(udfProjectId);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRole.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRole.java
new file mode 100644
index 0000000..b784fe4
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRole.java
@@ -0,0 +1,336 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.io.Serializable;
+
+public class BasicRole implements Serializable {
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.id
+ *
+ * @mbg.generated
+ */
+ private Long id;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.company_id
+ *
+ * @mbg.generated
+ */
+ private Long companyId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.role_name
+ *
+ * @mbg.generated
+ */
+ private String roleName;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.description
+ *
+ * @mbg.generated
+ */
+ private String description;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.flag
+ *
+ * @mbg.generated
+ */
+ private Integer flag;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.creator_id
+ *
+ * @mbg.generated
+ */
+ private Long creatorId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.create_time
+ *
+ * @mbg.generated
+ */
+ private Long createTime;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.modifier_id
+ *
+ * @mbg.generated
+ */
+ private Long modifierId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role.modify_time
+ *
+ * @mbg.generated
+ */
+ private Long modifyTime;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.id
+ *
+ * @return the value of basic_role.id
+ *
+ * @mbg.generated
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.id
+ *
+ * @param id the value for basic_role.id
+ *
+ * @mbg.generated
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.company_id
+ *
+ * @return the value of basic_role.company_id
+ *
+ * @mbg.generated
+ */
+ public Long getCompanyId() {
+ return companyId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.company_id
+ *
+ * @param companyId the value for basic_role.company_id
+ *
+ * @mbg.generated
+ */
+ public void setCompanyId(Long companyId) {
+ this.companyId = companyId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.role_name
+ *
+ * @return the value of basic_role.role_name
+ *
+ * @mbg.generated
+ */
+ public String getRoleName() {
+ return roleName;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.role_name
+ *
+ * @param roleName the value for basic_role.role_name
+ *
+ * @mbg.generated
+ */
+ public void setRoleName(String roleName) {
+ this.roleName = roleName == null ? null : roleName.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.description
+ *
+ * @return the value of basic_role.description
+ *
+ * @mbg.generated
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.description
+ *
+ * @param description the value for basic_role.description
+ *
+ * @mbg.generated
+ */
+ public void setDescription(String description) {
+ this.description = description == null ? null : description.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.flag
+ *
+ * @return the value of basic_role.flag
+ *
+ * @mbg.generated
+ */
+ public Integer getFlag() {
+ return flag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.flag
+ *
+ * @param flag the value for basic_role.flag
+ *
+ * @mbg.generated
+ */
+ public void setFlag(Integer flag) {
+ this.flag = flag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.creator_id
+ *
+ * @return the value of basic_role.creator_id
+ *
+ * @mbg.generated
+ */
+ public Long getCreatorId() {
+ return creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.creator_id
+ *
+ * @param creatorId the value for basic_role.creator_id
+ *
+ * @mbg.generated
+ */
+ public void setCreatorId(Long creatorId) {
+ this.creatorId = creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.create_time
+ *
+ * @return the value of basic_role.create_time
+ *
+ * @mbg.generated
+ */
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.create_time
+ *
+ * @param createTime the value for basic_role.create_time
+ *
+ * @mbg.generated
+ */
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.modifier_id
+ *
+ * @return the value of basic_role.modifier_id
+ *
+ * @mbg.generated
+ */
+ public Long getModifierId() {
+ return modifierId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.modifier_id
+ *
+ * @param modifierId the value for basic_role.modifier_id
+ *
+ * @mbg.generated
+ */
+ public void setModifierId(Long modifierId) {
+ this.modifierId = modifierId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role.modify_time
+ *
+ * @return the value of basic_role.modify_time
+ *
+ * @mbg.generated
+ */
+ public Long getModifyTime() {
+ return modifyTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role.modify_time
+ *
+ * @param modifyTime the value for basic_role.modify_time
+ *
+ * @mbg.generated
+ */
+ public void setModifyTime(Long modifyTime) {
+ this.modifyTime = modifyTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", companyId=").append(companyId);
+ sb.append(", roleName=").append(roleName);
+ sb.append(", description=").append(description);
+ sb.append(", flag=").append(flag);
+ sb.append(", creatorId=").append(creatorId);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", modifierId=").append(modifierId);
+ sb.append(", modifyTime=").append(modifyTime);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleExample.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleExample.java
new file mode 100644
index 0000000..df58062
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleExample.java
@@ -0,0 +1,862 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BasicRoleExample {
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ protected String orderByClause;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ protected boolean distinct;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public BasicRoleExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(Long value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(Long value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(Long value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(Long value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(Long value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(Long value1, Long value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(Long value1, Long value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdIsNull() {
+ addCriterion("company_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdIsNotNull() {
+ addCriterion("company_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdEqualTo(Long value) {
+ addCriterion("company_id =", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdNotEqualTo(Long value) {
+ addCriterion("company_id <>", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdGreaterThan(Long value) {
+ addCriterion("company_id >", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("company_id >=", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdLessThan(Long value) {
+ addCriterion("company_id <", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
+ addCriterion("company_id <=", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdIn(List values) {
+ addCriterion("company_id in", values, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdNotIn(List values) {
+ addCriterion("company_id not in", values, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdBetween(Long value1, Long value2) {
+ addCriterion("company_id between", value1, value2, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
+ addCriterion("company_id not between", value1, value2, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameIsNull() {
+ addCriterion("role_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameIsNotNull() {
+ addCriterion("role_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameEqualTo(String value) {
+ addCriterion("role_name =", value, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameNotEqualTo(String value) {
+ addCriterion("role_name <>", value, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameGreaterThan(String value) {
+ addCriterion("role_name >", value, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameGreaterThanOrEqualTo(String value) {
+ addCriterion("role_name >=", value, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameLessThan(String value) {
+ addCriterion("role_name <", value, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameLessThanOrEqualTo(String value) {
+ addCriterion("role_name <=", value, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameLike(String value) {
+ addCriterion("role_name like", value, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameNotLike(String value) {
+ addCriterion("role_name not like", value, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameIn(List values) {
+ addCriterion("role_name in", values, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameNotIn(List values) {
+ addCriterion("role_name not in", values, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameBetween(String value1, String value2) {
+ addCriterion("role_name between", value1, value2, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleNameNotBetween(String value1, String value2) {
+ addCriterion("role_name not between", value1, value2, "roleName");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionIsNull() {
+ addCriterion("description is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionIsNotNull() {
+ addCriterion("description is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionEqualTo(String value) {
+ addCriterion("description =", value, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionNotEqualTo(String value) {
+ addCriterion("description <>", value, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionGreaterThan(String value) {
+ addCriterion("description >", value, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
+ addCriterion("description >=", value, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionLessThan(String value) {
+ addCriterion("description <", value, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionLessThanOrEqualTo(String value) {
+ addCriterion("description <=", value, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionLike(String value) {
+ addCriterion("description like", value, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionNotLike(String value) {
+ addCriterion("description not like", value, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionIn(List values) {
+ addCriterion("description in", values, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionNotIn(List values) {
+ addCriterion("description not in", values, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionBetween(String value1, String value2) {
+ addCriterion("description between", value1, value2, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andDescriptionNotBetween(String value1, String value2) {
+ addCriterion("description not between", value1, value2, "description");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIsNull() {
+ addCriterion("flag is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIsNotNull() {
+ addCriterion("flag is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagEqualTo(Integer value) {
+ addCriterion("flag =", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotEqualTo(Integer value) {
+ addCriterion("flag <>", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagGreaterThan(Integer value) {
+ addCriterion("flag >", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagGreaterThanOrEqualTo(Integer value) {
+ addCriterion("flag >=", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagLessThan(Integer value) {
+ addCriterion("flag <", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagLessThanOrEqualTo(Integer value) {
+ addCriterion("flag <=", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIn(List values) {
+ addCriterion("flag in", values, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotIn(List values) {
+ addCriterion("flag not in", values, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagBetween(Integer value1, Integer value2) {
+ addCriterion("flag between", value1, value2, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotBetween(Integer value1, Integer value2) {
+ addCriterion("flag not between", value1, value2, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNull() {
+ addCriterion("creator_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNotNull() {
+ addCriterion("creator_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdEqualTo(Long value) {
+ addCriterion("creator_id =", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotEqualTo(Long value) {
+ addCriterion("creator_id <>", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThan(Long value) {
+ addCriterion("creator_id >", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("creator_id >=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThan(Long value) {
+ addCriterion("creator_id <", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
+ addCriterion("creator_id <=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIn(List values) {
+ addCriterion("creator_id in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotIn(List values) {
+ addCriterion("creator_id not in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdBetween(Long value1, Long value2) {
+ addCriterion("creator_id between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
+ addCriterion("creator_id not between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Long value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Long value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Long value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Long value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Long value1, Long value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIsNull() {
+ addCriterion("modifier_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIsNotNull() {
+ addCriterion("modifier_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdEqualTo(Long value) {
+ addCriterion("modifier_id =", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdNotEqualTo(Long value) {
+ addCriterion("modifier_id <>", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdGreaterThan(Long value) {
+ addCriterion("modifier_id >", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("modifier_id >=", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdLessThan(Long value) {
+ addCriterion("modifier_id <", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdLessThanOrEqualTo(Long value) {
+ addCriterion("modifier_id <=", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIn(List values) {
+ addCriterion("modifier_id in", values, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdNotIn(List values) {
+ addCriterion("modifier_id not in", values, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdBetween(Long value1, Long value2) {
+ addCriterion("modifier_id between", value1, value2, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdNotBetween(Long value1, Long value2) {
+ addCriterion("modifier_id not between", value1, value2, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIsNull() {
+ addCriterion("modify_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIsNotNull() {
+ addCriterion("modify_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeEqualTo(Long value) {
+ addCriterion("modify_time =", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotEqualTo(Long value) {
+ addCriterion("modify_time <>", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeGreaterThan(Long value) {
+ addCriterion("modify_time >", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("modify_time >=", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeLessThan(Long value) {
+ addCriterion("modify_time <", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeLessThanOrEqualTo(Long value) {
+ addCriterion("modify_time <=", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIn(List values) {
+ addCriterion("modify_time in", values, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotIn(List values) {
+ addCriterion("modify_time not in", values, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeBetween(Long value1, Long value2) {
+ addCriterion("modify_time between", value1, value2, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotBetween(Long value1, Long value2) {
+ addCriterion("modify_time not between", value1, value2, "modifyTime");
+ return (Criteria) this;
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role
+ *
+ * @mbg.generated do_not_delete_during_merge
+ */
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role
+ *
+ * @mbg.generated
+ */
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleMenuRelation.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleMenuRelation.java
new file mode 100644
index 0000000..ad642ae
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleMenuRelation.java
@@ -0,0 +1,166 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.io.Serializable;
+
+public class BasicRoleMenuRelation implements Serializable {
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role_menu_relation.role_id
+ *
+ * @mbg.generated
+ */
+ private Long roleId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role_menu_relation.menu_id
+ *
+ * @mbg.generated
+ */
+ private Long menuId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role_menu_relation.creator_id
+ *
+ * @mbg.generated
+ */
+ private Long creatorId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role_menu_relation.create_time
+ *
+ * @mbg.generated
+ */
+ private Long createTime;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role_menu_relation.role_id
+ *
+ * @return the value of basic_role_menu_relation.role_id
+ *
+ * @mbg.generated
+ */
+ public Long getRoleId() {
+ return roleId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role_menu_relation.role_id
+ *
+ * @param roleId the value for basic_role_menu_relation.role_id
+ *
+ * @mbg.generated
+ */
+ public void setRoleId(Long roleId) {
+ this.roleId = roleId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role_menu_relation.menu_id
+ *
+ * @return the value of basic_role_menu_relation.menu_id
+ *
+ * @mbg.generated
+ */
+ public Long getMenuId() {
+ return menuId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role_menu_relation.menu_id
+ *
+ * @param menuId the value for basic_role_menu_relation.menu_id
+ *
+ * @mbg.generated
+ */
+ public void setMenuId(Long menuId) {
+ this.menuId = menuId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role_menu_relation.creator_id
+ *
+ * @return the value of basic_role_menu_relation.creator_id
+ *
+ * @mbg.generated
+ */
+ public Long getCreatorId() {
+ return creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role_menu_relation.creator_id
+ *
+ * @param creatorId the value for basic_role_menu_relation.creator_id
+ *
+ * @mbg.generated
+ */
+ public void setCreatorId(Long creatorId) {
+ this.creatorId = creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role_menu_relation.create_time
+ *
+ * @return the value of basic_role_menu_relation.create_time
+ *
+ * @mbg.generated
+ */
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role_menu_relation.create_time
+ *
+ * @param createTime the value for basic_role_menu_relation.create_time
+ *
+ * @mbg.generated
+ */
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", roleId=").append(roleId);
+ sb.append(", menuId=").append(menuId);
+ sb.append(", creatorId=").append(creatorId);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleMenuRelationExample.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleMenuRelationExample.java
new file mode 100644
index 0000000..c76e39a
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleMenuRelationExample.java
@@ -0,0 +1,542 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BasicRoleMenuRelationExample {
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ protected String orderByClause;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ protected boolean distinct;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public BasicRoleMenuRelationExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andRoleIdIsNull() {
+ addCriterion("role_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdIsNotNull() {
+ addCriterion("role_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdEqualTo(Long value) {
+ addCriterion("role_id =", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdNotEqualTo(Long value) {
+ addCriterion("role_id <>", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdGreaterThan(Long value) {
+ addCriterion("role_id >", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("role_id >=", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdLessThan(Long value) {
+ addCriterion("role_id <", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdLessThanOrEqualTo(Long value) {
+ addCriterion("role_id <=", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdIn(List values) {
+ addCriterion("role_id in", values, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdNotIn(List values) {
+ addCriterion("role_id not in", values, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdBetween(Long value1, Long value2) {
+ addCriterion("role_id between", value1, value2, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdNotBetween(Long value1, Long value2) {
+ addCriterion("role_id not between", value1, value2, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdIsNull() {
+ addCriterion("menu_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdIsNotNull() {
+ addCriterion("menu_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdEqualTo(Long value) {
+ addCriterion("menu_id =", value, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdNotEqualTo(Long value) {
+ addCriterion("menu_id <>", value, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdGreaterThan(Long value) {
+ addCriterion("menu_id >", value, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("menu_id >=", value, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdLessThan(Long value) {
+ addCriterion("menu_id <", value, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdLessThanOrEqualTo(Long value) {
+ addCriterion("menu_id <=", value, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdIn(List values) {
+ addCriterion("menu_id in", values, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdNotIn(List values) {
+ addCriterion("menu_id not in", values, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdBetween(Long value1, Long value2) {
+ addCriterion("menu_id between", value1, value2, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andMenuIdNotBetween(Long value1, Long value2) {
+ addCriterion("menu_id not between", value1, value2, "menuId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNull() {
+ addCriterion("creator_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNotNull() {
+ addCriterion("creator_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdEqualTo(Long value) {
+ addCriterion("creator_id =", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotEqualTo(Long value) {
+ addCriterion("creator_id <>", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThan(Long value) {
+ addCriterion("creator_id >", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("creator_id >=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThan(Long value) {
+ addCriterion("creator_id <", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
+ addCriterion("creator_id <=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIn(List values) {
+ addCriterion("creator_id in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotIn(List values) {
+ addCriterion("creator_id not in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdBetween(Long value1, Long value2) {
+ addCriterion("creator_id between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
+ addCriterion("creator_id not between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Long value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Long value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Long value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Long value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Long value1, Long value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated do_not_delete_during_merge
+ */
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role_menu_relation
+ *
+ * @mbg.generated
+ */
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleUserRelation.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleUserRelation.java
new file mode 100644
index 0000000..0e2ff14
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleUserRelation.java
@@ -0,0 +1,166 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.io.Serializable;
+
+public class BasicRoleUserRelation implements Serializable {
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role_user_relation.user_id
+ *
+ * @mbg.generated
+ */
+ private Long userId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role_user_relation.role_id
+ *
+ * @mbg.generated
+ */
+ private Long roleId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role_user_relation.creator_id
+ *
+ * @mbg.generated
+ */
+ private Long creatorId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_role_user_relation.create_time
+ *
+ * @mbg.generated
+ */
+ private Long createTime;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role_user_relation.user_id
+ *
+ * @return the value of basic_role_user_relation.user_id
+ *
+ * @mbg.generated
+ */
+ public Long getUserId() {
+ return userId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role_user_relation.user_id
+ *
+ * @param userId the value for basic_role_user_relation.user_id
+ *
+ * @mbg.generated
+ */
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role_user_relation.role_id
+ *
+ * @return the value of basic_role_user_relation.role_id
+ *
+ * @mbg.generated
+ */
+ public Long getRoleId() {
+ return roleId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role_user_relation.role_id
+ *
+ * @param roleId the value for basic_role_user_relation.role_id
+ *
+ * @mbg.generated
+ */
+ public void setRoleId(Long roleId) {
+ this.roleId = roleId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role_user_relation.creator_id
+ *
+ * @return the value of basic_role_user_relation.creator_id
+ *
+ * @mbg.generated
+ */
+ public Long getCreatorId() {
+ return creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role_user_relation.creator_id
+ *
+ * @param creatorId the value for basic_role_user_relation.creator_id
+ *
+ * @mbg.generated
+ */
+ public void setCreatorId(Long creatorId) {
+ this.creatorId = creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_role_user_relation.create_time
+ *
+ * @return the value of basic_role_user_relation.create_time
+ *
+ * @mbg.generated
+ */
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_role_user_relation.create_time
+ *
+ * @param createTime the value for basic_role_user_relation.create_time
+ *
+ * @mbg.generated
+ */
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", userId=").append(userId);
+ sb.append(", roleId=").append(roleId);
+ sb.append(", creatorId=").append(creatorId);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleUserRelationExample.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleUserRelationExample.java
new file mode 100644
index 0000000..a717343
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicRoleUserRelationExample.java
@@ -0,0 +1,542 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BasicRoleUserRelationExample {
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ protected String orderByClause;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ protected boolean distinct;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public BasicRoleUserRelationExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andUserIdIsNull() {
+ addCriterion("user_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIsNotNull() {
+ addCriterion("user_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdEqualTo(Long value) {
+ addCriterion("user_id =", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotEqualTo(Long value) {
+ addCriterion("user_id <>", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdGreaterThan(Long value) {
+ addCriterion("user_id >", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("user_id >=", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLessThan(Long value) {
+ addCriterion("user_id <", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLessThanOrEqualTo(Long value) {
+ addCriterion("user_id <=", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIn(List values) {
+ addCriterion("user_id in", values, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotIn(List values) {
+ addCriterion("user_id not in", values, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdBetween(Long value1, Long value2) {
+ addCriterion("user_id between", value1, value2, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotBetween(Long value1, Long value2) {
+ addCriterion("user_id not between", value1, value2, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdIsNull() {
+ addCriterion("role_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdIsNotNull() {
+ addCriterion("role_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdEqualTo(Long value) {
+ addCriterion("role_id =", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdNotEqualTo(Long value) {
+ addCriterion("role_id <>", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdGreaterThan(Long value) {
+ addCriterion("role_id >", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("role_id >=", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdLessThan(Long value) {
+ addCriterion("role_id <", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdLessThanOrEqualTo(Long value) {
+ addCriterion("role_id <=", value, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdIn(List values) {
+ addCriterion("role_id in", values, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdNotIn(List values) {
+ addCriterion("role_id not in", values, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdBetween(Long value1, Long value2) {
+ addCriterion("role_id between", value1, value2, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andRoleIdNotBetween(Long value1, Long value2) {
+ addCriterion("role_id not between", value1, value2, "roleId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNull() {
+ addCriterion("creator_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNotNull() {
+ addCriterion("creator_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdEqualTo(Long value) {
+ addCriterion("creator_id =", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotEqualTo(Long value) {
+ addCriterion("creator_id <>", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThan(Long value) {
+ addCriterion("creator_id >", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("creator_id >=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThan(Long value) {
+ addCriterion("creator_id <", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
+ addCriterion("creator_id <=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIn(List values) {
+ addCriterion("creator_id in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotIn(List values) {
+ addCriterion("creator_id not in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdBetween(Long value1, Long value2) {
+ addCriterion("creator_id between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
+ addCriterion("creator_id not between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Long value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Long value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Long value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Long value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Long value1, Long value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated do_not_delete_during_merge
+ */
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_role_user_relation
+ *
+ * @mbg.generated
+ */
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicUser.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicUser.java
new file mode 100644
index 0000000..3646e47
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicUser.java
@@ -0,0 +1,676 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.io.Serializable;
+
+public class BasicUser implements Serializable {
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.id
+ *
+ * @mbg.generated
+ */
+ private Long id;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.user_type
+ *
+ * @mbg.generated
+ */
+ private Integer userType;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.company_id
+ *
+ * @mbg.generated
+ */
+ private Long companyId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.username
+ *
+ * @mbg.generated
+ */
+ private String username;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.login_name
+ *
+ * @mbg.generated
+ */
+ private String loginName;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.password
+ *
+ * @mbg.generated
+ */
+ private String password;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.salt
+ *
+ * @mbg.generated
+ */
+ private String salt;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.email
+ *
+ * @mbg.generated
+ */
+ private String email;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.mfa_secret
+ *
+ * @mbg.generated
+ */
+ private String mfaSecret;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.mfa_bind
+ *
+ * @mbg.generated
+ */
+ private Integer mfaBind;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.mobile_number
+ *
+ * @mbg.generated
+ */
+ private String mobileNumber;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.last_login_time
+ *
+ * @mbg.generated
+ */
+ private Long lastLoginTime;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.flag
+ *
+ * @mbg.generated
+ */
+ private Integer flag;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.expire_time
+ *
+ * @mbg.generated
+ */
+ private Long expireTime;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.create_time
+ *
+ * @mbg.generated
+ */
+ private Long createTime;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.creator_id
+ *
+ * @mbg.generated
+ */
+ private Long creatorId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.modify_time
+ *
+ * @mbg.generated
+ */
+ private Long modifyTime;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.modifier_id
+ *
+ * @mbg.generated
+ */
+ private Long modifierId;
+
+ /**
+ *
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database column basic_user.super_role
+ *
+ * @mbg.generated
+ */
+ private Integer superRole;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.id
+ *
+ * @return the value of basic_user.id
+ *
+ * @mbg.generated
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.id
+ *
+ * @param id the value for basic_user.id
+ *
+ * @mbg.generated
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.user_type
+ *
+ * @return the value of basic_user.user_type
+ *
+ * @mbg.generated
+ */
+ public Integer getUserType() {
+ return userType;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.user_type
+ *
+ * @param userType the value for basic_user.user_type
+ *
+ * @mbg.generated
+ */
+ public void setUserType(Integer userType) {
+ this.userType = userType;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.company_id
+ *
+ * @return the value of basic_user.company_id
+ *
+ * @mbg.generated
+ */
+ public Long getCompanyId() {
+ return companyId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.company_id
+ *
+ * @param companyId the value for basic_user.company_id
+ *
+ * @mbg.generated
+ */
+ public void setCompanyId(Long companyId) {
+ this.companyId = companyId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.username
+ *
+ * @return the value of basic_user.username
+ *
+ * @mbg.generated
+ */
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.username
+ *
+ * @param username the value for basic_user.username
+ *
+ * @mbg.generated
+ */
+ public void setUsername(String username) {
+ this.username = username == null ? null : username.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.login_name
+ *
+ * @return the value of basic_user.login_name
+ *
+ * @mbg.generated
+ */
+ public String getLoginName() {
+ return loginName;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.login_name
+ *
+ * @param loginName the value for basic_user.login_name
+ *
+ * @mbg.generated
+ */
+ public void setLoginName(String loginName) {
+ this.loginName = loginName == null ? null : loginName.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.password
+ *
+ * @return the value of basic_user.password
+ *
+ * @mbg.generated
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.password
+ *
+ * @param password the value for basic_user.password
+ *
+ * @mbg.generated
+ */
+ public void setPassword(String password) {
+ this.password = password == null ? null : password.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.salt
+ *
+ * @return the value of basic_user.salt
+ *
+ * @mbg.generated
+ */
+ public String getSalt() {
+ return salt;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.salt
+ *
+ * @param salt the value for basic_user.salt
+ *
+ * @mbg.generated
+ */
+ public void setSalt(String salt) {
+ this.salt = salt == null ? null : salt.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.email
+ *
+ * @return the value of basic_user.email
+ *
+ * @mbg.generated
+ */
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.email
+ *
+ * @param email the value for basic_user.email
+ *
+ * @mbg.generated
+ */
+ public void setEmail(String email) {
+ this.email = email == null ? null : email.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.mfa_secret
+ *
+ * @return the value of basic_user.mfa_secret
+ *
+ * @mbg.generated
+ */
+ public String getMfaSecret() {
+ return mfaSecret;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.mfa_secret
+ *
+ * @param mfaSecret the value for basic_user.mfa_secret
+ *
+ * @mbg.generated
+ */
+ public void setMfaSecret(String mfaSecret) {
+ this.mfaSecret = mfaSecret == null ? null : mfaSecret.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.mfa_bind
+ *
+ * @return the value of basic_user.mfa_bind
+ *
+ * @mbg.generated
+ */
+ public Integer getMfaBind() {
+ return mfaBind;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.mfa_bind
+ *
+ * @param mfaBind the value for basic_user.mfa_bind
+ *
+ * @mbg.generated
+ */
+ public void setMfaBind(Integer mfaBind) {
+ this.mfaBind = mfaBind;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.mobile_number
+ *
+ * @return the value of basic_user.mobile_number
+ *
+ * @mbg.generated
+ */
+ public String getMobileNumber() {
+ return mobileNumber;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.mobile_number
+ *
+ * @param mobileNumber the value for basic_user.mobile_number
+ *
+ * @mbg.generated
+ */
+ public void setMobileNumber(String mobileNumber) {
+ this.mobileNumber = mobileNumber == null ? null : mobileNumber.trim();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.last_login_time
+ *
+ * @return the value of basic_user.last_login_time
+ *
+ * @mbg.generated
+ */
+ public Long getLastLoginTime() {
+ return lastLoginTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.last_login_time
+ *
+ * @param lastLoginTime the value for basic_user.last_login_time
+ *
+ * @mbg.generated
+ */
+ public void setLastLoginTime(Long lastLoginTime) {
+ this.lastLoginTime = lastLoginTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.flag
+ *
+ * @return the value of basic_user.flag
+ *
+ * @mbg.generated
+ */
+ public Integer getFlag() {
+ return flag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.flag
+ *
+ * @param flag the value for basic_user.flag
+ *
+ * @mbg.generated
+ */
+ public void setFlag(Integer flag) {
+ this.flag = flag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.expire_time
+ *
+ * @return the value of basic_user.expire_time
+ *
+ * @mbg.generated
+ */
+ public Long getExpireTime() {
+ return expireTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.expire_time
+ *
+ * @param expireTime the value for basic_user.expire_time
+ *
+ * @mbg.generated
+ */
+ public void setExpireTime(Long expireTime) {
+ this.expireTime = expireTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.create_time
+ *
+ * @return the value of basic_user.create_time
+ *
+ * @mbg.generated
+ */
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.create_time
+ *
+ * @param createTime the value for basic_user.create_time
+ *
+ * @mbg.generated
+ */
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.creator_id
+ *
+ * @return the value of basic_user.creator_id
+ *
+ * @mbg.generated
+ */
+ public Long getCreatorId() {
+ return creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.creator_id
+ *
+ * @param creatorId the value for basic_user.creator_id
+ *
+ * @mbg.generated
+ */
+ public void setCreatorId(Long creatorId) {
+ this.creatorId = creatorId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.modify_time
+ *
+ * @return the value of basic_user.modify_time
+ *
+ * @mbg.generated
+ */
+ public Long getModifyTime() {
+ return modifyTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.modify_time
+ *
+ * @param modifyTime the value for basic_user.modify_time
+ *
+ * @mbg.generated
+ */
+ public void setModifyTime(Long modifyTime) {
+ this.modifyTime = modifyTime;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.modifier_id
+ *
+ * @return the value of basic_user.modifier_id
+ *
+ * @mbg.generated
+ */
+ public Long getModifierId() {
+ return modifierId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.modifier_id
+ *
+ * @param modifierId the value for basic_user.modifier_id
+ *
+ * @mbg.generated
+ */
+ public void setModifierId(Long modifierId) {
+ this.modifierId = modifierId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method returns the value of the database column basic_user.super_role
+ *
+ * @return the value of basic_user.super_role
+ *
+ * @mbg.generated
+ */
+ public Integer getSuperRole() {
+ return superRole;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method sets the value of the database column basic_user.super_role
+ *
+ * @param superRole the value for basic_user.super_role
+ *
+ * @mbg.generated
+ */
+ public void setSuperRole(Integer superRole) {
+ this.superRole = superRole;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", userType=").append(userType);
+ sb.append(", companyId=").append(companyId);
+ sb.append(", username=").append(username);
+ sb.append(", loginName=").append(loginName);
+ sb.append(", password=").append(password);
+ sb.append(", salt=").append(salt);
+ sb.append(", email=").append(email);
+ sb.append(", mfaSecret=").append(mfaSecret);
+ sb.append(", mfaBind=").append(mfaBind);
+ sb.append(", mobileNumber=").append(mobileNumber);
+ sb.append(", lastLoginTime=").append(lastLoginTime);
+ sb.append(", flag=").append(flag);
+ sb.append(", expireTime=").append(expireTime);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", creatorId=").append(creatorId);
+ sb.append(", modifyTime=").append(modifyTime);
+ sb.append(", modifierId=").append(modifierId);
+ sb.append(", superRole=").append(superRole);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicUserExample.java b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicUserExample.java
new file mode 100644
index 0000000..9b8a250
--- /dev/null
+++ b/dongjian-center-admin-model/src/main/java/com/dongjian/datacenter/admin/model/BasicUserExample.java
@@ -0,0 +1,1512 @@
+package com.dongjian.datacenter.admin.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BasicUserExample {
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ protected String orderByClause;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ protected boolean distinct;
+
+ /**
+ * This field was generated by MyBatis Generator.
+ * This field corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public BasicUserExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table basic_user
+ *
+ * @mbg.generated
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(Long value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(Long value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(Long value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(Long value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(Long value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(Long value1, Long value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(Long value1, Long value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeIsNull() {
+ addCriterion("user_type is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeIsNotNull() {
+ addCriterion("user_type is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeEqualTo(Integer value) {
+ addCriterion("user_type =", value, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeNotEqualTo(Integer value) {
+ addCriterion("user_type <>", value, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeGreaterThan(Integer value) {
+ addCriterion("user_type >", value, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeGreaterThanOrEqualTo(Integer value) {
+ addCriterion("user_type >=", value, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeLessThan(Integer value) {
+ addCriterion("user_type <", value, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeLessThanOrEqualTo(Integer value) {
+ addCriterion("user_type <=", value, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeIn(List values) {
+ addCriterion("user_type in", values, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeNotIn(List values) {
+ addCriterion("user_type not in", values, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeBetween(Integer value1, Integer value2) {
+ addCriterion("user_type between", value1, value2, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserTypeNotBetween(Integer value1, Integer value2) {
+ addCriterion("user_type not between", value1, value2, "userType");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdIsNull() {
+ addCriterion("company_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdIsNotNull() {
+ addCriterion("company_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdEqualTo(Long value) {
+ addCriterion("company_id =", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdNotEqualTo(Long value) {
+ addCriterion("company_id <>", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdGreaterThan(Long value) {
+ addCriterion("company_id >", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("company_id >=", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdLessThan(Long value) {
+ addCriterion("company_id <", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
+ addCriterion("company_id <=", value, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdIn(List values) {
+ addCriterion("company_id in", values, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdNotIn(List values) {
+ addCriterion("company_id not in", values, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdBetween(Long value1, Long value2) {
+ addCriterion("company_id between", value1, value2, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
+ addCriterion("company_id not between", value1, value2, "companyId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameIsNull() {
+ addCriterion("username is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameIsNotNull() {
+ addCriterion("username is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameEqualTo(String value) {
+ addCriterion("username =", value, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameNotEqualTo(String value) {
+ addCriterion("username <>", value, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameGreaterThan(String value) {
+ addCriterion("username >", value, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameGreaterThanOrEqualTo(String value) {
+ addCriterion("username >=", value, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameLessThan(String value) {
+ addCriterion("username <", value, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameLessThanOrEqualTo(String value) {
+ addCriterion("username <=", value, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameLike(String value) {
+ addCriterion("username like", value, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameNotLike(String value) {
+ addCriterion("username not like", value, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameIn(List values) {
+ addCriterion("username in", values, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameNotIn(List values) {
+ addCriterion("username not in", values, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameBetween(String value1, String value2) {
+ addCriterion("username between", value1, value2, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andUsernameNotBetween(String value1, String value2) {
+ addCriterion("username not between", value1, value2, "username");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameIsNull() {
+ addCriterion("login_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameIsNotNull() {
+ addCriterion("login_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameEqualTo(String value) {
+ addCriterion("login_name =", value, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameNotEqualTo(String value) {
+ addCriterion("login_name <>", value, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameGreaterThan(String value) {
+ addCriterion("login_name >", value, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameGreaterThanOrEqualTo(String value) {
+ addCriterion("login_name >=", value, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameLessThan(String value) {
+ addCriterion("login_name <", value, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameLessThanOrEqualTo(String value) {
+ addCriterion("login_name <=", value, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameLike(String value) {
+ addCriterion("login_name like", value, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameNotLike(String value) {
+ addCriterion("login_name not like", value, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameIn(List values) {
+ addCriterion("login_name in", values, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameNotIn(List values) {
+ addCriterion("login_name not in", values, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameBetween(String value1, String value2) {
+ addCriterion("login_name between", value1, value2, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andLoginNameNotBetween(String value1, String value2) {
+ addCriterion("login_name not between", value1, value2, "loginName");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordIsNull() {
+ addCriterion("`password` is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordIsNotNull() {
+ addCriterion("`password` is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordEqualTo(String value) {
+ addCriterion("`password` =", value, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordNotEqualTo(String value) {
+ addCriterion("`password` <>", value, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordGreaterThan(String value) {
+ addCriterion("`password` >", value, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordGreaterThanOrEqualTo(String value) {
+ addCriterion("`password` >=", value, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordLessThan(String value) {
+ addCriterion("`password` <", value, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordLessThanOrEqualTo(String value) {
+ addCriterion("`password` <=", value, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordLike(String value) {
+ addCriterion("`password` like", value, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordNotLike(String value) {
+ addCriterion("`password` not like", value, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordIn(List values) {
+ addCriterion("`password` in", values, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordNotIn(List values) {
+ addCriterion("`password` not in", values, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordBetween(String value1, String value2) {
+ addCriterion("`password` between", value1, value2, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andPasswordNotBetween(String value1, String value2) {
+ addCriterion("`password` not between", value1, value2, "password");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltIsNull() {
+ addCriterion("salt is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltIsNotNull() {
+ addCriterion("salt is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltEqualTo(String value) {
+ addCriterion("salt =", value, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltNotEqualTo(String value) {
+ addCriterion("salt <>", value, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltGreaterThan(String value) {
+ addCriterion("salt >", value, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltGreaterThanOrEqualTo(String value) {
+ addCriterion("salt >=", value, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltLessThan(String value) {
+ addCriterion("salt <", value, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltLessThanOrEqualTo(String value) {
+ addCriterion("salt <=", value, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltLike(String value) {
+ addCriterion("salt like", value, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltNotLike(String value) {
+ addCriterion("salt not like", value, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltIn(List values) {
+ addCriterion("salt in", values, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltNotIn(List values) {
+ addCriterion("salt not in", values, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltBetween(String value1, String value2) {
+ addCriterion("salt between", value1, value2, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andSaltNotBetween(String value1, String value2) {
+ addCriterion("salt not between", value1, value2, "salt");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIsNull() {
+ addCriterion("email is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIsNotNull() {
+ addCriterion("email is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailEqualTo(String value) {
+ addCriterion("email =", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotEqualTo(String value) {
+ addCriterion("email <>", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailGreaterThan(String value) {
+ addCriterion("email >", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailGreaterThanOrEqualTo(String value) {
+ addCriterion("email >=", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLessThan(String value) {
+ addCriterion("email <", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLessThanOrEqualTo(String value) {
+ addCriterion("email <=", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailLike(String value) {
+ addCriterion("email like", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotLike(String value) {
+ addCriterion("email not like", value, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailIn(List values) {
+ addCriterion("email in", values, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotIn(List values) {
+ addCriterion("email not in", values, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailBetween(String value1, String value2) {
+ addCriterion("email between", value1, value2, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andEmailNotBetween(String value1, String value2) {
+ addCriterion("email not between", value1, value2, "email");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretIsNull() {
+ addCriterion("mfa_secret is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretIsNotNull() {
+ addCriterion("mfa_secret is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretEqualTo(String value) {
+ addCriterion("mfa_secret =", value, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretNotEqualTo(String value) {
+ addCriterion("mfa_secret <>", value, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretGreaterThan(String value) {
+ addCriterion("mfa_secret >", value, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretGreaterThanOrEqualTo(String value) {
+ addCriterion("mfa_secret >=", value, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretLessThan(String value) {
+ addCriterion("mfa_secret <", value, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretLessThanOrEqualTo(String value) {
+ addCriterion("mfa_secret <=", value, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretLike(String value) {
+ addCriterion("mfa_secret like", value, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretNotLike(String value) {
+ addCriterion("mfa_secret not like", value, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretIn(List values) {
+ addCriterion("mfa_secret in", values, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretNotIn(List values) {
+ addCriterion("mfa_secret not in", values, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretBetween(String value1, String value2) {
+ addCriterion("mfa_secret between", value1, value2, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaSecretNotBetween(String value1, String value2) {
+ addCriterion("mfa_secret not between", value1, value2, "mfaSecret");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindIsNull() {
+ addCriterion("mfa_bind is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindIsNotNull() {
+ addCriterion("mfa_bind is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindEqualTo(Integer value) {
+ addCriterion("mfa_bind =", value, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindNotEqualTo(Integer value) {
+ addCriterion("mfa_bind <>", value, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindGreaterThan(Integer value) {
+ addCriterion("mfa_bind >", value, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindGreaterThanOrEqualTo(Integer value) {
+ addCriterion("mfa_bind >=", value, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindLessThan(Integer value) {
+ addCriterion("mfa_bind <", value, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindLessThanOrEqualTo(Integer value) {
+ addCriterion("mfa_bind <=", value, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindIn(List values) {
+ addCriterion("mfa_bind in", values, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindNotIn(List values) {
+ addCriterion("mfa_bind not in", values, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindBetween(Integer value1, Integer value2) {
+ addCriterion("mfa_bind between", value1, value2, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMfaBindNotBetween(Integer value1, Integer value2) {
+ addCriterion("mfa_bind not between", value1, value2, "mfaBind");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberIsNull() {
+ addCriterion("mobile_number is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberIsNotNull() {
+ addCriterion("mobile_number is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberEqualTo(String value) {
+ addCriterion("mobile_number =", value, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberNotEqualTo(String value) {
+ addCriterion("mobile_number <>", value, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberGreaterThan(String value) {
+ addCriterion("mobile_number >", value, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberGreaterThanOrEqualTo(String value) {
+ addCriterion("mobile_number >=", value, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberLessThan(String value) {
+ addCriterion("mobile_number <", value, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberLessThanOrEqualTo(String value) {
+ addCriterion("mobile_number <=", value, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberLike(String value) {
+ addCriterion("mobile_number like", value, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberNotLike(String value) {
+ addCriterion("mobile_number not like", value, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberIn(List values) {
+ addCriterion("mobile_number in", values, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberNotIn(List values) {
+ addCriterion("mobile_number not in", values, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberBetween(String value1, String value2) {
+ addCriterion("mobile_number between", value1, value2, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andMobileNumberNotBetween(String value1, String value2) {
+ addCriterion("mobile_number not between", value1, value2, "mobileNumber");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeIsNull() {
+ addCriterion("last_login_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeIsNotNull() {
+ addCriterion("last_login_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeEqualTo(Long value) {
+ addCriterion("last_login_time =", value, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeNotEqualTo(Long value) {
+ addCriterion("last_login_time <>", value, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeGreaterThan(Long value) {
+ addCriterion("last_login_time >", value, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("last_login_time >=", value, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeLessThan(Long value) {
+ addCriterion("last_login_time <", value, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeLessThanOrEqualTo(Long value) {
+ addCriterion("last_login_time <=", value, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeIn(List values) {
+ addCriterion("last_login_time in", values, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeNotIn(List values) {
+ addCriterion("last_login_time not in", values, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeBetween(Long value1, Long value2) {
+ addCriterion("last_login_time between", value1, value2, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andLastLoginTimeNotBetween(Long value1, Long value2) {
+ addCriterion("last_login_time not between", value1, value2, "lastLoginTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIsNull() {
+ addCriterion("flag is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIsNotNull() {
+ addCriterion("flag is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagEqualTo(Integer value) {
+ addCriterion("flag =", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotEqualTo(Integer value) {
+ addCriterion("flag <>", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagGreaterThan(Integer value) {
+ addCriterion("flag >", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagGreaterThanOrEqualTo(Integer value) {
+ addCriterion("flag >=", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagLessThan(Integer value) {
+ addCriterion("flag <", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagLessThanOrEqualTo(Integer value) {
+ addCriterion("flag <=", value, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagIn(List values) {
+ addCriterion("flag in", values, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotIn(List values) {
+ addCriterion("flag not in", values, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagBetween(Integer value1, Integer value2) {
+ addCriterion("flag between", value1, value2, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andFlagNotBetween(Integer value1, Integer value2) {
+ addCriterion("flag not between", value1, value2, "flag");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeIsNull() {
+ addCriterion("expire_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeIsNotNull() {
+ addCriterion("expire_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeEqualTo(Long value) {
+ addCriterion("expire_time =", value, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeNotEqualTo(Long value) {
+ addCriterion("expire_time <>", value, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeGreaterThan(Long value) {
+ addCriterion("expire_time >", value, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("expire_time >=", value, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeLessThan(Long value) {
+ addCriterion("expire_time <", value, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeLessThanOrEqualTo(Long value) {
+ addCriterion("expire_time <=", value, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeIn(List values) {
+ addCriterion("expire_time in", values, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeNotIn(List values) {
+ addCriterion("expire_time not in", values, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeBetween(Long value1, Long value2) {
+ addCriterion("expire_time between", value1, value2, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andExpireTimeNotBetween(Long value1, Long value2) {
+ addCriterion("expire_time not between", value1, value2, "expireTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Long value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Long value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Long value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Long value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Long value1, Long value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNull() {
+ addCriterion("creator_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIsNotNull() {
+ addCriterion("creator_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdEqualTo(Long value) {
+ addCriterion("creator_id =", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotEqualTo(Long value) {
+ addCriterion("creator_id <>", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThan(Long value) {
+ addCriterion("creator_id >", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("creator_id >=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThan(Long value) {
+ addCriterion("creator_id <", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
+ addCriterion("creator_id <=", value, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdIn(List values) {
+ addCriterion("creator_id in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotIn(List values) {
+ addCriterion("creator_id not in", values, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdBetween(Long value1, Long value2) {
+ addCriterion("creator_id between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
+ addCriterion("creator_id not between", value1, value2, "creatorId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIsNull() {
+ addCriterion("modify_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIsNotNull() {
+ addCriterion("modify_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeEqualTo(Long value) {
+ addCriterion("modify_time =", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotEqualTo(Long value) {
+ addCriterion("modify_time <>", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeGreaterThan(Long value) {
+ addCriterion("modify_time >", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeGreaterThanOrEqualTo(Long value) {
+ addCriterion("modify_time >=", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeLessThan(Long value) {
+ addCriterion("modify_time <", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeLessThanOrEqualTo(Long value) {
+ addCriterion("modify_time <=", value, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeIn(List values) {
+ addCriterion("modify_time in", values, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotIn(List values) {
+ addCriterion("modify_time not in", values, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeBetween(Long value1, Long value2) {
+ addCriterion("modify_time between", value1, value2, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifyTimeNotBetween(Long value1, Long value2) {
+ addCriterion("modify_time not between", value1, value2, "modifyTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIsNull() {
+ addCriterion("modifier_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIsNotNull() {
+ addCriterion("modifier_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdEqualTo(Long value) {
+ addCriterion("modifier_id =", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdNotEqualTo(Long value) {
+ addCriterion("modifier_id <>", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdGreaterThan(Long value) {
+ addCriterion("modifier_id >", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("modifier_id >=", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdLessThan(Long value) {
+ addCriterion("modifier_id <", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdLessThanOrEqualTo(Long value) {
+ addCriterion("modifier_id <=", value, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdIn(List values) {
+ addCriterion("modifier_id in", values, "modifierId");
+ return (Criteria) this;
+ }
+
+ public Criteria andModifierIdNotIn(List