Переглянути джерело

fix:合并dev-v0.4.6调整

xiwa 1 рік тому
батько
коміт
99ce49f4c5
100 змінених файлів з 2828 додано та 3185 видалено
  1. 0 53
      .workflow/BranchPipeline.yml
  2. 0 51
      .workflow/MasterPipeline.yml
  3. 0 40
      .workflow/PRPipeline.yml
  4. 0 8
      Dockerfile
  5. 9 7
      README.md
  6. BIN
      data/components/.DS_Store
  7. 0 110
      data/components/2c089bb8-0412-449e-94f1-212d35a50219/component.js
  8. BIN
      data/components/2c089bb8-0412-449e-94f1-212d35a50219/iot-websocket-component-0.4.5-SNAPSHOT.jar
  9. 0 74
      data/components/305a8b86-4566-4f2a-a57f-f84ca47471a1/component.js
  10. BIN
      data/components/305a8b86-4566-4f2a-a57f-f84ca47471a1/iot-http-biz-component-0.4.5-SNAPSHOT.jar
  11. 0 238
      data/components/3ababc5e-15e9-45a7-8f38-2a6afd45c780/component.js
  12. BIN
      data/components/3ababc5e-15e9-45a7-8f38-2a6afd45c780/iot-DLT645-component-0.4.5-SNAPSHOT.jar
  13. 0 31
      data/components/6c095554-35e7-4e9d-a8d2-bb919e9479f4/component.js
  14. BIN
      data/components/6c095554-35e7-4e9d-a8d2-bb919e9479f4/iot-emqx-component-0.4.5-SNAPSHOT.jar
  15. 0 31
      data/components/750da259-ff77-4869-a5a5-12a5433b0e4c/component.js
  16. BIN
      data/components/750da259-ff77-4869-a5a5-12a5433b0e4c/iot-nb-component-0.4.5-SNAPSHOT.jar
  17. 0 31
      data/components/eabb131d-8fd1-43a8-88d9-a198abfd3d42/component.js
  18. BIN
      data/components/eabb131d-8fd1-43a8-88d9-a198abfd3d42/iot-mqtt-component-0.4.5-SNAPSHOT.jar
  19. 0 595
      data/converters/50b0fdd0-9bc8-448d-a7cf-d3b1b4df944c/converter.js
  20. 0 208
      data/converters/6260396d67aced2696184053/converter.js
  21. 0 55
      data/converters/d7e84930-5460-4638-aa3f-e0c2015628f4/converter.js
  22. 16 16
      data/init/home.json
  23. 27 45
      data/init/space.json
  24. 30 59
      data/init/spaceDevice.json
  25. 11 0
      data/init/sys_app.json
  26. 112 72
      data/init/sys_config.json
  27. 14 1
      data/init/sys_dept.json
  28. 725 452
      data/init/sys_dict_data.json
  29. 65 1
      data/init/sys_dict_type.json
  30. 149 0
      data/init/sys_menu.json
  31. 14 1
      data/init/sys_role.json
  32. 5 1
      data/init/sys_role_dept.json
  33. 1134 414
      data/init/sys_role_menu.json
  34. 17 1
      data/init/sys_tenant.json
  35. 11 1
      data/init/sys_tenant_package.json
  36. 19 2
      data/init/sys_user.json
  37. 4 0
      data/init/sys_user_role.json
  38. 22 2
      data/init/thingModel.json
  39. 16 16
      data/init/userInfo.json
  40. 65 42
      docker-compose/docker-compose.yml
  41. 19 0
      docker-compose/docker.env
  42. 2 8
      iot-dao/iot-data-model/src/main/java/cc/iotkit/model/UserInfo.java
  43. 0 96
      iot-dao/iot-data-model/src/main/java/cc/iotkit/model/device/message/ThingModelMessage.java
  44. 13 4
      iot-dao/iot-data-model/src/main/java/cc/iotkit/model/space/Home.java
  45. 7 11
      iot-dao/iot-data-model/src/main/java/cc/iotkit/model/space/Space.java
  46. 8 25
      iot-dao/iot-data-model/src/main/java/cc/iotkit/model/space/SpaceDevice.java
  47. 5 0
      iot-dao/iot-data-model/src/main/java/cc/iotkit/model/system/SysApp.java
  48. 27 0
      iot-dao/iot-data-model/src/main/java/cc/iotkit/model/wx/XcxLoginBody.java
  49. 27 0
      iot-dao/iot-data-model/src/main/java/cc/iotkit/model/wx/XcxLoginUser.java
  50. 6 8
      iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IHomeData.java
  51. 3 7
      iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/ISpaceData.java
  52. 6 10
      iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/ISpaceDeviceData.java
  53. 0 2
      iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IUserInfoData.java
  54. 1 0
      iot-dao/iot-data-service/src/main/java/cc/iotkit/data/system/ISysAppData.java
  55. 1 1
      iot-dao/iot-data-service/src/main/java/cc/iotkit/data/system/ISysTenantData.java
  56. 1 1
      iot-dao/iot-data-serviceImpl-cache/src/main/java/cc/iotkit/data/cache/SpaceCacheEvict.java
  57. 7 32
      iot-dao/iot-data-serviceImpl-cache/src/main/java/cc/iotkit/data/service/SpaceDataCache.java
  58. 0 5
      iot-dao/iot-data-serviceImpl-cache/src/main/java/cc/iotkit/data/service/UserInfoDataCache.java
  59. 13 7
      iot-dao/iot-data-serviceImpl-rdb/pom.xml
  60. 6 8
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/HomeRepository.java
  61. 6 16
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/SpaceDeviceRepository.java
  62. 2 12
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/SpaceRepository.java
  63. 1 1
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/SysAppRepository.java
  64. 0 2
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/UserInfoRepository.java
  65. 20 7
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbHome.java
  66. 19 15
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSpace.java
  67. 19 32
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSpaceDevice.java
  68. 17 6
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSysApp.java
  69. 1 1
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSysTenant.java
  70. 2 4
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSysTenantPackage.java
  71. 19 11
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbUserInfo.java
  72. 21 32
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/HomeDataImpl.java
  73. 2 55
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SpaceDataImpl.java
  74. 8 63
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SpaceDeviceDataImpl.java
  75. 12 0
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysAppDataImpl.java
  76. 1 0
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysConfigDataImpl.java
  77. 2 1
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysDictDataImpl.java
  78. 2 1
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysDictTypeDataImpl.java
  79. 1 0
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysRoleDataImpl.java
  80. 8 11
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysTenantDataImpl.java
  81. 2 2
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysTenantPackageDataImpl.java
  82. 19 2
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysUserDataImpl.java
  83. 0 5
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/UserInfoDataImpl.java
  84. 1 1
      iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/util/PageBuilder.java
  85. 5 0
      iot-dao/iot-temporal-service/pom.xml
  86. 1 1
      iot-dao/iot-temporal-service/src/main/java/cc/iotkit/temporal/IThingModelMessageData.java
  87. 17 16
      iot-dao/iot-temporal-serviceImpl-es/pom.xml
  88. 1 1
      iot-dao/iot-temporal-serviceImpl-es/src/main/java/cc/iotkit/temporal/es/document/DocThingModelMessage.java
  89. 0 2
      iot-dao/iot-temporal-serviceImpl-es/src/main/java/cc/iotkit/temporal/es/service/DevicePropertyDataImpl.java
  90. 1 1
      iot-dao/iot-temporal-serviceImpl-es/src/main/java/cc/iotkit/temporal/es/service/ThingModelMessageDataImpl.java
  91. 1 1
      iot-dao/iot-temporal-serviceImpl-td/pom.xml
  92. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/config/Constants.java
  93. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/config/TdDatasourceConfig.java
  94. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dao/TdTemplate.java
  95. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/FieldParser.java
  96. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TableManager.java
  97. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdField.java
  98. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdResponse.java
  99. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdRestApi.java
  100. 0 0
      iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/model/TbDeviceProperty.java

+ 0 - 53
.workflow/BranchPipeline.yml

@@ -1,53 +0,0 @@
-version: '1.0'
-name: branch-pipeline
-displayName: BranchPipeline
-stages:
-  - stage: 
-    name: compile
-    displayName: 编译
-    steps:
-      - step: build@maven
-        name: build_maven
-        displayName: Maven 构建
-        # 支持6、7、8、9、10、11六个版本
-        jdkVersion: 8
-        # 支持2.2.1、3.2.5、3.3.9、3.5.2、3.5.3、3.5.4、3.6.1、3.6.3八个版本
-        mavenVersion: 3.3.9
-        # 构建命令
-        commands:
-          - mvn -B clean package -Dmaven.test.skip=true
-        # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
-        artifacts:
-            # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
-          - name: BUILD_ARTIFACT
-            # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径,如通常jar包在target目录下。当前目录为代码库根目录
-            path:
-              - ./target
-      - step: publish@general_artifacts
-        name: publish_general_artifacts
-        displayName: 上传制品
-        # 上游构建任务定义的产物名,默认BUILD_ARTIFACT
-        dependArtifact: BUILD_ARTIFACT
-        # 上传到制品库时的制品命名,默认output
-        artifactName: output
-        dependsOn: build_maven
-  - stage: 
-    name: release
-    displayName: 发布
-    steps:
-      - step: publish@release_artifacts
-        name: publish_release_artifacts
-        displayName: '发布'
-        # 上游上传制品任务的产出
-        dependArtifact: output
-        # 发布制品版本号
-        version: '1.0.0.0'
-        # 是否开启版本号自增,默认开启
-        autoIncrement: true
-triggers:
-  push:
-    branches:
-      exclude:
-        - master
-      include:
-        - .*

+ 0 - 51
.workflow/MasterPipeline.yml

@@ -1,51 +0,0 @@
-version: '1.0'
-name: master-pipeline
-displayName: MasterPipeline
-stages:
-  - stage: 
-    name: compile
-    displayName: 编译
-    steps:
-      - step: build@maven
-        name: build_maven
-        displayName: Maven 构建
-        # 支持6、7、8、9、10、11六个版本
-        jdkVersion: 8
-        # 支持2.2.1、3.2.5、3.3.9、3.5.2、3.5.3、3.5.4、3.6.1、3.6.3八个版本
-        mavenVersion: 3.3.9
-        # 构建命令
-        commands:
-          - mvn -B clean package -Dmaven.test.skip=true
-        # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
-        artifacts:
-            # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
-          - name: BUILD_ARTIFACT
-            # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径,如通常jar包在target目录下。当前目录为代码库根目录
-            path:
-              - ./target
-      - step: publish@general_artifacts
-        name: publish_general_artifacts
-        displayName: 上传制品
-        # 上游构建任务定义的产物名,默认BUILD_ARTIFACT
-        dependArtifact: BUILD_ARTIFACT
-        # 上传到制品库时的制品命名,默认output
-        artifactName: output
-        dependsOn: build_maven
-  - stage: 
-    name: release
-    displayName: 发布
-    steps:
-      - step: publish@release_artifacts
-        name: publish_release_artifacts
-        displayName: '发布'
-        # 上游上传制品任务的产出
-        dependArtifact: output
-        # 发布制品版本号
-        version: '1.0.0.0'
-        # 是否开启版本号自增,默认开启
-        autoIncrement: true
-triggers:
-  push:
-    branches:
-      include:
-        - master

+ 0 - 40
.workflow/PRPipeline.yml

@@ -1,40 +0,0 @@
-version: '1.0'
-name: pr-pipeline
-displayName: PRPipeline
-stages:
-  - stage: 
-    name: compile
-    displayName: 编译
-    steps:
-      - step: build@maven
-        name: build_maven
-        displayName: Maven 构建
-        # 支持6、7、8、9、10、11六个版本
-        jdkVersion: 8
-        # 支持2.2.1、3.2.5、3.3.9、3.5.2、3.5.3、3.5.4、3.6.1、3.6.3八个版本
-        mavenVersion: 3.3.9
-        # 构建命令
-        commands:
-          - mvn -B clean package -Dmaven.test.skip=true
-        # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
-        artifacts:
-            # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
-          - name: BUILD_ARTIFACT
-            # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径,如通常jar包在target目录下。当前目录为代码库根目录
-            path:
-              - ./target
-      - step: publish@general_artifacts
-        name: publish_general_artifacts
-        displayName: 上传制品
-        # 上游构建任务定义的产物名,默认BUILD_ARTIFACT
-        dependArtifact: BUILD_ARTIFACT
-        # 构建产物制品库,默认default,系统默认创建
-        artifactRepository: default
-        # 上传到制品库时的制品命名,默认output
-        artifactName: output
-        dependsOn: build_maven
-triggers:
-  pr:
-    branches:
-      include:
-        - master

+ 0 - 8
Dockerfile

@@ -1,8 +0,0 @@
-FROM openjdk:11-jre-slim
-RUN apt update && apt install -y libfreetype6 fontconfig
-WORKDIR /app
-ADD data/init /app/data/init
-ADD data/converters /app/data/converters
-ADD data/components /app/data/components
-ADD iot-starter/target/iot-starter-0.5.0-SNAPSHOT.jar /app/app.jar
-

+ 9 - 7
README.md

@@ -1,7 +1,7 @@
 
 
 <p align="center">
-<img alt="logo" src="https://xiwasong.github.io/img/logo.png" width="100">
+<img alt="logo" src="http://www.openiita.com/logo.png">
 </p>
 <p align="center"><img  src="https://img.shields.io/badge/JDK-11+-important.svg">  <img  src="https://img.shields.io/badge/Redis-5.0-important.svg"> <img  src="https://img.shields.io/badge/SpringBoot-2.6.2-blue.svg"> <img  src="https://img.shields.io/badge/Elasticsearch-7.15.2-red.svg">  <img  src="https://img.shields.io/badge/Satoken-1.30.0-yellow.svg"> 
 </p>
@@ -73,17 +73,19 @@ Vertx event-bus(内置)、RocketMQ,通过扩展模块可接入其它任意
 
 **注:** es版本为7.15.2,mysql版本为8.0+
 
-##### 关系数据库切换为mysql方法(其它数据库同理)
+##### H2数据库切换为mysql方法(其它数据库同理)
+1、删掉.init、iotkit.mv.db、iotkit.trace.db文件
 
-1、将iot-data-serviceImpl-rdb/pom.xml中的mysql驱动注释放开
+2、将iot-data-serviceImpl-rdb/pom.xml中的mysql驱动注释放开
 
-2、启动时指定active: --spring.profiles.active=mysql
+3、application.yml 注释掉内置H2数据库,打开mysql配置注释
 
-##### 时序数据库切换为TDengin(版本:2.6x)方法
+##### es切换为TDengine(版本:3.x)方法
+1、删掉.init和关系数据库数据
 
-1、注释掉iot-starter/pom.xml中的 iot-temporal-serviceImpl-es,并打开iot-td-temporal-service的注释
+2、注释掉iot-starter/pom.xml中的 iot-temporal-serviceImpl-es,并打开iot-td-temporal-service的注释
 
-2、application.xml中注释掉elasticsearch配置,并打开td-datasource配置
+3、注解掉iot-starter下application.xml中的elasticsearch配置,并打开td-datasource配置
 
 ##### 消息总线切换为RocketMq方法
 

BIN
data/components/.DS_Store


+ 0 - 110
data/components/2c089bb8-0412-449e-94f1-212d35a50219/component.js

@@ -1,110 +0,0 @@
-var mid=1;
-
-function getMid(){
-	mid++;
-	if(mid>10000){
-		mid=1;
-	}
-	return mid;
-};
-function getPkDn(deviceKey){
-	var arr=deviceKey.split("_");
-	return {
-		pk:arr[1],
-		dn:deviceKey
-	};
-}
-function register(data){
-	var device=getPkDn(data.data.deviceName)
-	var subDevicesList=data.data.subDevices
-	var subDevices=[]
-	if(subDevicesList!=undefined&&subDevicesList.length>0){
-		apiTool.log("device:"+subDevicesList);
-		for (var i = 0; i < subDevicesList.length; i++) {
-			var deviceKey=subDevicesList[i]
-			var subDevice=getPkDn(deviceKey)
-			subDevices.push({
-				productKey:subDevice.pk,
-				deviceName:subDevice.dn,
-				model:''
-			})
-		}
-	}
-
-	var reply=
-		{
-			productKey:device.pk,
-			deviceName:device.dn,
-			mid:"0",
-			content:{
-				id:data.id,
-				type:data.type,
-				result:'success'
-			}
-		};
-	var data={
-		productKey:device.pk,
-		deviceName:device.dn
-	}
-	if(subDevices.length>0){
-		data['subDevices']=subDevices
-	}
-	apiTool.log("subDevices:"+JSON.stringify(data));
-	return {
-		type:"register",
-		data:data,
-		action:{
-			type:"ack",
-			content:JSON.stringify(reply)
-		}
-	};
-}
-
-function online(data){
-	apiTool.log("data:"+JSON.stringify(data));
-	var device=getPkDn(data.data.deviceName)
-	return {
-		type:"state",
-		data:{
-			productKey:device.pk,
-			deviceName:device.dn,
-			state:data.type
-		}
-	};
-}
-
-function offline(data){
-	var device=getPkDn(data.deviceKey)
-	return {
-		type:"state",
-		data:{
-			productKey:device.pk,
-			deviceName:device.dn,
-			state:data.type
-		}
-	};
-}
-
-//必须提供onReceive方法
-this.onReceive=function(head,type,payload){
-	var data=JSON.parse(payload)
-	if(data.type=="register"){
-		apiTool.log("data:"+payload);
-		return register(data)
-	}else if(data.type=="online"){
-		return online(data);
-	}else if(data.type=="offline"){
-		return offline(data);
-	}
-	return {
-		productKey:"",
-		deviceName:"",
-		mid:0,
-		content:{
-		}
-	}
-};
-
-this.onRegistered=function (data,status) {
-	apiTool.log("onRegistered调用");
-}

BIN
data/components/2c089bb8-0412-449e-94f1-212d35a50219/iot-websocket-component-0.4.5-SNAPSHOT.jar


+ 0 - 74
data/components/305a8b86-4566-4f2a-a57f-f84ca47471a1/component.js

@@ -1,74 +0,0 @@
-var mid=1;
-
-var gatewayPk="BRD3x4fkKxkaxXFt"
-var smartMeterPk="PwMfpXmp4ZWkGahn"
-
-function getMid(){
-	mid++;
-	if(mid>10000){
-		mid=1;
-	}
-	return mid;
-};
-function register(head){
-	var mac= head.mac;
-	return {
-		type:"register",
-		data:{
-			productKey:gatewayPk,
-			deviceName:mac,
-			model:""
-		}
-	};
-}
-
-function deviceStateChange(head,type){
-	var mac=head.mac;
-	return {
-		type:"state",
-		data:{
-			productKey:gatewayPk,
-			deviceName:mac,
-			state:type
-		}
-	}
-}
-
-function dltHandle(payload){
-	var dltData= JSON.parse(payload);
-	var identify= dltData.identify;
-	var content={};
-	content[identify]=dltData.data;
-	return {
-		type:"report",
-		data:{
-			productKey:smartMeterPk,
-			deviceName:dltData.deviceAddress,
-			mid:getMid(),
-			content:{
-				type:"property",
-				identifier: "report", //属性上报
-				occur: new Date().getTime(), //时间戳,设备上的事件或数据产生的本地时间
-				time: new Date().getTime(), //时间戳,消息上报时间
-				data: content
-			}
-		},
-	}
-}
-
-//必须提供onReceive方法
-this.onReceive=function(head,type,payload){
-	if("register"==type){
-		return register(head);
-	}else if("online"==type){
-		return deviceStateChange(head,type);
-	}else if("offline"==type){
-		return deviceStateChange(head,type);
-	}else if("dlt"==type){
-		return dltHandle(payload);
-	}
-};
-
-this.onRegistered=function (data,status) {
-	apiTool.log("onRegistered调用");
-}

BIN
data/components/305a8b86-4566-4f2a-a57f-f84ca47471a1/iot-http-biz-component-0.4.5-SNAPSHOT.jar


+ 0 - 238
data/components/3ababc5e-15e9-45a7-8f38-2a6afd45c780/component.js

@@ -1,238 +0,0 @@
-//api配置
-apiTool.config("127.0.0.1",8085,3000);
-
-this.onReceive=function(method,path,header,params,body){
-  //method:post、get、delete...
-  //path:请求路径
-  //header:http请求头数据,结构:{xx:xx,yy:yy}
-  //params:请求参数,结构:{xx:[...],yy:[...]}
-  //body:请求体,当提交的数据为json格式时使用,结构:{xx:xx,yy:yy}
-  apiTool.log("onReceive body:"+body);
-  var duHeader=body.header;
-  var namespace=duHeader.namespace;
-  var requestName=duHeader.name;
-  var messageId=duHeader.messageId;
-  var duPayload=body.payload;
-  var token=duPayload.accessToken;
-  var openUid=duPayload.openUid;
-  
-  //设备发现
-  if(namespace=="DuerOS.ConnectedHome.Discovery" && requestName=="DiscoverAppliancesRequest"){
-	var deviceIds=[];
-	var discoveredDevices=[];
-	var content={
-	  header:{
-		namespace:"DuerOS.ConnectedHome.Discovery",
-		name:"DiscoverAppliancesResponse",
-		messageId:messageId,
-		payloadVersion:1
-	  },
-	  payload:{
-		discoveredAppliances:discoveredDevices,
-		discoveredGroups:[{
-		  groupName:"客厅",
-		  applianceIds:deviceIds,
-		  groupNotes:"客厅分组控制",
-		  additionalGroupDetails:{}
-		}]
-	  }
-	};
-    var rst=apiTool.getSpaceDevices(token);
-	apiTool.log(JSON.stringify(rst));
-	if(rst && rst.status==200 && rst.data){
-	  var devices=rst.data;
-	  for(var i in devices){
-		var device=devices[i];
-		var did=device.deviceId;
-		var pk=device.productKey;
-		var dn=device.deviceName;
-		
-		//更新设备openUid
-		rst=apiTool.setOpenUid(token,did,"dueros",openUid);
-		if(!rst || rst.status!=200){
-		  continue;
-		}
-		
-		//插座
-		if(pk=="cGCrkK7Ex4FESAwe"){
-		  var powerstate=device.property.powerstate;
-		  discoveredDevices.push({
-			actions:["turnOn","turnOff"],
-			applianceTypes:["SOCKET"],
-			additionalApplianceDetails:{},
-			applianceId:device.deviceId,
-			friendlyDescription:"智能插座",
-			friendlyName:device.name,
-			isReachable:device.online,
-			manufacturerName:"海曼",
-			modelName:"S1",
-			version:"v1.0",
-			attributes:[
-			  {
-				name:"客厅的插座",
-				scale:"",
-				timestampOfSample:0,
-				uncertaintyInMilliseconds:10
-			  },
-			  {
-				name:"connectivity",
-				value:"REACHABLE",
-				scale:"",
-				timestampOfSample:0,
-				uncertaintyInMilliseconds:10
-			  },
-			  {
-				name:"turnOnState",
-				value:powerstate==1?"ON":"OFF",
-				scale:"",
-				timestampOfSample:0,
-				uncertaintyInMilliseconds:10,
-				legalValue:"(ON, OFF)"
-			  }
-			]
-		  });
-		}else if(pk=="Rf4QSjbm65X45753"){
-		  //开关
-		  var powerstate=device.property.powerstate;
-		  discoveredDevices.push({
-			actions:["turnOn","turnOff"],
-			applianceTypes:["SWITCH"],
-			additionalApplianceDetails:{},
-			applianceId:device.deviceId,
-			friendlyDescription:"智能开关",
-			friendlyName:device.name,
-			isReachable:device.online,
-			manufacturerName:"海曼",
-			modelName:"S1",
-			version:"v1.0",
-			attributes:[
-			  {
-				name:"客厅的开关",
-				scale:"",
-				timestampOfSample:0,
-				uncertaintyInMilliseconds:10
-			  },
-			  {
-				name:"connectivity",
-				value:"REACHABLE",
-				scale:"",
-				timestampOfSample:0,
-				uncertaintyInMilliseconds:10
-			  },
-			  {
-				name:"turnOnState",
-				value:powerstate==1?"ON":"OFF",
-				scale:"",
-				timestampOfSample:0,
-				uncertaintyInMilliseconds:10,
-				legalValue:"(ON, OFF)"
-			  }
-			]
-		  });
-		  
-		}
-	  }
-	}
-	
-	return {
-	  url:"",//不指定直接作为响应返回
-	  header:{
-		contentType:"application/json"
-	  },
-	  content:JSON.stringify(content)
-	}
-  }else if(namespace=="DuerOS.ConnectedHome.Control"){
-	//设备控制
-  	var appliance=duPayload.appliance;
-	var deviceId=appliance.applianceId;
-	var confirmName="UnsupportedOperationError";
-	var rst={status:500};
-	
-	//开关
-	if(requestName=="TurnOnRequest"){
-		//开
-		confirmName="TurnOnConfirmation";
-		rst=apiTool.setProperties(token,deviceId,{powerstate:1});
-	}else if(requestName=="TurnOffRequest"){
-		//关
-	  	confirmName="TurnOffConfirmation";
-		rst=apiTool.setProperties(token,deviceId,{powerstate:0});
-	}
-	
-	if(rst.status!=200){
-	  confirmName="UnsupportedOperationError";
-	  apiTool.log("device control failed:"+JSON.stringify(rst));
-	}
-	
-	var content={
-	  header: {
-		namespace: "DuerOS.ConnectedHome.Control",
-		name: confirmName,
-		messageId: messageId,
-		payloadVersion: "1"
-	  },
-	  payload: {
-		"attributes": []
-	  }
-	};
-	
-	return {
-	  url:"",
-	  header:{
-		contentType:"application/json"
-	  },
-	  content:JSON.stringify(content)
-	}
-  }else if(namespace=="DuerOS.ConnectedHome.Query"){
-	//属性查询
-	if(requestName=="ReportStateRequest"){
-	  var appliance=duPayload.appliance;
-	  var deviceId=appliance.applianceId;
-	  var property=appliance.attributeName;
-	  var propertyVal="";
-	  var success=false;
-	  if(property=="turnOnState"){
-		//开关状态查询
-		var rst= apiTool.getSpaceDeviceDetail(token,deviceId);
-		if(rst && rst.status==200 && rst.data.property){
-		  propertyVal=rst.data.property.powerstate==1?"ON":"OFF";
-		  success=true;
-		}
-	  }
-	  var content=success?{
-		"header": {
-		  "namespace": "DuerOS.ConnectedHome.Query",
-		  "name": "ReportStateResponse",
-		  "messageId": new Date().getTime()+"",
-		  "payloadVersion": "1"
-		},
-		"payload": {
-		  "attributes": [
-			{
-			  "name": property,
-			  "value": propertyVal,
-			  "scale": "",
-			  "timestampOfSample": new Date().getTime()/1000,
-			  "uncertaintyInMilliseconds": 0
-			}
-		  ]
-		}
-	  }:{};
-	  
-	  return {
-		url:"",
-		header:{
-		  contentType:"application/json"
-		},
-		content:JSON.stringify(content)
-	  }
-	}
-  }
-  return {
-	  url:"",//不指定直接作为响应返回
-	  header:{
-		contentType:"application/json"
-	  },
-	  content:""
-	}
-}

BIN
data/components/3ababc5e-15e9-45a7-8f38-2a6afd45c780/iot-DLT645-component-0.4.5-SNAPSHOT.jar


Різницю між файлами не показано, бо вона завелика
+ 0 - 31
data/components/6c095554-35e7-4e9d-a8d2-bb919e9479f4/component.js


BIN
data/components/6c095554-35e7-4e9d-a8d2-bb919e9479f4/iot-emqx-component-0.4.5-SNAPSHOT.jar


Різницю між файлами не показано, бо вона завелика
+ 0 - 31
data/components/750da259-ff77-4869-a5a5-12a5433b0e4c/component.js


BIN
data/components/750da259-ff77-4869-a5a5-12a5433b0e4c/iot-nb-component-0.4.5-SNAPSHOT.jar


Різницю між файлами не показано, бо вона завелика
+ 0 - 31
data/components/eabb131d-8fd1-43a8-88d9-a198abfd3d42/component.js


BIN
data/components/eabb131d-8fd1-43a8-88d9-a198abfd3d42/iot-mqtt-component-0.4.5-SNAPSHOT.jar


+ 0 - 595
data/converters/50b0fdd0-9bc8-448d-a7cf-d3b1b4df944c/converter.js

@@ -1,595 +0,0 @@
-var mid = 1;
-var COMMAD_UNKOWN = 0xff;    //未知的命令
-function getMid() {
-    mid++;
-    if (mid > 10000) {
-        mid = 1;
-    }
-    return mid + "";
-}
-//上行数据
-this.decode = function (msg) {
-    var content = msg.content;
-    var topic = content.topic;
-    var bytes = arrayGroup(content.payload,2);
-    var byteData=content.payload;
-    if (topic.endsWith("/thing/model/up_raw")) {
-        var data = arrayGroup(byteData, 2);
-        var params = {};
-        var uint8Array = new Uint8Array(bytes.length);
-        for (var i = 0; i < bytes.length; i++) {
-            uint8Array[i] = bytes[i] & 0xff;
-        }
-        if (data[1] == '03') {
-            if (byteData.length == 22 ) {
-                params['Switch'] = Number(parseInt(data[3] + data[4], 16))
-                params['HandMode'] = Number(parseInt(data[5] + data[6], 16))+1
-                params['TempGear'] = Number(data[7].slice(1,2))+1
-                params['RatioGear'] = Number(data[7].slice(0,1))+1
-                params['PressureGear'] = data[8].slice(0,1) != 'f' ?  Number(data[8].slice(0,1))+1 : 0
-                params['SpeedGear'] = data[8].slice(1,2) != 'f' ?  Number(data[8].slice(1,2))+1 : 0
-
-            } else if (byteData.length == 126) {
-                params['Pressure'] = Number((parseInt(data[3] + data[4], 16) / 100).toFixed(1))
-                params['EmtyRunPressure'] = Number((parseInt(data[5] + data[6], 16) / 100).toFixed(1))
-                params['StartPressure'] = Number((parseInt(data[7] + data[8], 16) / 100).toFixed(1))
-                params['WorkMode'] = Number((parseInt(data[9] + data[10], 16)).toFixed(0))
-                params['ClearIceEn'] = Number((parseInt(data[11] + data[12], 16)).toFixed(0))
-                params['WaterT'] = Number((parseInt(data[13] + data[14], 16)).toFixed(0))
-                params['WaterTReset'] = Number((parseInt(data[15] + data[16], 16)).toFixed(0))
-                params['SensorMode'] = Number((parseInt(data[17] + data[18], 16)).toFixed(0))
-                params['SensorGroup'] = Number((parseInt(data[19] + data[20], 16)).toFixed(0))
-                params['ElectronicTMax'] = Number(parseInt(data[59], 16))
-                params['ElectronicTMaxReset'] = Number(parseInt(data[60], 16))
-            }  else if (byteData.length == 26) {
-                params['ActiveTime'] =  String(parseInt(data[3], 16))+'-'+String(parseInt(data[4], 16))+'-'+String(parseInt(data[5], 16))
-            }	else if (byteData.length == 190) {
-                params['Pressure'] = Number((parseInt(data[3] + data[4], 16) / 100).toFixed(1))
-                params['EmtyRunPressure'] = Number((parseInt(data[5] + data[6], 16) / 100).toFixed(1))
-                params['StartPressure'] = Number((parseInt(data[7] + data[8], 16) / 100).toFixed(1))
-                params['WorkMode'] = Number((parseInt(data[9] + data[10], 16)).toFixed(0))
-                params['ClearIceEn'] = Number((parseInt(data[11] + data[12], 16)).toFixed(0))
-                params['WaterT'] = Number((parseInt(data[13] + data[14], 16)).toFixed(0))
-                params['WaterTReset'] = Number((parseInt(data[15] + data[16], 16)).toFixed(0))
-                params['SensorMode'] = Number((parseInt(data[17] + data[18], 16)).toFixed(0))
-                params['SensorGroup'] = Number((parseInt(data[19] + data[20], 16)).toFixed(0))
-                params['ElectronicTMax'] = Number(parseInt(data[59], 16))
-                params['ElectronicTMaxReset'] = Number(parseInt(data[60], 16))
-                params['SceneMode'] = Number((parseInt(data[63] + data[64], 16)).toFixed(0))
-                params['EnergyModeTime'] = Number((parseInt(data[65] + data[66], 16)).toFixed(0))
-                params['WaterTime'] = String(Number((parseInt(data[68].substring(0, 1), 16)).toFixed(0))) + ',' + String(Number((parseInt(data[68].substring(1), 16)).toFixed(0)))
-                params['HotWaterTime'] = Number((parseInt(data[69] + data[70], 16)).toFixed(0))
-                params['TempSet'] = String(Number((parseInt(data[71], 16)).toFixed(0)))+','+ String(Number((parseInt(data[72], 16)).toFixed(0)))
-                params['TimeModeSet'] = parseInt(data[73] + data[74], 16)+'-'+parseInt(data[75] + data[76], 16)+','+ parseInt(data[77] + data[78], 16)+'-'+parseInt(data[79] + data[80], 16)+','+ parseInt(data[81] + data[82], 16)+'-'+parseInt(data[83] + data[84], 16)+','+ parseInt(data[85] + data[86], 16)+'-'+parseInt(data[87] + data[88], 16)+','+ parseInt(data[89] + data[90], 16)+'-'+parseInt(data[91] + data[92], 16)
-
-            } else if (byteData.length == 94) {
-                let timeStamp = parseInt(String(data[41])+String(data[42])+String(data[43])+String(data[44]),16)
-                let time = timestampToTime(timeStamp)
-                params['ActiveTime'] =  String(parseInt(data[3], 16))+'-'+String(parseInt(data[4], 16))+'-'+String(parseInt(data[5], 16))
-                params['Time'] =  time + '-'+ timeStamp
-
-            }
-        } else if (data[1] == '04') {
-            if (byteData.length == 54) {
-                params['ErrorMsg'] = Number(parseInt(data[3]+data[4], 16))
-                params['Voltage'] = Number(parseInt(data[5]+data[6], 16))
-                params['Electric'] = Number(parseInt(data[7]+data[8], 16))/10
-                params['Power'] = Number(parseInt(data[9]+data[10], 16))
-                params['Speed'] = Number(parseInt(data[11]+data[12], 16))
-                params['CurrentPressure1'] = data[13] != 'ff' ? Number((parseInt(data[13]+data[14], 16)/100).toFixed(1)) : 0
-                params['CurrentPressure2'] = data[15] != 'ff' ? Number((parseInt(data[15]+data[16], 16)/100).toFixed(1)) : 0
-                params['IpmTemperature'] = Number(parseInt(data[17]+data[18], 16))-55
-                params['MotorTemperature'] = Number(parseInt(data[19]+data[20], 16))-55
-                params['WaterTemperature'] = Number(parseInt(data[21]+data[22], 16))-55
-                let warnArray = reverseStr(hex2bin(data[23] + data[24]))
-                let warnInfo = ""
-                for (let i = 0; i < warnArray.length; i++) {
-                    if (warnArray[i] === "1") {
-                        if (warnInfo === "") {
-                            warnInfo = DEVICE_ERROR[i]
-                        } else {
-                            warnInfo += `、${DEVICE_ERROR[i]}`
-                        }
-                    }
-                }
-
-                params['WarnInfo'] = warnInfo
-
-            } else if (byteData.length == 18) {
-                if (String(byteData) == '130404000800004847') {
-                    params['query'] = String(byteData)
-                } else if (String(byteData).slice(9,10) == 3) {
-                    params['query'] = String(byteData)
-                } else if (String(byteData).slice(9,10) == 4) {
-                    params['query'] = String(byteData)
-                }
-            } else if (byteData.length == 30) {
-                params['McuVersion'] = String(Number(parseInt(data[3].slice(1,2), 16)))+'.'+String(Number(parseInt(data[4].slice(0,1), 16)))+'.'+String(Number(parseInt(data[4].slice(1,2), 16)))
-                params['McuStatus'] = Number(parseInt(data[3].slice(0,1), 16))
-                params['Scene'] = Number(parseInt(data[9]+data[10], 16))
-                params['Model'] = String(Number(parseInt(data[11]+data[12], 16)))+'W'
-
-            } else if (byteData.length == 66) {
-                params['ErrorMsg'] = Number(parseInt(data[3]+data[4], 16))
-                params['Voltage'] = Number(parseInt(data[5]+data[6], 16))
-                params['Electric'] = Number(parseInt(data[7]+data[8], 16))/10
-                params['Power'] = Number(parseInt(data[9]+data[10], 16))
-                params['Speed'] = Number(parseInt(data[11]+data[12], 16))
-                params['CurrentPressure1'] = data[13] != 'ff' ? Number((parseInt(data[13]+data[14], 16)/100).toFixed(1)) : 0
-                params['CurrentPressure2'] = data[15] != 'ff' ? Number((parseInt(data[15]+data[16], 16)/100).toFixed(1)) : 0
-                params['IpmTemperature'] = Number(parseInt(data[17]+data[18], 16))-55
-                params['MotorTemperature'] = Number(parseInt(data[19]+data[20], 16))-55
-                params['WaterTemperature'] = Number(parseInt(data[21]+data[22], 16))-55
-                let warnArray = reverseStr(hex2bin(data[23] + data[24]))
-                let warnInfo = ""
-                for (let i = 0; i < warnArray.length; i++) {
-                    if (warnArray[i] === "1") {
-                        if (warnInfo === "") {
-                            warnInfo = DEVICE_ERROR[i]
-                        } else {
-                            warnInfo += `、${DEVICE_ERROR[i]}`
-                        }
-                    }
-                }
-                params['CountDown'] = Number(parseInt(data[25]+data[26], 16))
-                params['WarnInfo'] = warnInfo
-                params['Enabled'] = Number(parseInt(data[29]+data[30], 16))
-
-            }
-        }
-        params['History'] = byteData
-        //属性上报
-        return {
-            mid: msg.mid,
-            productKey: msg.productKey,
-            deviceName: msg.deviceName,
-            type: "property",
-            identifier: "report", //属性上报
-            occur: new Date().getTime(), //时间戳,设备上的事件或数据产生的本地时间
-            time: new Date().getTime(), //时间戳,消息上报时间
-            data: params,
-        };
-    }
-    return null;
-};
-
-//下行数据
-this.encode = function (service, device) {
-    var deviceMid = getMid();
-    var method = "thing.service.";
-    var topic = "/sys/" + service.productKey + "/" + service.deviceName + "/thing/model/down_raw";
-    var params = {};
-    var payloadArray = [];
-    var deviceArray = [];;
-    var totalArray =[];
-    var totalItemArray = [];
-    var itemArray = [];
-    var outFFIndex = ''
-    var type = service.type;
-    var identifier = service.identifier;
-    if (type == "property" && identifier == "get") {
-        var listParams = []
-        for (var p in service.params) {
-            listParams.push(service.params[p]);
-        }
-        return {
-            productKey: service.productKey,
-            deviceName: service.deviceName,
-            mid: deviceMid,
-            content: {
-                topic: topic,
-                payload: JSON.stringify({
-                    id: deviceMid,
-                    method: method += "property." + identifier,
-                    params: listParams
-                })
-            }
-        }
-    } else if (type == "property" && identifier == "set") {
-        for (var p in service.params) {
-            params[p] = service.params[p];
-        }
-        var paramsArr = Object.keys(params)
-        //站地址
-        if (paramsArr.includes('query')) {
-            let queryHexData = arrayGroup(params['query'],2)
-            let queryData = []
-            queryHexData.map(function(value) {
-                queryData.push(parseInt(value,16))
-            })
-            payloadArray = queryData
-        } else {
-            const stationAddress = "49";
-            totalArray.push(stationAddress)
-            //功能码
-            var functionCode = "";
-            // 寄存器数量
-            var register = ''
-            var baseVal = ''
-            //起始地址
-            var startAddressCode = '';
-            if (paramsArr.length == 1) {
-                functionCode = '06'
-                totalArray.push(functionCode)
-            } else {
-                functionCode = '10'
-                paramsArr = ['Pressure', 'EmtyRunPressure', 'StartPressure', 'WorkMode', 'ClearIceEn', 'WaterT', 'WaterTReset']
-                totalArray.push(parseInt(Number(functionCode),16))
-            }
-            if (paramsArr.includes('Switch')) {
-                startAddressCode = 300
-                totalArray.push('01','44')
-            } else if (paramsArr.includes('Pressure')) {
-                startAddressCode = 400
-                totalArray.push('01','144')
-                register = '00' + add0(String(paramsArr.length),2) + add0(String((paramsArr.length*2).toString(16)),2)
-                totalArray.push('00', add0(paramsArr.length,2), add0(String((paramsArr.length)*2),2))
-            }
-            if (functionCode == 6) {
-                paramsArr.forEach(function(value){
-                    totalArray.push('00',params[value])
-                    itemArray = pad(params[value].toString(16),4)
-                    deviceArray.push(itemArray[0],itemArray[1])
-                })
-            } else if (functionCode == 10) {
-                paramsArr.forEach(function(value, index){
-                    if (index < 3) {
-                        //   if (params[value]*100 < 256) {
-                        //       totalItemArray = ['00', String((params[value]*100).toFixed(0))]
-                        //   itemArray = pad(String((params[value]*100).toString(16)),4)
-                        //   totalItemArray = pad(String((params[value]*100).toFixed(0)),4)
-                        //   } else {
-                        //       outFFIndex = ((Number(params[value]*100))/256).toFixed(0)
-                        //       totalItemArray = [outFFIndex, params[value]*100-outFFIndex*256]
-                        //   }
-
-                        itemArray = pad(Number((params[value]*100).toFixed(0)).toString(16),4)
-                        totalItemArray = pad(String((params[value]*100).toFixed(0)),4)
-                    } else {
-                        itemArray = pad(String(params[value].toString(16)),4)
-                        totalItemArray = pad(String(params[value]),4)
-                    }
-                    // totalArray.push(params[value])
-                    //   totalArray.push(totalItemArray[0],totalItemArray[1])
-                    totalArray.push(parseInt(itemArray[0],16),parseInt(itemArray[1],16))
-                    //   deviceArray.push(parseInt(itemArray[0],16),parseInt(itemArray[1],16))
-                    deviceArray.push(itemArray[0],itemArray[1])
-
-                })
-            }
-
-            var startAddressHex = pad(startAddressCode.toString(16), 4);
-            baseVal = String(stationAddress) + String(functionCode) + String(startAddressHex[0]) + String(startAddressHex[1])
-            if (functionCode != 6) {
-                baseVal += register
-            }
-            deviceArray.forEach(function(item) {
-                baseVal += item
-            })
-            // baseVal += '00070e0064000a00640001000100370037'
-            var Crc = CRC.ToModbusCRC16(baseVal)
-            var crcArray = arrayGroup(Crc,2)
-            totalArray.push(parseInt(crcArray[0],16),parseInt(crcArray[1],16))
-            payloadArray = totalArray;
-        }
-        // var params = json['params'];
-        // var prop_float = params['prop_float'];
-        // var prop_int16 = params['prop_int16'];
-        // var prop_bool = params['prop_bool'];
-        // //按照自定义协议格式拼接 rawData。
-        // payloadArray = payloadArray.concat(buffer_uint8(COMMAND_SET)); //command字段。
-        // payloadArray = payloadArray.concat(buffer_int32(parseInt(id))); //ALink JSON格式 'id'。
-        // payloadArray = payloadArray.concat(buffer_int16(prop_int16)); //属性'prop_int16'的值。
-        // payloadArray = payloadArray.concat(buffer_uint8(prop_bool)); //属性'prop_bool'的值。
-        // payloadArray = payloadArray.concat(buffer_float32(prop_float)); //属性'prop_float'的值。
-
-    }else if (method ==  'thing.event.property.post') { //设备上报数据返回结果,如果不需要回复,可以去除该内容
-        // var code = json['code'];
-        // payloadArray = payloadArray.concat(buffer_uint8(COMMAND_REPORT_REPLY)); //command字段
-        // payloadArray = payloadArray.concat(buffer_int32(parseInt(id))); // ALink JSON格式 'id'
-        // payloadArray = payloadArray.concat(buffer_uint8(code));
-    } else { //未知命令,对于有些命令不做处理
-        var code = "FF";
-        payloadArray = payloadArray.concat(buffer_uint8(COMMAD_UNKOWN)); //command字段
-        payloadArray = payloadArray.concat(buffer_int32(parseInt(id))); // ALink JSON格式 'id'
-        payloadArray = payloadArray.concat(buffer_uint8(code));
-    }
-    var hexstr = ab2hex(payloadArray);
-    console.log("hexstr:" + hexstr);
-
-    return {
-        productKey: service.productKey,
-        deviceName: service.deviceName,
-        mid: deviceMid,
-        content: {
-            topic: topic,
-            payload: hexstr
-        }
-    }
-};
-
-
-const DEVICE_ERROR = [
-    "压力传感器故障", //0
-    "高温限功率", //1
-    "渗漏", // 2
-    "电机温度传感器故障", //3
-    "水温传感器故障", //4
-    "保留", //5
-    "保留", //6
-    "保留", //7
-    "保留", //8
-    "保留", //9
-    "保留", //10
-    "保留", //11
-    "保留", //12
-    "保留", //13
-    "保留", //14
-    "保留", // 15
-    "保留", //16
-]
-function buffer_uint8(value) {
-    var uint8Array = new Uint8Array(1);
-    var dv = new DataView(uint8Array.buffer, 0);
-    dv.setUint8(0, value);
-    return [].slice.call(uint8Array);
-}
-function buffer_int16(value) {
-    var uint8Array = new Uint8Array(2);
-    var dv = new DataView(uint8Array.buffer, 0);
-    dv.setInt16(0, value);
-    return [].slice.call(uint8Array);
-}
-function buffer_int32(value) {
-    var uint8Array = new Uint8Array(4);
-    var dv = new DataView(uint8Array.buffer, 0);
-    dv.setInt32(0, value);
-    return [].slice.call(uint8Array);
-}
-function buffer_float32(value) {
-    var uint8Array = new Uint8Array(4);
-    var dv = new DataView(uint8Array.buffer, 0);
-    dv.setFloat32(0, value);
-    return [].slice.call(uint8Array);
-}
-
-function ab2hex(buffer) {
-    var hexArr = Array.prototype.map.call(
-        new Uint8Array(buffer),
-        function (bit) {
-            return ('00' + bit.toString(16)).slice(-2)
-        }
-    )
-    return hexArr.join('');
-}
-
-function arrayGroup(ss, step) {
-    var r = [];
-
-    function doGroup(s) {
-        if (!s) return;
-        r.push(s.substr(0, step));
-        s = s.substr(step);
-        doGroup(s);
-    }
-    doGroup(ss);
-    return r;
-}
-
-var CRC = {};
-
-CRC._auchCRCHi = [
-    0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
-    0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
-    0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
-    0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
-    0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,
-    0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41,
-    0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,
-    0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
-    0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
-    0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40,
-    0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,
-    0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
-    0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
-    0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40,
-    0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
-    0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
-    0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
-    0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
-    0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
-    0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
-    0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
-    0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40,
-    0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,
-    0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
-    0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
-    0x80, 0x41, 0x00, 0xC1, 0x81, 0x40
-];
-CRC._auchCRCLo = [
-    0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06,
-    0x07, 0xC7, 0x05, 0xC5, 0xC4, 0x04, 0xCC, 0x0C, 0x0D, 0xCD,
-    0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09,
-    0x08, 0xC8, 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A,
-    0x1E, 0xDE, 0xDF, 0x1F, 0xDD, 0x1D, 0x1C, 0xDC, 0x14, 0xD4,
-    0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12, 0x13, 0xD3,
-    0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3,
-    0xF2, 0x32, 0x36, 0xF6, 0xF7, 0x37, 0xF5, 0x35, 0x34, 0xF4,
-    0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A,
-    0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29,
-    0xEB, 0x2B, 0x2A, 0xEA, 0xEE, 0x2E, 0x2F, 0xEF, 0x2D, 0xED,
-    0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26,
-    0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60,
-    0x61, 0xA1, 0x63, 0xA3, 0xA2, 0x62, 0x66, 0xA6, 0xA7, 0x67,
-    0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F,
-    0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68,
-    0x78, 0xB8, 0xB9, 0x79, 0xBB, 0x7B, 0x7A, 0xBA, 0xBE, 0x7E,
-    0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5,
-    0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71,
-    0x70, 0xB0, 0x50, 0x90, 0x91, 0x51, 0x93, 0x53, 0x52, 0x92,
-    0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C,
-    0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B,
-    0x99, 0x59, 0x58, 0x98, 0x88, 0x48, 0x49, 0x89, 0x4B, 0x8B,
-    0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,
-    0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42,
-    0x43, 0x83, 0x41, 0x81, 0x80, 0x40
-];
-
-CRC.CRC16 = function (buffer) {
-    var hi = 0xff;
-    var lo = 0xff;
-    for (var i = 0; i < buffer.length; i++) {
-        var idx = hi ^ buffer[i];
-        hi = (lo ^ CRC._auchCRCHi[idx]);
-        lo = CRC._auchCRCLo[idx];
-    }
-    return CRC.padLeft((hi << 8 | lo).toString(16).toUpperCase(), 4, '0');
-};
-
-CRC.isArray = function (arr) {
-    return Object.prototype.toString.call(arr) === '[object Array]';
-};
-
-CRC.ToCRC16 = function (str) {
-    return CRC.CRC16(CRC.isArray(str) ? str : CRC.strToByte(str));
-};
-
-CRC.ToModbusCRC16 = function (str) {
-    return CRC.CRC16(CRC.isArray(str) ? str : CRC.strToHex(str));
-};
-
-CRC.strToByte = function (str) {
-    var tmp = str.split(""),
-        arr = [];
-    for (var i = 0, c = tmp.length; i < c; i++) {
-        var j = encodeURI(tmp[i]);
-        if (j.length == 1) {
-            arr.push(j.charCodeAt());
-        } else {
-            var b = j.split("%");
-            for (var m = 1; m < b.length; m++) {
-                arr.push(parseInt('0x' + b[m]));
-            }
-        }
-    }
-    return arr;
-};
-
-CRC.convertChinese = function (str) {
-    var tmp = str.split(""),
-        arr = [];
-    for (var i = 0, c = tmp.length; i < c; i++) {
-        var s = tmp[i].charCodeAt();
-        if (s <= 0 || s >= 127) {
-            arr.push(s.toString(16));
-        } else {
-            arr.push(tmp[i]);
-        }
-    }
-    return arr;
-};
-
-CRC.filterChinese = function (str) {
-    var tmp = str.split(""),
-        arr = [];
-    for (var i = 0, c = tmp.length; i < c; i++) {
-        var s = tmp[i].charCodeAt();
-        if (s > 0 && s < 127) {
-            arr.push(tmp[i]);
-        }
-    }
-    return arr;
-};
-
-CRC.strToHex = function (hex, isFilterChinese) {
-    hex = isFilterChinese ? CRC.filterChinese(hex).join('') : CRC.convertChinese(hex).join('');
-
-    //清除所有空格
-    hex = hex.replace(/\s/g, "");
-    //若字符个数为奇数,补一个空格
-    hex += hex.length % 2 != 0 ? " " : "";
-
-    var c = hex.length / 2,
-        arr = [];
-    for (var i = 0; i < c; i++) {
-        arr.push(parseInt(hex.substr(i * 2, 2), 16));
-    }
-    return arr;
-};
-
-CRC.padLeft = function (s, w, pc) {
-    if (pc == undefined) {
-        pc = '0';
-    }
-    for (var i = 0, c = w - s.length; i < c; i++) {
-        s = pc + s;
-    }
-    return s;
-};
-
-function str2ab(str) {
-    var buffer = new ArrayBuffer(str.length / 2); // 2 bytes for each char
-    var dataView = new DataView(buffer);
-    var str = str.split("")
-    var n = 0;
-    for (var i = 0; i < str.length; i = i + 2) {
-        dataView.setUint8(n, `0x${str[i]}${str[i+1]}`)
-        n++;
-    }
-    return buffer;
-}
-
-function pad(num, n, flag = false) {
-    var len = num.toString().length;
-    while (len < n) {
-        num = "0" + num;
-        len++;
-    }
-
-    const arr = arrayGroup(num, 2)
-    //高低位互换
-    if (arr[1] == '00') {
-        flag = true
-    }
-    return flag ? [arr[1], arr[0]] : [arr[0], arr[1]];
-}
-
-function add0(num,n) {
-    let len = num.length
-    while(len < n){
-        num = '0'+num
-        len++
-    }
-    if (len > n) {
-        num = String(num).slice(1)
-    }
-    //console.log(num)
-    return num
-}
-
-function hex2bin(hex, len) {
-    var bin = parseInt(hex, 16).toString(2);
-    var l = bin.length;
-    for (var i = 0; i < len - l; i++) {
-        bin = "0" + bin;
-    }
-    return bin;
-}
-
-//翻转字符串并切割成数组
-function reverseStr(str) {
-    var arr = str.split("");
-    arr.reverse();
-    return arr;
-}
-
-function timestampToTime(timestamp) {
-    var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
-    var Y = date.getFullYear() + '-';
-    var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
-    var D = date.getDate() + ' ';
-    var h = date.getHours() + ':';
-    var m = date.getMinutes() + ':';
-    var s = date.getSeconds();
-    return Y+M+D+h+m+s;
-}

+ 0 - 208
data/converters/6260396d67aced2696184053/converter.js

@@ -1,208 +0,0 @@
-var mid = 1;
-
-function getMid() {
-    mid++;
-    if (mid > 10000) {
-        mid = 1;
-    }
-    return mid + "";
-}
-
-this.decode = function (msg) {
-    //对msg进行解析,并返回物模型数据
-    var content = msg.content;
-    var topic = content.topic;
-    var payload = content.payload;
-    var identifier = topic.substring(topic.lastIndexOf("/") + 1);
-
-    //透传上报
-    if (topic.endsWith("/event/rawReport")) {
-        var rst = component.transparentDecode(payload.params);
-        if (!rst) {
-            return null;
-        }
-        rst.occur = new Date().getTime();
-        rst.time = new Date().getTime();
-        return rst;
-    }
-
-    if (topic.endsWith("/property/post")) {
-        //属性上报
-        return {
-            mid: msg.mid,
-            productKey: msg.productKey,
-            deviceName: msg.deviceName,
-            type: "property",
-            identifier: "report", //属性上报
-            occur: new Date().getTime(), //时间戳,设备上的事件或数据产生的本地时间
-            time: new Date().getTime(), //时间戳,消息上报时间
-            data: payload.params,
-        };
-    } else if (topic.indexOf("/ota/") >= 0) {
-        //事件上报
-        return {
-            mid: msg.mid,
-            productKey: msg.productKey,
-            deviceName: msg.deviceName,
-            type: "ota",
-            identifier: "ota",
-            occur: new Date().getTime(),
-            time: new Date().getTime(),
-            data: payload.params,
-        };
-    } else if (topic.indexOf("/event/") > 0) {
-        //事件上报
-        return {
-            mid: msg.mid,
-            productKey: msg.productKey,
-            deviceName: msg.deviceName,
-            type: "event",
-            identifier: identifier,
-            occur: new Date().getTime(),
-            time: new Date().getTime(),
-            data: payload.params,
-        };
-    } else if (topic.endsWith("/service/property/set_reply")) {
-        //属性设置回复
-        return {
-            mid: msg.mid,
-            productKey: msg.productKey,
-            deviceName: msg.deviceName,
-            type: "property",
-            identifier: identifier,
-            occur: new Date().getTime(),
-            time: new Date().getTime(),
-            code: payload.code
-        };
-    } else if (topic.endsWith("/config/set_reply")) {
-        //设备配置设置回复
-        return {
-            mid: msg.mid,
-            productKey: msg.productKey,
-            deviceName: msg.deviceName,
-            type: "config",
-            identifier: "set_reply",
-            occur: new Date().getTime(),
-            time: new Date().getTime(),
-            code: payload.code
-        };
-    } else if (topic.endsWith("/config/get")) {
-        //设备配置获取
-        return {
-            mid: msg.mid,
-            productKey: msg.productKey,
-            deviceName: msg.deviceName,
-            type: "config",
-            identifier: "get",
-            occur: new Date().getTime(),
-            time: new Date().getTime(),
-            data: {},
-        };
-    } else if (topic.endsWith("_reply")) {
-        //服务回复
-        return {
-            mid: msg.mid,
-            productKey: msg.productKey,
-            deviceName: msg.deviceName,
-            type: "service",
-            identifier: identifier,
-            occur: new Date().getTime(),
-            time: new Date().getTime(),
-            code: payload.code,
-            data: payload.data,
-        };
-    }
-    return null;
-};
-
-this.encode = function (service, device) {
-    var deviceMid = getMid();
-    var method = "thing.service.";
-    var topic = "/sys/" + service.productKey + "/" + service.deviceName + "/c/service/";
-    var params = {};
-
-    //透传下发
-    if (device.transparent) {
-        var rst = component.transparentEncode(service, device);
-        topic = "/sys/" + rst.productKey + "/" + rst.deviceName + "/c/service/rawSend";
-        params.model = rst.content.model;
-        params.deviceName = rst.content.deviceName;
-        params.data = rst.content.data;
-
-        return {
-            productKey: rst.productKey,
-            deviceName: rst.deviceName,
-            mid: rst.mid,
-            content: {
-                topic: topic,
-                payload: JSON.stringify({
-                    id: rst.mid,
-                    method: method + "rawSend",
-                    params: params
-                })
-            }
-        }
-
-    }
-
-    var type = service.type;
-    var identifier = service.identifier;
-
-    if (type == "property") {
-        method += "property." + identifier;
-        topic += "property/" + identifier;
-    } else if (type == "service") {
-        method += identifier;
-        topic += identifier;
-    } else if (type == "ota") {
-        method += identifier;
-        topic = "/ota/device/upgrade/" + service.productKey + "/" + service.deviceName;
-    } else if (type == "config") {
-        //设备配置下发
-        method += identifier;
-        topic = "/sys/" + service.productKey + "/" + service.deviceName + "/c/config/" + identifier;
-    } else if (type = "lifetime") {
-        //子设备注销下发
-        method += identifier;
-        topic = "/sys/" + service.productKey + "/" + service.deviceName + "/c/deregister";
-    }
-    if (type == "property" && identifier == "get") {
-        var listParams = []
-        for (var p in service.params) {
-            listParams.push(service.params[p]);
-        }
-        return {
-            productKey: service.productKey,
-            deviceName: service.deviceName,
-            mid: deviceMid,
-            content: {
-                topic: topic,
-                payload: JSON.stringify({
-                    id: deviceMid,
-                    method: method,
-                    params: listParams
-                })
-            }
-        }
-    } else {
-        for (var p in service.params) {
-            params[p] = service.params[p];
-        }
-        return {
-            productKey: service.productKey,
-            deviceName: service.deviceName,
-            mid: deviceMid,
-            content: {
-                topic: topic,
-                payload: JSON.stringify({
-                    id: deviceMid,
-                    method: method,
-                    params: params
-                })
-            }
-        }
-
-    }
-
-
-};

+ 0 - 55
data/converters/d7e84930-5460-4638-aa3f-e0c2015628f4/converter.js

@@ -1,55 +0,0 @@
-
-var mid=1;
-
-function getMid(){
-	mid++;
-	if(mid>10000){
-		mid=1;
-	}
-	return mid+"";
-}
-
-this.decode = function (msg) {
-	//对msg进行解析,并返回物模型数据
-	var content=msg.content;
-	var type = content.type;
-
-	if (type=="report") {
-		//属性上报
-		return {
-			mid: msg.mid,
-			productKey: msg.productKey,
-			deviceName: msg.deviceName,
-			type:"property",
-			identifier: "report", //属性上报
-			occur: new Date().getTime(), //时间戳,设备上的事件或数据产生的本地时间
-			time: new Date().getTime(), //时间戳,消息上报时间
-			data: content.params,
-		};
-	}
-	return null;
-};
-
-this.encode = function (service,device) {
-	var type=service.type;
-	var identifier=service.identifier;
-	var entityId=service.deviceName;
-	var deviceMid=getMid();
-	var params={};
-	var target={};
-	if("property"==type&&"set"==identifier){
-		var domain=entityId.split(".")[0];
-		var powerstate=service.params.powerstate==1?"turn_on":"turn_off";
-		params.type="call_service";
-		params.domain=domain;
-		params.service=powerstate;
-		target.entity_id=entityId;
-		params.target=target;
-	}
-	return {
-		productKey:service.productKey,
-		deviceName:service.deviceName,
-		mid:deviceMid,
-		content:params
-	}
-};

+ 16 - 16
data/init/home.json

@@ -1,54 +1,54 @@
 [
   {
-    "id": "629e1d80a176d816952f1e82",
+    "id": 1,
     "name": "我的家庭",
     "address": "",
-    "uid": "629e1d7fa176d816952f1e81",
+    "userId": 1,
     "spaceNum": 0,
     "deviceNum": 0,
     "current": true
   },
   {
-    "id": "629e18e96b16ad6a3e158645",
+    "id": 2,
     "name": "我的家",
-    "uid": "629daa3de5a005209d182876",
+    "userId": 3,
     "current": true
   },
   {
-    "id": "6238a49fecf37861bed7ad11",
+    "id": 3,
     "name": "我深圳的家",
     "address": "广东省深圳市南山区西丽镇",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
+    "userId": 1,
     "current": true
   },
   {
-    "id":"6238a485ecf37861bed7ad10",
+    "id":4,
     "name": "我深圳的家",
     "address": "广东省深圳市南山区西丽镇",
-    "uid": "232f506f-76c0-46eb-890b-15edd1022ba1"
+    "userId": 1
   },
   {
-    "id": "6238a2caecf37861bed7ad0f",
+    "id": 5,
     "name": "我深圳的家",
     "address": "广东省深圳市南山区西丽镇",
-    "uid": "232f506f-76c0-46eb-890b-15edd1022ba1"
+    "userId": 1
   },
   {
-    "id": "6238a2adecf37861bed7ad0e",
+    "id": 6,
     "name": "我深圳的家",
     "address": "广东省深圳市南山区西丽镇",
-    "uid": "232f506f-76c0-46eb-890b-15edd1022ba1"
+    "userId": 1
   },
   {
-    "id": "61bafc1e16cb60612ab95f98",
+    "id": 7,
     "name": "myhome",
     "address": "shengzhen nanshan",
-    "uid": "183b4732-ce7f-4e4c-9c18-7e49fbf45579"
+    "userId": 1
   },
   {
-    "id": "61bafb6fb8477d132da69513",
+    "id": 8,
     "name": "myhome",
     "address": "shengzhen nanshan",
-    "uid": "183b4732-ce7f-4e4c-9c18-7e49fbf45579"
+    "userId": 1
   }
 ]

+ 27 - 45
data/init/space.json

@@ -1,65 +1,47 @@
 [
   {
-    "id": "62a6a897f60ef7500d1a916b",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
-    "name": "123",
-    "createAt": 1655089303228
+    "id": 1,
+    "homeId": 1,
+    "name": "123"
   },
   {
-    "id": "62a6a894f60ef7500d1a916a",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
-    "name": "123",
-    "createAt": 1655089300741
+    "id": 2,
+    "homeId": 1,
+    "name": "123"
   },
   {
-    "id": "629e233be0dc6d4171e1a023",
-    "homeId": "629e1d80a176d816952f1e82",
-    "uid": "629e1d7fa176d816952f1e81",
-    "name": "客厅",
-    "createAt": 1654530875839
+    "id": 3,
+    "homeId": 1,
+    "name": "客厅"
   },
   {
-    "id": "629e18fee0dc6d4171e1a021",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "uid": "629daa3de5a005209d182876",
-    "name": "卧室",
-    "createAt": 1654528254438
+    "id": 4,
+    "homeId": 1,
+    "name": "卧室"
   },
   {
-    "id": "629e18f3e0dc6d4171e1a020",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "uid": "629daa3de5a005209d182876",
-    "name": "客厅",
-    "createAt": 1654528243058
+    "id": 5,
+    "homeId": 1,
+    "name": "客厅"
   },
   {
-    "id": "62794a820b0776663635e636",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
-    "name": "阳台",
-    "createAt": 1652116098020
+    "id": 6,
+    "homeId": 1,
+    "name": "阳台"
   },
   {
-    "id": "62794a7d0b0776663635e635",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
-    "name": "厨房",
-    "createAt": 1652116093323
+    "id": 7,
+    "homeId": 1,
+    "name": "厨房"
   },
   {
-    "id": "62794a740b0776663635e634",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
-    "name": "卧室",
-    "createAt": 1652116084721
+    "id": 8,
+    "homeId": 1,
+    "name": "卧室"
   },
   {
-    "id": "62794a5c0b0776663635e633",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
-    "name": "客厅",
-    "createAt": 1652116060926
+    "id": 9,
+    "homeId": 1,
+    "name": "客厅"
   }
 ]

+ 30 - 59
data/init/spaceDevice.json

@@ -1,111 +1,82 @@
 [
   {
-    "id": "629f5821e0dc6d4171e1a029",
-    "uid": "629daa3de5a005209d182876",
+    "id": 1,
     "deviceId": "164785263238900cefafcfeeab0000125",
     "name": "卧室的ZGW01",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "spaceId": "629e18fee0dc6d4171e1a021",
-    "addAt": 1654609953349,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":true
   },
   {
-    "id": "629f581ee0dc6d4171e1a028",
-    "uid": "629daa3de5a005209d182876",
+    "id": 2,
     "deviceId": "164776322117404acb9f03008d1500168",
     "name": "卧室的插座",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "spaceId": "629e18fee0dc6d4171e1a021",
-    "addAt": 1654609950464,
-    "useAt": 1655653227177,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":true
   },
   {
-    "id": "629f581ce0dc6d4171e1a027",
-    "uid": "629daa3de5a005209d182876",
+    "id": 3,
     "deviceId": "1647763221972019a89f03008d1500163",
     "name": "卧室的插座",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "spaceId": "629e18fee0dc6d4171e1a021",
-    "addAt": 1654609948550,
-    "useAt": 1655653294372,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":false
   },
   {
-    "id": "629f581ae0dc6d4171e1a026",
-    "uid": "629daa3de5a005209d182876",
+    "id": 4,
     "deviceId": "164776322227201472a803008d150016e",
     "name": "卧室的插座",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "spaceId": "629e18fee0dc6d4171e1a021",
-    "addAt": 1654609946750,
-    "useAt": 1655653552172,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":false
   },
   {
-    "id":  "629f5818e0dc6d4171e1a025",
-    "uid": "629daa3de5a005209d182876",
+    "id":  5,
     "deviceId": "16477632226720c2cc9f03008d1500166",
     "name": "卧室的插座",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "spaceId": "629e18fee0dc6d4171e1a021",
-    "addAt": 1654609944061,
-    "useAt": 1655653548172,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":false
   },
   {
-    "id": "629f5734e0dc6d4171e1a024",
-    "uid": "629daa3de5a005209d182876",
+    "id": 6,
     "deviceId": "16477632215720c11b1602008d1500160",
     "name": "卧室的插座",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "spaceId": "629e18fee0dc6d4171e1a021",
-    "addAt": 1654609716856,
-    "useAt": 1655653590474,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":false
   },
   {
-    "id": "629e1a1de0dc6d4171e1a022",
-    "uid": "629daa3de5a005209d182876",
+    "id": 7,
     "deviceId": "1647690908735019dd9f03008d1500163",
     "name": "卧室的插座",
-    "homeId": "629e18e96b16ad6a3e158645",
-    "spaceId": "629e18fee0dc6d4171e1a021",
-    "addAt": 1654528541149,
-    "useAt": 1655653255089,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":false
   },
   {
-    "id": "629db2e1e5a005209d182877",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
+    "id": 8,
     "deviceId": "16538390924670pulg0a001006000012a",
     "name": "阳台的插座",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "spaceId": "62794a820b0776663635e636",
-    "addAt": 1654502113734,
-    "useAt": 1655653724374,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":false
   },
   {
-    "id": "6280d7cd7e234141ee9d1fd2",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
+    "id": 9,
     "deviceId": "16501806313260000833feffac33bc16c",
     "name": "灯的插座",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "spaceId": "62794a5c0b0776663635e633",
-    "addAt": 1652611021619,
-    "useAt": 1655181137254,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":false
   },
   {
-    "id": "6280b17d7e234141ee9d1fcf",
-    "uid": "04c6722f-9a6d-40f3-ac9b-cd791b4c8933",
+    "id": 10,
     "deviceId": "165017126122400cefafcfee61000012b",
     "name": "客厅网关",
-    "homeId": "6238a49fecf37861bed7ad11",
-    "spaceId": "62794a5c0b0776663635e633",
-    "addAt": 1652601213676,
-    "useAt": 1655189186348,
+    "homeId": 1,
+    "spaceId": 1,
     "collect":false
   }
 ]

+ 11 - 0
data/init/sys_app.json

@@ -0,0 +1,11 @@
+[
+  {
+    "id": 453554819821637,
+    "appName": "微信小程序",
+    "appId": "wx5eebdd2bab2d805c",
+    "appSecret": "cd8096ac1d6a901fe98d5f745d2bfc2b",
+    "appType": "1",
+    "remark": "微信小程序",
+    "tenantId": "452748015218757"
+  }
+]

+ 112 - 72
data/init/sys_config.json

@@ -1,72 +1,112 @@
- [
-    {
-      "id": 1,
-      "tenantId": "000000",
-      "configName": "主框架页-默认皮肤样式名称",
-      "configKey": "sys.index.skinName",
-      "configValue": "skin-blue",
-      "configType": "Y",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow"
-    },
-    {
-      "id": 2,
-      "tenantId": "000000",
-      "configName": "用户管理-账号初始密码",
-      "configKey": "sys.user.initPassword",
-      "configValue": "123456",
-      "configType": "Y",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "初始化密码 123456"
-    },
-    {
-      "id": 3,
-      "tenantId": "000000",
-      "configName": "主框架页-侧边栏主题",
-      "configKey": "sys.index.sideTheme",
-      "configValue": "theme-dark",
-      "configType": "Y",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "深色主题theme-dark,浅色主题theme-light"
-    },
-    {
-      "id": 5,
-      "tenantId": "000000",
-      "configName": "账号自助-是否开启用户注册功能",
-      "configKey": "sys.account.registerUser",
-      "configValue": "false",
-      "configType": "Y",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "是否开启注册用户功能(true开启,false关闭)"
-    },
-    {
-      "id": 11,
-      "tenantId": "000000",
-      "configName": "OSS预览列表资源开关",
-      "configKey": "sys.oss.previewListResource",
-      "configValue": "true",
-      "configType": "Y",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "true:开启, false:关闭"
-    }
-  ]
+[
+  {
+    "id": 1,
+    "tenantId": "000000",
+    "configName": "主框架页-默认皮肤样式名称",
+    "configKey": "sys.index.skinName",
+    "configValue": "skin-blue",
+    "configType": "Y",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow"
+  },
+  {
+    "id": 2,
+    "tenantId": "000000",
+    "configName": "用户管理-账号初始密码",
+    "configKey": "sys.user.initPassword",
+    "configValue": "123456",
+    "configType": "Y",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "初始化密码 123456"
+  },
+  {
+    "id": 3,
+    "tenantId": "000000",
+    "configName": "主框架页-侧边栏主题",
+    "configKey": "sys.index.sideTheme",
+    "configValue": "theme-dark",
+    "configType": "Y",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "深色主题theme-dark,浅色主题theme-light"
+  },
+  {
+    "id": 5,
+    "tenantId": "000000",
+    "configName": "账号自助-是否开启用户注册功能",
+    "configKey": "sys.account.registerUser",
+    "configValue": "false",
+    "configType": "Y",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "是否开启注册用户功能(true开启,false关闭)"
+  },
+  {
+    "id": 11,
+    "tenantId": "000000",
+    "configName": "OSS预览列表资源开关",
+    "configKey": "sys.oss.previewListResource",
+    "configValue": "true",
+    "configType": "Y",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "true:开启, false:关闭"
+  },
+  {
+    "id": 452767972696133,
+    "configKey": "sys.index.skinName",
+    "configName": "主框架页-默认皮肤样式名称",
+    "configType": "Y",
+    "configValue": "skin-blue",
+    "remark": "蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972700229,
+    "configKey": "sys.user.initPassword",
+    "configName": "用户管理-账号初始密码",
+    "configType": "Y",
+    "configValue": "123456",
+    "remark": "初始化密码 123456",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972704325,
+    "configKey": "sys.index.sideTheme",
+    "configName": "主框架页-侧边栏主题",
+    "configType": "Y",
+    "configValue": "theme-dark",
+    "remark": "深色主题theme-dark,浅色主题theme-light",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972708421,
+    "configKey": "sys.account.registerUser",
+    "configName": "账号自助-是否开启用户注册功能",
+    "configType": "Y",
+    "configValue": "false",
+    "remark": "是否开启注册用户功能(true开启,false关闭)",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972708422,
+    "configKey": "sys.oss.previewListResource",
+    "configName": "OSS预览列表资源开关",
+    "configType": "Y",
+    "configValue": "true",
+    "remark": "true:开启, false:关闭",
+    "tenantId": "452748015218757"
+  }
+]

+ 14 - 1
data/init/sys_dept.json

@@ -178,5 +178,18 @@
 
       "updateBy": null,
       "updateTime": null
-    }
+    },
+   {
+     "id": 452767971254341,
+     "tenantId": "452748015218757",
+     "parentId": 0,
+     "ancestors": "0",
+     "deptName": "测试租户有限公司",
+     "orderNum": null,
+     "leader": "test",
+     "phone": "18888888888",
+     "email": null,
+     "status": "0",
+     "delFlag": "0"
+   }
   ]

+ 725 - 452
data/init/sys_dict_data.json

@@ -1,452 +1,725 @@
- [
-    {
-      "id": 1,
-      "tenantId": "000000",
-      "dictSort": 1,
-      "dictLabel": "男",
-      "dictValue": "0",
-      "dictType": "sys_user_sex",
-      "cssClass": "",
-      "listClass": "",
-      "isDefault": "Y",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "性别男"
-    },
-    {
-      "id": 2,
-      "tenantId": "000000",
-      "dictSort": 2,
-      "dictLabel": "女",
-      "dictValue": "1",
-      "dictType": "sys_user_sex",
-      "cssClass": "",
-      "listClass": "",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "性别女"
-    },
-    {
-      "id": 3,
-      "tenantId": "000000",
-      "dictSort": 3,
-      "dictLabel": "未知",
-      "dictValue": "2",
-      "dictType": "sys_user_sex",
-      "cssClass": "",
-      "listClass": "",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "性别未知"
-    },
-    {
-      "id": 4,
-      "tenantId": "000000",
-      "dictSort": 1,
-      "dictLabel": "显示",
-      "dictValue": "0",
-      "dictType": "sys_show_hide",
-      "cssClass": "",
-      "listClass": "primary",
-      "isDefault": "Y",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "显示菜单"
-    },
-    {
-      "id": 5,
-      "tenantId": "000000",
-      "dictSort": 2,
-      "dictLabel": "隐藏",
-      "dictValue": "1",
-      "dictType": "sys_show_hide",
-      "cssClass": "",
-      "listClass": "danger",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "隐藏菜单"
-    },
-    {
-      "id": 6,
-      "tenantId": "000000",
-      "dictSort": 1,
-      "dictLabel": "正常",
-      "dictValue": "0",
-      "dictType": "sys_normal_disable",
-      "cssClass": "",
-      "listClass": "primary",
-      "isDefault": "Y",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "正常状态"
-    },
-    {
-      "id": 7,
-      "tenantId": "000000",
-      "dictSort": 2,
-      "dictLabel": "停用",
-      "dictValue": "1",
-      "dictType": "sys_normal_disable",
-      "cssClass": "",
-      "listClass": "danger",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "停用状态"
-    },
-    {
-      "id": 12,
-      "tenantId": "000000",
-      "dictSort": 1,
-      "dictLabel": "是",
-      "dictValue": "Y",
-      "dictType": "sys_yes_no",
-      "cssClass": "",
-      "listClass": "primary",
-      "isDefault": "Y",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "系统默认是"
-    },
-    {
-      "id": 13,
-      "tenantId": "000000",
-      "dictSort": 2,
-      "dictLabel": "否",
-      "dictValue": "N",
-      "dictType": "sys_yes_no",
-      "cssClass": "",
-      "listClass": "danger",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "系统默认否"
-    },
-    {
-      "id": 14,
-      "tenantId": "000000",
-      "dictSort": 1,
-      "dictLabel": "通知",
-      "dictValue": "1",
-      "dictType": "sys_notice_type",
-      "cssClass": "",
-      "listClass": "warning",
-      "isDefault": "Y",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "通知"
-    },
-    {
-      "id": 15,
-      "tenantId": "000000",
-      "dictSort": 2,
-      "dictLabel": "公告",
-      "dictValue": "2",
-      "dictType": "sys_notice_type",
-      "cssClass": "",
-      "listClass": "success",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "公告"
-    },
-    {
-      "id": 16,
-      "tenantId": "000000",
-      "dictSort": 1,
-      "dictLabel": "正常",
-      "dictValue": "0",
-      "dictType": "sys_notice_status",
-      "cssClass": "",
-      "listClass": "primary",
-      "isDefault": "Y",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "正常状态"
-    },
-    {
-      "id": 17,
-      "tenantId": "000000",
-      "dict_sort": 2,
-      "dictLabel": "关闭",
-      "dictValue": "1",
-      "dictType": "sys_notice_status",
-      "cssClass": "",
-      "listClass": "danger",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "关闭状态"
-    },
-    {
-      "id": 18,
-      "tenantId": "000000",
-      "dict_sort": 1,
-      "dictLabel": "新增",
-      "dictValue": "1",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "info",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "新增操作"
-    },
-    {
-      "id": 19,
-      "tenantId": "000000",
-      "dict_sort": 2,
-      "dictLabel": "修改",
-      "dictValue": "2",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "info",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "修改操作"
-    },
-    {
-      "id": 20,
-      "tenantId": "000000",
-      "dict_sort": 3,
-      "dictLabel": "删除",
-      "dictValue": "3",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "danger",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "删除操作"
-    },
-    {
-      "id": 21,
-      "tenantId": "000000",
-      "dict_sort": 4,
-      "dictLabel": "授权",
-      "dictValue": "4",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "primary",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "授权操作"
-    },
-    {
-      "id": 22,
-      "tenantId": "000000",
-      "dict_sort": 5,
-      "dictLabel": "导出",
-      "dictValue": "5",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "warning",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "导出操作"
-    },
-    {
-      "id": 23,
-      "tenantId": "000000",
-      "dict_sort": 6,
-      "dictLabel": "导入",
-      "dictValue": "6",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "warning",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "导入操作"
-    },
-    {
-      "id": 24,
-      "tenantId": "000000",
-      "dict_sort": 7,
-      "dictLabel": "强退",
-      "dictValue": "7",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "danger",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "强退操作"
-    },
-    {
-      "id": 25,
-      "tenantId": "000000",
-      "dict_sort": 8,
-      "dictLabel": "生成代码",
-      "dictValue": "8",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "warning",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "生成操作"
-    },
-    {
-      "id": 26,
-      "tenantId": "000000",
-      "dict_sort": 9,
-      "dictLabel": "清空数据",
-      "dictValue": "9",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "danger",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "清空操作"
-    },
-    {
-      "id": 27,
-      "tenantId": "000000",
-      "dict_sort": 1,
-      "dictLabel": "成功",
-      "dictValue": "0",
-      "dictType": "sys_common_status",
-      "cssClass": "",
-      "listClass": "primary",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "正常状态"
-    },
-    {
-      "id": 28,
-      "tenantId": "000000",
-      "dict_sort": 2,
-      "dictLabel": "失败",
-      "dictValue": "1",
-      "dictType": "sys_common_status",
-      "cssClass": "",
-      "listClass": "danger",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "停用状态"
-    },
-    {
-      "id": 29,
-      "tenantId": "000000",
-      "dict_sort": 99,
-      "dictLabel": "其他",
-      "dictValue": "0",
-      "dictType": "sys_oper_type",
-      "cssClass": "",
-      "listClass": "info",
-      "isDefault": "N",
-      "status": "0",
-      "createDept": 103,
-      "createBy": 1,
-
-      "updateBy": null,
-      "updateTime": null,
-      "remark": "其他操作"
-    }
-  ]
+[
+  {
+    "id": 1,
+    "tenantId": "000000",
+    "dictSort": 1,
+    "dictLabel": "男",
+    "dictValue": "0",
+    "dictType": "sys_user_sex",
+    "cssClass": "",
+    "listClass": "",
+    "isDefault": "Y",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "性别男"
+  },
+  {
+    "id": 2,
+    "tenantId": "000000",
+    "dictSort": 2,
+    "dictLabel": "女",
+    "dictValue": "1",
+    "dictType": "sys_user_sex",
+    "cssClass": "",
+    "listClass": "",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "性别女"
+  },
+  {
+    "id": 3,
+    "tenantId": "000000",
+    "dictSort": 3,
+    "dictLabel": "未知",
+    "dictValue": "2",
+    "dictType": "sys_user_sex",
+    "cssClass": "",
+    "listClass": "",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "性别未知"
+  },
+  {
+    "id": 4,
+    "tenantId": "000000",
+    "dictSort": 1,
+    "dictLabel": "显示",
+    "dictValue": "0",
+    "dictType": "sys_show_hide",
+    "cssClass": "",
+    "listClass": "primary",
+    "isDefault": "Y",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "显示菜单"
+  },
+  {
+    "id": 5,
+    "tenantId": "000000",
+    "dictSort": 2,
+    "dictLabel": "隐藏",
+    "dictValue": "1",
+    "dictType": "sys_show_hide",
+    "cssClass": "",
+    "listClass": "danger",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "隐藏菜单"
+  },
+  {
+    "id": 6,
+    "tenantId": "000000",
+    "dictSort": 1,
+    "dictLabel": "正常",
+    "dictValue": "0",
+    "dictType": "sys_normal_disable",
+    "cssClass": "",
+    "listClass": "primary",
+    "isDefault": "Y",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "正常状态"
+  },
+  {
+    "id": 7,
+    "tenantId": "000000",
+    "dictSort": 2,
+    "dictLabel": "停用",
+    "dictValue": "1",
+    "dictType": "sys_normal_disable",
+    "cssClass": "",
+    "listClass": "danger",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "停用状态"
+  },
+  {
+    "id": 12,
+    "tenantId": "000000",
+    "dictSort": 1,
+    "dictLabel": "是",
+    "dictValue": "Y",
+    "dictType": "sys_yes_no",
+    "cssClass": "",
+    "listClass": "primary",
+    "isDefault": "Y",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "系统默认是"
+  },
+  {
+    "id": 13,
+    "tenantId": "000000",
+    "dictSort": 2,
+    "dictLabel": "否",
+    "dictValue": "N",
+    "dictType": "sys_yes_no",
+    "cssClass": "",
+    "listClass": "danger",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "系统默认否"
+  },
+  {
+    "id": 14,
+    "tenantId": "000000",
+    "dictSort": 1,
+    "dictLabel": "通知",
+    "dictValue": "1",
+    "dictType": "sys_notice_type",
+    "cssClass": "",
+    "listClass": "warning",
+    "isDefault": "Y",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "通知"
+  },
+  {
+    "id": 15,
+    "tenantId": "000000",
+    "dictSort": 2,
+    "dictLabel": "公告",
+    "dictValue": "2",
+    "dictType": "sys_notice_type",
+    "cssClass": "",
+    "listClass": "success",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "公告"
+  },
+  {
+    "id": 16,
+    "tenantId": "000000",
+    "dictSort": 1,
+    "dictLabel": "正常",
+    "dictValue": "0",
+    "dictType": "sys_notice_status",
+    "cssClass": "",
+    "listClass": "primary",
+    "isDefault": "Y",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "正常状态"
+  },
+  {
+    "id": 17,
+    "tenantId": "000000",
+    "dict_sort": 2,
+    "dictLabel": "关闭",
+    "dictValue": "1",
+    "dictType": "sys_notice_status",
+    "cssClass": "",
+    "listClass": "danger",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "关闭状态"
+  },
+  {
+    "id": 18,
+    "tenantId": "000000",
+    "dict_sort": 1,
+    "dictLabel": "新增",
+    "dictValue": "1",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "info",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "新增操作"
+  },
+  {
+    "id": 19,
+    "tenantId": "000000",
+    "dict_sort": 2,
+    "dictLabel": "修改",
+    "dictValue": "2",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "info",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "修改操作"
+  },
+  {
+    "id": 20,
+    "tenantId": "000000",
+    "dict_sort": 3,
+    "dictLabel": "删除",
+    "dictValue": "3",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "danger",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "删除操作"
+  },
+  {
+    "id": 21,
+    "tenantId": "000000",
+    "dict_sort": 4,
+    "dictLabel": "授权",
+    "dictValue": "4",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "primary",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "授权操作"
+  },
+  {
+    "id": 22,
+    "tenantId": "000000",
+    "dict_sort": 5,
+    "dictLabel": "导出",
+    "dictValue": "5",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "warning",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "导出操作"
+  },
+  {
+    "id": 23,
+    "tenantId": "000000",
+    "dict_sort": 6,
+    "dictLabel": "导入",
+    "dictValue": "6",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "warning",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "导入操作"
+  },
+  {
+    "id": 24,
+    "tenantId": "000000",
+    "dict_sort": 7,
+    "dictLabel": "强退",
+    "dictValue": "7",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "danger",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "强退操作"
+  },
+  {
+    "id": 25,
+    "tenantId": "000000",
+    "dict_sort": 8,
+    "dictLabel": "生成代码",
+    "dictValue": "8",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "warning",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "生成操作"
+  },
+  {
+    "id": 26,
+    "tenantId": "000000",
+    "dict_sort": 9,
+    "dictLabel": "清空数据",
+    "dictValue": "9",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "danger",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "清空操作"
+  },
+  {
+    "id": 27,
+    "tenantId": "000000",
+    "dict_sort": 1,
+    "dictLabel": "成功",
+    "dictValue": "0",
+    "dictType": "sys_common_status",
+    "cssClass": "",
+    "listClass": "primary",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "正常状态"
+  },
+  {
+    "id": 28,
+    "tenantId": "000000",
+    "dict_sort": 2,
+    "dictLabel": "失败",
+    "dictValue": "1",
+    "dictType": "sys_common_status",
+    "cssClass": "",
+    "listClass": "danger",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "停用状态"
+  },
+  {
+    "id": 29,
+    "tenantId": "000000",
+    "dict_sort": 99,
+    "dictLabel": "其他",
+    "dictValue": "0",
+    "dictType": "sys_oper_type",
+    "cssClass": "",
+    "listClass": "info",
+    "isDefault": "N",
+    "status": "0",
+    "createDept": 103,
+    "createBy": 1,
+    "updateBy": null,
+    "updateTime": null,
+    "remark": "其他操作"
+  },
+  {
+    "id": 452767972405317,
+    "dictLabel": "关闭",
+    "dict_sort": null,
+    "dictType": "sys_notice_status",
+    "dictValue": "1",
+    "isDefault": "N",
+    "listClass": "danger",
+    "remark": "关闭状态",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972409413,
+    "dictLabel": "新增",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "1",
+    "isDefault": "N",
+    "listClass": "info",
+    "remark": "新增操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972409414,
+    "dictLabel": "修改",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "2",
+    "isDefault": "N",
+    "listClass": "info",
+    "remark": "修改操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972409415,
+    "dictLabel": "删除",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "3",
+    "isDefault": "N",
+    "listClass": "danger",
+    "remark": "删除操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972409416,
+    "dictLabel": "授权",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "4",
+    "isDefault": "N",
+    "listClass": "primary",
+    "remark": "授权操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972409417,
+    "dictLabel": "导出",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "5",
+    "isDefault": "N",
+    "listClass": "warning",
+    "remark": "导出操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972413509,
+    "dictLabel": "导入",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "6",
+    "isDefault": "N",
+    "listClass": "warning",
+    "remark": "导入操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972413510,
+    "dictLabel": "强退",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "7",
+    "isDefault": "N",
+    "listClass": "danger",
+    "remark": "强退操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972413511,
+    "dictLabel": "生成代码",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "8",
+    "isDefault": "N",
+    "listClass": "warning",
+    "remark": "生成操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972413512,
+    "dictLabel": "清空数据",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "9",
+    "isDefault": "N",
+    "listClass": "danger",
+    "remark": "清空操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972413513,
+    "dictLabel": "成功",
+    "dict_sort": null,
+    "dictType": "sys_common_status",
+    "dictValue": "0",
+    "isDefault": "N",
+    "listClass": "primary",
+    "remark": "正常状态",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972417605,
+    "dictLabel": "失败",
+    "dict_sort": null,
+    "dictType": "sys_common_status",
+    "dictValue": "1",
+    "isDefault": "N",
+    "listClass": "danger",
+    "remark": "停用状态",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972417606,
+    "dictLabel": "其他",
+    "dict_sort": null,
+    "dictType": "sys_oper_type",
+    "dictValue": "0",
+    "isDefault": "N",
+    "listClass": "info",
+    "remark": "其他操作",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972417607,
+    "dictLabel": "男",
+    "dict_sort": 1,
+    "dictType": "sys_user_sex",
+    "dictValue": "0",
+    "isDefault": "Y",
+    "listClass": "",
+    "remark": "性别男",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972417608,
+    "dictLabel": "显示",
+    "dict_sort": 1,
+    "dictType": "sys_show_hide",
+    "dictValue": "0",
+    "isDefault": "Y",
+    "listClass": "primary",
+    "remark": "显示菜单",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972417609,
+    "dictLabel": "正常",
+    "dict_sort": 1,
+    "dictType": "sys_normal_disable",
+    "dictValue": "0",
+    "isDefault": "Y",
+    "listClass": "primary",
+    "remark": "正常状态",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972421701,
+    "dictLabel": "是",
+    "dict_sort": 1,
+    "dictType": "sys_yes_no",
+    "dictValue": "Y",
+    "isDefault": "Y",
+    "listClass": "primary",
+    "remark": "系统默认是",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972421702,
+    "dictLabel": "通知",
+    "dict_sort": 1,
+    "dictType": "sys_notice_type",
+    "dictValue": "1",
+    "isDefault": "Y",
+    "listClass": "warning",
+    "remark": "通知",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972421703,
+    "dictLabel": "正常",
+    "dict_sort": 1,
+    "dictType": "sys_notice_status",
+    "dictValue": "0",
+    "isDefault": "Y",
+    "listClass": "primary",
+    "remark": "正常状态",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972421704,
+    "dictLabel": "女",
+    "dict_sort": 2,
+    "dictType": "sys_user_sex",
+    "dictValue": "1",
+    "isDefault": "N",
+    "remark": "性别女",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972421705,
+    "dictLabel": "隐藏",
+    "dict_sort": 2,
+    "dictType": "sys_show_hide",
+    "dictValue": "1",
+    "isDefault": "N",
+    "listClass": "danger",
+    "remark": "隐藏菜单",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972425797,
+    "dictLabel": "停用",
+    "dict_sort": 2,
+    "dictType": "sys_normal_disable",
+    "dictValue": "1",
+    "isDefault": "N",
+    "listClass": "danger",
+    "remark": "停用状态",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972425798,
+    "dictLabel": "否",
+    "dict_sort": 2,
+    "dictType": "sys_yes_no",
+    "dictValue": "N",
+    "isDefault": "N",
+    "listClass": "danger",
+    "remark": "系统默认否",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972425799,
+    "dictLabel": "公告",
+    "dict_sort": 2,
+    "dictType": "sys_notice_type",
+    "dictValue": "2",
+    "isDefault": "N",
+    "listClass": "success",
+    "remark": "公告",
+    "status": "0",
+    "tenantId": "452748015218757"
+  },
+  {
+    "id": 452767972425800,
+    "dictLabel": "未知",
+    "dict_sort": 3,
+    "dictType": "sys_user_sex",
+    "dictValue": "2",
+    "isDefault": "N",
+    "remark": "性别未知",
+    "status": "0",
+    "tenantId": "452748015218757"
+  }
+]

+ 65 - 1
data/init/sys_dict_type.json

@@ -102,5 +102,69 @@
       "updateBy": null,
       "updateTime": null,
       "remark": "登录状态列表"
-    }
+    },
+   {
+     "id": 452767972294725,
+     "tenantId": "452748015218757",
+     "dictName": "用户性别",
+     "dictType": "sys_user_sex",
+     "status": "0",
+     "remark": "用户性别列表"
+   },
+   {
+     "id": 452767972298821,
+     "tenantId": "452748015218757",
+     "dictName": "菜单状态",
+     "dictType": "sys_show_hide",
+     "status": "0",
+     "remark": "菜单状态列表"
+   },
+   {
+     "id": 452767972298822,
+     "tenantId": "452748015218757",
+     "dictName": "系统开关",
+     "dictType": "sys_normal_disable",
+     "status": "0",
+     "remark": "系统开关列表"
+   },
+   {
+     "id": 452767972298823,
+     "tenantId": "452748015218757",
+     "dictName": "系统是否",
+     "dictType": "sys_yes_no",
+     "status": "0",
+     "remark": "系统是否列表"
+   },
+   {
+     "id": 452767972298824,
+     "tenantId": "452748015218757",
+     "dictName": "通知类型",
+     "dictType": "sys_notice_type",
+     "status": "0",
+     "remark": "通知类型列表"
+   },
+   {
+     "id": 452767972298825,
+     "tenantId": "452748015218757",
+     "dictName": "通知状态",
+     "dictType": "sys_notice_status",
+     "status": "0",
+     "remark": "通知状态列表"
+   },
+   {
+     "id": 452767972302917,
+     "tenantId": "452748015218757",
+     "dictName": "操作类型",
+     "dictType": "sys_oper_type",
+     "status": "0",
+     "remark": "操作类型列表"
+   },
+   {
+     "id": 452767972302918,
+     "tenantId": "452748015218757",
+     "dictName": "登录状态",
+     "dictType": "sys_common_status",
+     "status": "0",
+     "remark": "登录状态列表"
+   }
   ]

+ 149 - 0
data/init/sys_menu.json

@@ -422,6 +422,155 @@
     "remark":"文件管理菜单",
     "children":[
 
+    ]
+  },{
+  "createDept":103,
+  "createBy":1,
+  "createTime":null,
+  "updateBy":null,
+  "updateTime":null,
+  "id":502,
+  "menuName":"应用管理",
+  "parentId":1,
+  "orderNum":11,
+  "path":"app",
+  "component":"system/app/index",
+  "queryParam":"",
+  "isFrame":"1",
+  "isCache":"0",
+  "menuType":"C",
+  "visible":"0",
+  "status":"0",
+  "perms":"system:app:list",
+  "icon":"phone",
+  "remark":"应用管理菜单",
+  "children":[
+
+  ]
+},
+  {
+    "createDept":null,
+    "createBy":null,
+    "createTime":null,
+    "updateBy":null,
+    "updateTime":null,
+    "id":442129,
+    "menuName":"应用查询",
+    "parentId":502,
+    "orderNum":1,
+    "path":"",
+    "component":null,
+    "queryParam":null,
+    "isFrame":"1",
+    "isCache":"0",
+    "menuType":"F",
+    "visible":"0",
+    "status":"0",
+    "perms":"system:app:query",
+    "icon":"",
+    "remark":null,
+    "children":[
+
+    ]
+  },
+  {
+    "createDept":null,
+    "createBy":null,
+    "createTime":null,
+    "updateBy":null,
+    "updateTime":null,
+    "id":44212332,
+    "menuName":"应用添加",
+    "parentId":502,
+    "orderNum":2,
+    "path":"",
+    "component":null,
+    "queryParam":null,
+    "isFrame":"1",
+    "isCache":"0",
+    "menuType":"F",
+    "visible":"0",
+    "status":"0",
+    "perms":"system:app:add",
+    "icon":"",
+    "remark":null,
+    "children":[
+
+    ]
+  },
+  {
+    "createDept":null,
+    "createBy":null,
+    "createTime":null,
+    "updateBy":null,
+    "updateTime":null,
+    "id":442123323123,
+    "menuName":"应用删除",
+    "parentId":502,
+    "orderNum":3,
+    "path":"",
+    "component":null,
+    "queryParam":null,
+    "isFrame":"1",
+    "isCache":"0",
+    "menuType":"F",
+    "visible":"0",
+    "status":"0",
+    "perms":"system:app:remove",
+    "icon":"",
+    "remark":null,
+    "children":[
+
+    ]
+  },
+  {
+    "createDept":null,
+    "createBy":null,
+    "createTime":null,
+    "updateBy":null,
+    "updateTime":null,
+    "id":423,
+    "menuName":"应用修改",
+    "parentId":502,
+    "orderNum":4,
+    "path":"",
+    "component":null,
+    "queryParam":null,
+    "isFrame":"1",
+    "isCache":"0",
+    "menuType":"F",
+    "visible":"0",
+    "status":"0",
+    "perms":"system:app:edit",
+    "icon":"",
+    "remark":null,
+    "children":[
+
+    ]
+  },
+  {
+    "createDept":null,
+    "createBy":null,
+    "createTime":null,
+    "updateBy":null,
+    "updateTime":null,
+    "id":4234553537,
+    "menuName":"应用导出",
+    "parentId":502,
+    "orderNum":5,
+    "path":"",
+    "component":null,
+    "queryParam":null,
+    "isFrame":"1",
+    "isCache":"0",
+    "menuType":"F",
+    "visible":"0",
+    "status":"0",
+    "perms":"system:app:export",
+    "icon":"",
+    "remark":null,
+    "children":[
+
     ]
   },
   {

+ 14 - 1
data/init/sys_role.json

@@ -34,5 +34,18 @@
       "updateBy": null,
       "updateTime": null,
       "remark": "普通角色"
-    }
+    },
+   {
+     "id": 452767970971717,
+     "tenantId": "452748015218757",
+     "roleName": "管理员",
+     "roleKey": "admin",
+     "roleSort": 1,
+     "data_scope": null,
+     "menuCheck_strictly": null,
+     "deptCheck_strictly": null,
+     "status": "0",
+     "delFlag": "0",
+     "remark": "管理员"
+   }
   ]

+ 5 - 1
data/init/sys_role_dept.json

@@ -10,5 +10,9 @@
     {
       "roleId": 2,
       "deptId": 105
-    }
+    },
+   {
+     "roleId": 452767970971717,
+     "deptId": 452767971254341
+   }
   ]

+ 1134 - 414
data/init/sys_role_menu.json

@@ -1,692 +1,1412 @@
 [
   {
-    "id":447227041742917,
-    "roleId":2,
-    "menuId":1
+    "id": 447227041742917,
+    "roleId": 2,
+    "menuId": 1
   },
   {
-    "id":447227041742918,
-    "roleId":2,
-    "menuId":100
+    "id": 447227041742918,
+    "roleId": 2,
+    "menuId": 100
   },
   {
-    "id":447227041742919,
-    "roleId":2,
-    "menuId":1001
+    "id": 447227041742919,
+    "roleId": 2,
+    "menuId": 1001
   },
   {
-    "id":447227041747013,
-    "roleId":2,
-    "menuId":1002
+    "id": 447227041747013,
+    "roleId": 2,
+    "menuId": 1002
   },
   {
-    "id":447227041747014,
-    "roleId":2,
-    "menuId":1003
+    "id": 447227041747014,
+    "roleId": 2,
+    "menuId": 1003
   },
   {
-    "id":447227041747015,
-    "roleId":2,
-    "menuId":1005
+    "id": 447227041747015,
+    "roleId": 2,
+    "menuId": 1005
   },
   {
-    "id":447227041747016,
-    "roleId":2,
-    "menuId":101
+    "id": 447227041747016,
+    "roleId": 2,
+    "menuId": 101
   },
   {
-    "id":447227041747017,
-    "roleId":2,
-    "menuId":1008
+    "id": 447227041747017,
+    "roleId": 2,
+    "menuId": 1008
   },
   {
-    "id":447227041747018,
-    "roleId":2,
-    "menuId":1009
+    "id": 447227041747018,
+    "roleId": 2,
+    "menuId": 1009
   },
   {
-    "id":447227041747019,
-    "roleId":2,
-    "menuId":1010
+    "id": 447227041747019,
+    "roleId": 2,
+    "menuId": 1010
   },
   {
-    "id":447227041747020,
-    "roleId":2,
-    "menuId":1012
+    "id": 447227041747020,
+    "roleId": 2,
+    "menuId": 1012
   },
   {
-    "id":447227041747021,
-    "roleId":2,
-    "menuId":102
+    "id": 447227041747021,
+    "roleId": 2,
+    "menuId": 102
   },
   {
-    "id":447227041747022,
-    "roleId":2,
-    "menuId":1013
+    "id": 447227041747022,
+    "roleId": 2,
+    "menuId": 1013
   },
   {
-    "id":447227041747023,
-    "roleId":2,
-    "menuId":1014
+    "id": 447227041747023,
+    "roleId": 2,
+    "menuId": 1014
   },
   {
-    "id":447227041747024,
-    "roleId":2,
-    "menuId":1015
+    "id": 447227041747024,
+    "roleId": 2,
+    "menuId": 1015
   },
   {
-    "id":447227041747025,
-    "roleId":2,
-    "menuId":103
+    "id": 447227041747025,
+    "roleId": 2,
+    "menuId": 103
   },
   {
-    "id":447227041747026,
-    "roleId":2,
-    "menuId":1017
+    "id": 447227041747026,
+    "roleId": 2,
+    "menuId": 1017
   },
   {
-    "id":447227041747027,
-    "roleId":2,
-    "menuId":1018
+    "id": 447227041747027,
+    "roleId": 2,
+    "menuId": 1018
   },
   {
-    "id":447227041747028,
-    "roleId":2,
-    "menuId":1019
+    "id": 447227041747028,
+    "roleId": 2,
+    "menuId": 1019
   },
   {
-    "id":447227041747029,
-    "roleId":2,
-    "menuId":104
+    "id": 447227041747029,
+    "roleId": 2,
+    "menuId": 104
   },
   {
-    "id":447227041751109,
-    "roleId":2,
-    "menuId":1021
+    "id": 447227041751109,
+    "roleId": 2,
+    "menuId": 1021
   },
   {
-    "id":447227041751110,
-    "roleId":2,
-    "menuId":1022
+    "id": 447227041751110,
+    "roleId": 2,
+    "menuId": 1022
   },
   {
-    "id":447227041751111,
-    "roleId":2,
-    "menuId":1023
+    "id": 447227041751111,
+    "roleId": 2,
+    "menuId": 1023
   },
   {
-    "id":447227041751112,
-    "roleId":2,
-    "menuId":1025
+    "id": 447227041751112,
+    "roleId": 2,
+    "menuId": 1025
   },
   {
-    "id":447227041751113,
-    "roleId":2,
-    "menuId":105
+    "id": 447227041751113,
+    "roleId": 2,
+    "menuId": 105
   },
   {
-    "id":447227041751114,
-    "roleId":2,
-    "menuId":1026
+    "id": 447227041751114,
+    "roleId": 2,
+    "menuId": 1026
   },
   {
-    "id":447227041751115,
-    "roleId":2,
-    "menuId":1027
+    "id": 447227041751115,
+    "roleId": 2,
+    "menuId": 1027
   },
   {
-    "id":447227041751116,
-    "roleId":2,
-    "menuId":1028
+    "id": 447227041751116,
+    "roleId": 2,
+    "menuId": 1028
   },
   {
-    "id":447227041751117,
-    "roleId":2,
-    "menuId":1030
+    "id": 447227041751117,
+    "roleId": 2,
+    "menuId": 1030
   },
   {
-    "id":447227041751118,
-    "roleId":2,
-    "menuId":106
+    "id": 447227041751118,
+    "roleId": 2,
+    "menuId": 106
   },
   {
-    "id":447227041751119,
-    "roleId":2,
-    "menuId":1031
+    "id": 447227041751119,
+    "roleId": 2,
+    "menuId": 1031
   },
   {
-    "id":447227041751120,
-    "roleId":2,
-    "menuId":1032
+    "id": 447227041751120,
+    "roleId": 2,
+    "menuId": 1032
   },
   {
-    "id":447227041751121,
-    "roleId":2,
-    "menuId":1033
+    "id": 447227041751121,
+    "roleId": 2,
+    "menuId": 1033
   },
   {
-    "id":447227041751122,
-    "roleId":2,
-    "menuId":1035
+    "id": 447227041751122,
+    "roleId": 2,
+    "menuId": 1035
   },
   {
-    "id":447227041751123,
-    "roleId":2,
-    "menuId":107
+    "id": 447227041751123,
+    "roleId": 2,
+    "menuId": 107
   },
   {
-    "id":447227041751124,
-    "roleId":2,
-    "menuId":1036
+    "id": 447227041751124,
+    "roleId": 2,
+    "menuId": 1036
   },
   {
-    "id":447227041751125,
-    "roleId":2,
-    "menuId":1037
+    "id": 447227041751125,
+    "roleId": 2,
+    "menuId": 1037
   },
   {
-    "id":447227041751126,
-    "roleId":2,
-    "menuId":1038
+    "id": 447227041751126,
+    "roleId": 2,
+    "menuId": 1038
   },
   {
-    "id":447227041751127,
-    "roleId":2,
-    "menuId":1039
+    "id": 447227041751127,
+    "roleId": 2,
+    "menuId": 1039
   },
   {
-    "id":447227041751128,
-    "roleId":2,
-    "menuId":108
+    "id": 447227041751128,
+    "roleId": 2,
+    "menuId": 108
   },
   {
-    "id":447227041751129,
-    "roleId":2,
-    "menuId":500
+    "id": 447227041751129,
+    "roleId": 2,
+    "menuId": 500
   },
   {
-    "id":447227041755205,
-    "roleId":2,
-    "menuId":1040
+    "id": 447227041755205,
+    "roleId": 2,
+    "menuId": 1040
   },
   {
-    "id":447227041755206,
-    "roleId":2,
-    "menuId":1041
+    "id": 447227041755206,
+    "roleId": 2,
+    "menuId": 1041
   },
   {
-    "id":447227041755207,
-    "roleId":2,
-    "menuId":1042
+    "id": 447227041755207,
+    "roleId": 2,
+    "menuId": 1042
   },
   {
-    "id":447227041755208,
-    "roleId":2,
-    "menuId":501
+    "id": 447227041755208,
+    "roleId": 2,
+    "menuId": 501
   },
   {
-    "id":447227041755209,
-    "roleId":2,
-    "menuId":1043
+    "id": 447227041755209,
+    "roleId": 2,
+    "menuId": 1043
   },
   {
-    "id":447227041755210,
-    "roleId":2,
-    "menuId":1044
+    "id": 447227041755210,
+    "roleId": 2,
+    "menuId": 1044
   },
   {
-    "id":447227041755211,
-    "roleId":2,
-    "menuId":1045
+    "id": 447227041755211,
+    "roleId": 2,
+    "menuId": 1045
   },
   {
-    "id":447227041755212,
-    "roleId":2,
-    "menuId":118
+    "id": 447227041755212,
+    "roleId": 2,
+    "menuId": 118
   },
   {
-    "id":447227041755213,
-    "roleId":2,
-    "menuId":1600
+    "id": 447227041755213,
+    "roleId": 2,
+    "menuId": 1600
   },
   {
-    "id":447227041755214,
-    "roleId":2,
-    "menuId":1601
+    "id": 447227041755214,
+    "roleId": 2,
+    "menuId": 1601
   },
   {
-    "id":447227041755215,
-    "roleId":2,
-    "menuId":1602
+    "id": 447227041755215,
+    "roleId": 2,
+    "menuId": 1602
   },
   {
-    "id":447227041755216,
-    "roleId":2,
-    "menuId":1603
+    "id": 447227041755216,
+    "roleId": 2,
+    "menuId": 1603
   },
   {
-    "id":447227041755217,
-    "roleId":2,
-    "menuId":1604
+    "id": 447227041755217,
+    "roleId": 2,
+    "menuId": 1604
   },
   {
-    "id":447227041755218,
-    "roleId":2,
-    "menuId":1605
+    "id": 447227041755218,
+    "roleId": 2,
+    "menuId": 1605
   },
   {
-    "id":447227041755219,
-    "roleId":2,
-    "menuId":2200
+    "id": 447227041755219,
+    "roleId": 2,
+    "menuId": 2200
   },
   {
-    "id":447227041755220,
-    "roleId":2,
-    "menuId":2201
+    "id": 447227041755220,
+    "roleId": 2,
+    "menuId": 2201
   },
   {
-    "id":447227041759301,
-    "roleId":2,
-    "menuId":441851175424069
+    "id": 447227041759301,
+    "roleId": 2,
+    "menuId": 441851175424069
   },
   {
-    "id":447227041759302,
-    "roleId":2,
-    "menuId":441851310268485
+    "id": 447227041759302,
+    "roleId": 2,
+    "menuId": 441851310268485
   },
   {
-    "id":447227041759303,
-    "roleId":2,
-    "menuId":2214
+    "id": 447227041759303,
+    "roleId": 2,
+    "menuId": 2214
   },
   {
-    "id":447227041759304,
-    "roleId":2,
-    "menuId":2205
+    "id": 447227041759304,
+    "roleId": 2,
+    "menuId": 2205
   },
   {
-    "id":447227041759305,
-    "roleId":2,
-    "menuId":441853056651333
+    "id": 447227041759305,
+    "roleId": 2,
+    "menuId": 441853056651333
   },
   {
-    "id":447227041759306,
-    "roleId":2,
-    "menuId":441853220675653
+    "id": 447227041759306,
+    "roleId": 2,
+    "menuId": 441853220675653
   },
   {
-    "id":447227041759307,
-    "roleId":2,
-    "menuId":441853285179461
+    "id": 447227041759307,
+    "roleId": 2,
+    "menuId": 441853285179461
   },
   {
-    "id":447227041759308,
-    "roleId":2,
-    "menuId":441862877970501
+    "id": 447227041759308,
+    "roleId": 2,
+    "menuId": 441862877970501
   },
   {
-    "id":447227041759309,
-    "roleId":2,
-    "menuId":441862978281541
+    "id": 447227041759309,
+    "roleId": 2,
+    "menuId": 441862978281541
   },
   {
-    "id":447227041759310,
-    "roleId":2,
-    "menuId":2206
+    "id": 447227041759310,
+    "roleId": 2,
+    "menuId": 2206
   },
   {
-    "id":447227041759311,
-    "roleId":2,
-    "menuId":441869217525829
+    "id": 447227041759311,
+    "roleId": 2,
+    "menuId": 441869217525829
   },
   {
-    "id":447227041759312,
-    "roleId":2,
-    "menuId":441869327724613
+    "id": 447227041759312,
+    "roleId": 2,
+    "menuId": 441869327724613
   },
   {
-    "id":447227041763397,
-    "roleId":2,
-    "menuId":441869398310981
+    "id": 447227041763397,
+    "roleId": 2,
+    "menuId": 441869398310981
   },
   {
-    "id":447227041763398,
-    "roleId":2,
-    "menuId":441869649666117
+    "id": 447227041763398,
+    "roleId": 2,
+    "menuId": 441869649666117
   },
   {
-    "id":447227041763399,
-    "roleId":2,
-    "menuId":441869802405957
+    "id": 447227041763399,
+    "roleId": 2,
+    "menuId": 441869802405957
   },
   {
-    "id":447227041763400,
-    "roleId":2,
-    "menuId":441870007808069
+    "id": 447227041763400,
+    "roleId": 2,
+    "menuId": 441870007808069
   },
   {
-    "id":447227041763401,
-    "roleId":2,
-    "menuId":441870091001925
+    "id": 447227041763401,
+    "roleId": 2,
+    "menuId": 441870091001925
   },
   {
-    "id":447227041763402,
-    "roleId":2,
-    "menuId":441870227968069
+    "id": 447227041763402,
+    "roleId": 2,
+    "menuId": 441870227968069
   },
   {
-    "id":447227041763403,
-    "roleId":2,
-    "menuId":2207
+    "id": 447227041763403,
+    "roleId": 2,
+    "menuId": 2207
   },
   {
-    "id":447227041763404,
-    "roleId":2,
-    "menuId":441870607315013
+    "id": 447227041763404,
+    "roleId": 2,
+    "menuId": 441870607315013
   },
   {
-    "id":447227041763405,
-    "roleId":2,
-    "menuId":441870717771845
+    "id": 447227041763405,
+    "roleId": 2,
+    "menuId": 441870717771845
   },
   {
-    "id":447227041763406,
-    "roleId":2,
-    "menuId":441870780928069
+    "id": 447227041763406,
+    "roleId": 2,
+    "menuId": 441870780928069
   },
   {
-    "id":447227041763407,
-    "roleId":2,
-    "menuId":2215
+    "id": 447227041763407,
+    "roleId": 2,
+    "menuId": 2215
   },
   {
-    "id":447227041763408,
-    "roleId":2,
-    "menuId":2224
+    "id": 447227041763408,
+    "roleId": 2,
+    "menuId": 2224
   },
   {
-    "id":447227041767493,
-    "roleId":2,
-    "menuId":2225
+    "id": 447227041767493,
+    "roleId": 2,
+    "menuId": 2225
   },
   {
-    "id":447227041767494,
-    "roleId":2,
-    "menuId":442149490409541
+    "id": 447227041767494,
+    "roleId": 2,
+    "menuId": 442149490409541
   },
   {
-    "id":447227041767495,
-    "roleId":2,
-    "menuId":442149580529733
+    "id": 447227041767495,
+    "roleId": 2,
+    "menuId": 442149580529733
   },
   {
-    "id":447227041767496,
-    "roleId":2,
-    "menuId":442149811572805
+    "id": 447227041767496,
+    "roleId": 2,
+    "menuId": 442149811572805
   },
   {
-    "id":447227041767497,
-    "roleId":2,
-    "menuId":2208
+    "id": 447227041767497,
+    "roleId": 2,
+    "menuId": 2208
   },
   {
-    "id":447227041767498,
-    "roleId":2,
-    "menuId":2209
+    "id": 447227041767498,
+    "roleId": 2,
+    "menuId": 2209
   },
   {
-    "id":447227041767499,
-    "roleId":2,
-    "menuId":442127879118917
+    "id": 447227041767499,
+    "roleId": 2,
+    "menuId": 442127879118917
   },
   {
-    "id":447227041771589,
-    "roleId":2,
-    "menuId":442127985041477
+    "id": 447227041771589,
+    "roleId": 2,
+    "menuId": 442127985041477
   },
   {
-    "id":447227041771590,
-    "roleId":2,
-    "menuId":442128064598085
+    "id": 447227041771590,
+    "roleId": 2,
+    "menuId": 442128064598085
   },
   {
-    "id":447227041771591,
-    "roleId":2,
-    "menuId":2210
+    "id": 447227041771591,
+    "roleId": 2,
+    "menuId": 2210
   },
   {
-    "id":447227041771592,
-    "roleId":2,
-    "menuId":442127357415493
+    "id": 447227041771592,
+    "roleId": 2,
+    "menuId": 442127357415493
   },
   {
-    "id":447227041771593,
-    "roleId":2,
-    "menuId":442127532781637
+    "id": 447227041771593,
+    "roleId": 2,
+    "menuId": 442127532781637
   },
   {
-    "id":447227041771594,
-    "roleId":2,
-    "menuId":442127596064837
+    "id": 447227041771594,
+    "roleId": 2,
+    "menuId": 442127596064837
   },
   {
-    "id":447227041771595,
-    "roleId":2,
-    "menuId":2211
+    "id": 447227041771595,
+    "roleId": 2,
+    "menuId": 2211
   },
   {
-    "id":447227041771596,
-    "roleId":2,
-    "menuId":2212
+    "id": 447227041771596,
+    "roleId": 2,
+    "menuId": 2212
   },
   {
-    "id":447227041771597,
-    "roleId":2,
-    "menuId":442128593006661
+    "id": 447227041771597,
+    "roleId": 2,
+    "menuId": 442128593006661
   },
   {
-    "id":447227041771598,
-    "roleId":2,
-    "menuId":442128733950021
+    "id": 447227041771598,
+    "roleId": 2,
+    "menuId": 442128733950021
   },
   {
-    "id":447227041771599,
-    "roleId":2,
-    "menuId":2213
+    "id": 447227041771599,
+    "roleId": 2,
+    "menuId": 2213
   },
   {
-    "id":447227041775685,
-    "roleId":2,
-    "menuId":442129175347269
+    "id": 447227041775685,
+    "roleId": 2,
+    "menuId": 442129175347269
   },
   {
-    "id":447227041775686,
-    "roleId":2,
-    "menuId":442129320091717
+    "id": 447227041775686,
+    "roleId": 2,
+    "menuId": 442129320091717
   },
   {
-    "id":447227041775687,
-    "roleId":2,
-    "menuId":2216
+    "id": 447227041775687,
+    "roleId": 2,
+    "menuId": 2216
   },
   {
-    "id":447227041775688,
-    "roleId":2,
-    "menuId":2217
+    "id": 447227041775688,
+    "roleId": 2,
+    "menuId": 2217
   },
   {
-    "id":447227041775689,
-    "roleId":2,
-    "menuId":2218
+    "id": 447227041775689,
+    "roleId": 2,
+    "menuId": 2218
   },
   {
-    "id":447227041775690,
-    "roleId":2,
-    "menuId":2219
+    "id": 447227041775690,
+    "roleId": 2,
+    "menuId": 2219
   },
   {
-    "id":447227041775691,
-    "roleId":2,
-    "menuId":442130419388485
+    "id": 447227041775691,
+    "roleId": 2,
+    "menuId": 442130419388485
   },
   {
-    "id":447227041775692,
-    "roleId":2,
-    "menuId":442130475098181
+    "id": 447227041775692,
+    "roleId": 2,
+    "menuId": 442130475098181
   },
   {
-    "id":447227041775693,
-    "roleId":2,
-    "menuId":442143693541445
+    "id": 447227041775693,
+    "roleId": 2,
+    "menuId": 442143693541445
   },
   {
-    "id":447227041775694,
-    "roleId":2,
-    "menuId":2220
+    "id": 447227041775694,
+    "roleId": 2,
+    "menuId": 2220
   },
   {
-    "id":447227041775695,
-    "roleId":2,
-    "menuId":2221
+    "id": 447227041775695,
+    "roleId": 2,
+    "menuId": 2221
   },
   {
-    "id":447227041779781,
-    "roleId":2,
-    "menuId":2222
+    "id": 447227041779781,
+    "roleId": 2,
+    "menuId": 2222
   },
   {
-    "id":447227041779782,
-    "roleId":2,
-    "menuId":442131294584901
+    "id": 447227041779782,
+    "roleId": 2,
+    "menuId": 442131294584901
   },
   {
-    "id":447227041779783,
-    "roleId":2,
-    "menuId":2223
+    "id": 447227041779783,
+    "roleId": 2,
+    "menuId": 2223
   },
   {
-    "id":447227041779784,
-    "roleId":2,
-    "menuId":442130860195909
+    "id": 447227041779784,
+    "roleId": 2,
+    "menuId": 442130860195909
   },
   {
-    "id":447227041779785,
-    "roleId":2,
-    "menuId":442130932109381
+    "id": 447227041779785,
+    "roleId": 2,
+    "menuId": 442130932109381
   },
   {
-    "id":447227041779786,
-    "roleId":2,
-    "menuId":442131029889093
+    "id": 447227041779786,
+    "roleId": 2,
+    "menuId": 442131029889093
   },
   {
-    "id":447227041779787,
-    "roleId":2,
-    "menuId":6
+    "id": 447227041779787,
+    "roleId": 2,
+    "menuId": 6
   },
   {
-    "id":447227041779788,
-    "roleId":2,
-    "menuId":121
+    "id": 447227041779788,
+    "roleId": 2,
+    "menuId": 121
   },
   {
-    "id":447227041779789,
-    "roleId":2,
-    "menuId":1606
+    "id": 447227041779789,
+    "roleId": 2,
+    "menuId": 1606
   },
   {
-    "id":447227041779790,
-    "roleId":2,
-    "menuId":1607
+    "id": 447227041779790,
+    "roleId": 2,
+    "menuId": 1607
   },
   {
-    "id":447227041779791,
-    "roleId":2,
-    "menuId":1608
+    "id": 447227041779791,
+    "roleId": 2,
+    "menuId": 1608
   },
   {
-    "id":447227041779792,
-    "roleId":2,
-    "menuId":1610
+    "id": 447227041779792,
+    "roleId": 2,
+    "menuId": 1610
   },
   {
-    "id":447227041779793,
-    "roleId":2,
-    "menuId":1611
+    "id": 447227041779793,
+    "roleId": 2,
+    "menuId": 1611
   },
   {
-    "id":447227041779794,
-    "roleId":2,
-    "menuId":1612
+    "id": 447227041779794,
+    "roleId": 2,
+    "menuId": 1612
   },
   {
-    "id":447227041779795,
-    "roleId":2,
-    "menuId":1613
+    "id": 447227041779795,
+    "roleId": 2,
+    "menuId": 1613
   },
   {
-    "id":447227041779796,
-    "roleId":2,
-    "menuId":1615
+    "id": 447227041779796,
+    "roleId": 2,
+    "menuId": 1615
   },
   {
-    "id":447227041779797,
-    "roleId":2,
-    "menuId":2
+    "id": 447227041779797,
+    "roleId": 2,
+    "menuId": 2
   },
   {
-    "id":447227041779798,
-    "roleId":2,
-    "menuId":109
+    "id": 447227041779798,
+    "roleId": 2,
+    "menuId": 109
   },
   {
-    "id":447227041783877,
-    "roleId":2,
-    "menuId":1046
+    "id": 447227041783877,
+    "roleId": 2,
+    "menuId": 1046
   },
   {
-    "id":447227041783878,
-    "roleId":2,
-    "menuId":3
+    "id": 447227041783878,
+    "roleId": 2,
+    "menuId": 3
   },
   {
-    "id":447227041783879,
-    "roleId":2,
-    "menuId":115
+    "id": 447227041783879,
+    "roleId": 2,
+    "menuId": 115
   },
   {
-    "id":447227041783880,
-    "roleId":2,
-    "menuId":1055
+    "id": 447227041783880,
+    "roleId": 2,
+    "menuId": 1055
   },
   {
-    "id":447227041783881,
-    "roleId":2,
-    "menuId":1056
+    "id": 447227041783881,
+    "roleId": 2,
+    "menuId": 1056
   },
   {
-    "id":447227041783882,
-    "roleId":2,
-    "menuId":1058
+    "id": 447227041783882,
+    "roleId": 2,
+    "menuId": 1058
   },
   {
-    "id":447227041783883,
-    "roleId":2,
-    "menuId":1057
+    "id": 447227041783883,
+    "roleId": 2,
+    "menuId": 1057
   },
   {
-    "id":447227041783884,
-    "roleId":2,
-    "menuId":1059
+    "id": 447227041783884,
+    "roleId": 2,
+    "menuId": 1059
   },
   {
-    "id":447227041783885,
-    "roleId":2,
-    "menuId":1060
+    "id": 447227041783885,
+    "roleId": 2,
+    "menuId": 1060
   },
   {
-    "id":447227041783886,
-    "roleId":2,
-    "menuId":4
+    "id": 447227041783886,
+    "roleId": 2,
+    "menuId": 4
+  },
+  {
+    "id": 452767971037253,
+    "menuId": 1,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037254,
+    "menuId": 100,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037255,
+    "menuId": 1001,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037256,
+    "menuId": 1002,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037257,
+    "menuId": 1003,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037258,
+    "menuId": 1004,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037259,
+    "menuId": 1005,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037260,
+    "menuId": 1006,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037261,
+    "menuId": 1007,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971037262,
+    "menuId": 101,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041349,
+    "menuId": 1008,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041350,
+    "menuId": 1009,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041351,
+    "menuId": 1010,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041352,
+    "menuId": 1011,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041353,
+    "menuId": 1012,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041354,
+    "menuId": 102,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041355,
+    "menuId": 1013,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041356,
+    "menuId": 1014,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041357,
+    "menuId": 1015,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041358,
+    "menuId": 1016,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041359,
+    "menuId": 103,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041360,
+    "menuId": 1017,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041361,
+    "menuId": 1018,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041362,
+    "menuId": 1019,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041363,
+    "menuId": 1020,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041364,
+    "menuId": 104,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041365,
+    "menuId": 1021,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971041366,
+    "menuId": 1022,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045445,
+    "menuId": 1023,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045446,
+    "menuId": 1024,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045447,
+    "menuId": 1025,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045448,
+    "menuId": 105,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045449,
+    "menuId": 1026,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045450,
+    "menuId": 1027,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045451,
+    "menuId": 1028,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045452,
+    "menuId": 1029,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045453,
+    "menuId": 1030,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045454,
+    "menuId": 106,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045455,
+    "menuId": 1031,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045456,
+    "menuId": 1032,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045457,
+    "menuId": 1033,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045458,
+    "menuId": 1034,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045459,
+    "menuId": 1035,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045460,
+    "menuId": 107,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045461,
+    "menuId": 1036,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045462,
+    "menuId": 1037,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971045463,
+    "menuId": 1038,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049541,
+    "menuId": 1039,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049542,
+    "menuId": 108,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049543,
+    "menuId": 500,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049544,
+    "menuId": 1040,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049545,
+    "menuId": 1041,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049546,
+    "menuId": 1042,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049547,
+    "menuId": 501,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049548,
+    "menuId": 1043,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049549,
+    "menuId": 1044,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049550,
+    "menuId": 1045,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049551,
+    "menuId": 1050,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049552,
+    "menuId": 118,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049553,
+    "menuId": 1600,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049554,
+    "menuId": 1601,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049555,
+    "menuId": 1602,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049556,
+    "menuId": 1603,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049557,
+    "menuId": 1604,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971049558,
+    "menuId": 1605,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053637,
+    "menuId": 502,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053638,
+    "menuId": 442129,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053639,
+    "menuId": 44212332,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053640,
+    "menuId": 442123323123,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053641,
+    "menuId": 423,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053642,
+    "menuId": 4234553537,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053643,
+    "menuId": 2200,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053644,
+    "menuId": 2201,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053645,
+    "menuId": 441851175424069,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053646,
+    "menuId": 441851310268485,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053647,
+    "menuId": 441851485323333,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053648,
+    "menuId": 2214,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053649,
+    "menuId": 2205,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053650,
+    "menuId": 441853056651333,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053651,
+    "menuId": 441853220675653,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053652,
+    "menuId": 441853285179461,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053653,
+    "menuId": 441862726639685,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971053654,
+    "menuId": 441862877970501,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057733,
+    "menuId": 441862978281541,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057734,
+    "menuId": 441863058096197,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057735,
+    "menuId": 2206,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057736,
+    "menuId": 441869217525829,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057737,
+    "menuId": 441869327724613,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057738,
+    "menuId": 441869398310981,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057739,
+    "menuId": 441869530075205,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057740,
+    "menuId": 441869649666117,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057741,
+    "menuId": 441869802405957,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057742,
+    "menuId": 441870007808069,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057743,
+    "menuId": 441870091001925,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057744,
+    "menuId": 441870227968069,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057745,
+    "menuId": 441870309814341,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057746,
+    "menuId": 2207,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057747,
+    "menuId": 441870607315013,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057748,
+    "menuId": 441870717771845,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057749,
+    "menuId": 441870780928069,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971057750,
+    "menuId": 441870881378373,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061829,
+    "menuId": 2215,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061830,
+    "menuId": 2225,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061831,
+    "menuId": 442149490409541,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061832,
+    "menuId": 442149580529733,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061833,
+    "menuId": 442149650423877,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061834,
+    "menuId": 442149811572805,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061835,
+    "menuId": 2208,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061836,
+    "menuId": 2209,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061837,
+    "menuId": 442127879118917,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061838,
+    "menuId": 442127985041477,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061839,
+    "menuId": 442128064598085,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061840,
+    "menuId": 442128163270725,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061841,
+    "menuId": 2210,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061842,
+    "menuId": 442127357415493,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061843,
+    "menuId": 442127532781637,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061844,
+    "menuId": 442127596064837,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061845,
+    "menuId": 442127705182277,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971061846,
+    "menuId": 2211,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065925,
+    "menuId": 2212,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065926,
+    "menuId": 442128593006661,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065927,
+    "menuId": 442128733950021,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065928,
+    "menuId": 442128795189317,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065929,
+    "menuId": 2213,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065930,
+    "menuId": 442129175347269,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065931,
+    "menuId": 442129320091717,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065932,
+    "menuId": 442129388187717,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065933,
+    "menuId": 2216,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065934,
+    "menuId": 2217,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065935,
+    "menuId": 2218,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065936,
+    "menuId": 2219,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065937,
+    "menuId": 442130419388485,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065938,
+    "menuId": 442130475098181,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065939,
+    "menuId": 442130534805573,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065940,
+    "menuId": 442143693541445,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065941,
+    "menuId": 2220,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971065942,
+    "menuId": 2221,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971070021,
+    "menuId": 2222,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971070022,
+    "menuId": 442131294584901,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971070023,
+    "menuId": 2223,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971070024,
+    "menuId": 442130860195909,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971070025,
+    "menuId": 442130932109381,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971070026,
+    "menuId": 442131029889093,
+    "roleId": 452767970971717
+  },
+  {
+    "id": 452767971070027,
+    "menuId": 442131115253829,
+    "roleId": 452767970971717
   }
 ]

+ 17 - 1
data/init/sys_tenant.json

@@ -19,5 +19,21 @@
       "createBy": 1,
       "updateBy": null,
       "updateTime": null
-    }
+    },
+   {
+     "id": 452748015235141,
+     "tenantId": "452748015218757",
+     "contactUserName": "测试人员",
+     "contactPhone": "18888888888",
+     "companyName": "测试租户有限公司",
+     "licenseNumber": "12312312312",
+     "address": "13123123",
+     "intro": "测试租户有限公司管理系统",
+     "domain": null,
+     "remark": "租户管理员账密:test/test123",
+     "packageId": 450389924483141,
+     "accountCount": -1,
+     "status": "0",
+     "delFlag": "0"
+   }
   ]

+ 11 - 1
data/init/sys_tenant_package.json

@@ -1 +1,11 @@
- []
+ [
+   {
+     "id": 450389924483141,
+     "packageName": "测试套餐",
+     "delFlag": "0",
+     "menuCheckStrictly": true,
+     "menuIds":"1,100,1001,1002,1003,1004,1005,1006,1007,101,1008,1009,1010,1011,1012,102,1013,1014,1015,1016,103,1017,1018,1019,1020,104,1021,1022,1023,1024,1025,105,1026,1027,1028,1029,1030,106,1031,1032,1033,1034,1035,107,1036,1037,1038,1039,108,500,1040,1041,1042,501,1043,1044,1045,1050,118,1600,1601,1602,1603,1604,1605,502,442129,44212332,442123323123,423,4234553537,2200,2201,441851175424069,441851310268485,441851485323333,2214,2205,441853056651333,441853220675653,441853285179461,441862726639685,441862877970501,441862978281541,441863058096197,2206,441869217525829,441869327724613,441869398310981,441869530075205,441869649666117,441869802405957,441870007808069,441870091001925,441870227968069,441870309814341,2207,441870607315013,441870717771845,441870780928069,441870881378373,2215,2225,442149490409541,442149580529733,442149650423877,442149811572805,2208,2209,442127879118917,442127985041477,442128064598085,442128163270725,2210,442127357415493,442127532781637,442127596064837,442127705182277,2211,2212,442128593006661,442128733950021,442128795189317,2213,442129175347269,442129320091717,442129388187717,2216,2217,2218,2219,442130419388485,442130475098181,442130534805573,442143693541445,2220,2221,2222,442131294584901,2223,442130860195909,442130932109381,442131029889093,442131115253829",
+     "status": "0",
+     "remark": "测试套餐"
+   }
+ ]

+ 19 - 2
data/init/sys_user.json

@@ -4,9 +4,9 @@
       "tenantId": "000000",
       "deptId": 103,
       "userName": "admin",
-      "nickName": "疯狂的狮子Li",
+      "nickName": "admin",
       "userType": "sys_user",
-      "email": "crazyLionLi@163.com",
+      "email": "xw2sy@163.com",
       "phonenumber": "15888888888",
       "sex": "1",
       "avatar": null,
@@ -63,5 +63,22 @@
      "tenantId": "000000",
      "userName": "openiita",
      "userType": "sys_user"
+   },
+   {
+     "id": 452767971950661,
+     "avatar": null,
+     "delFlag": "0",
+     "deptId": 452767971254341,
+     "email": null,
+     "loginIp": null,
+     "nickName": "test",
+     "password": "$2a$10$4Myxy0yK7OUh.y65DNcnKuG9lf3L934CJteU8mx5.Al5PsrIvTnuW",
+     "phonenumber": "18888888888",
+     "remark": "管理员",
+     "sex": null,
+     "status": "0",
+     "tenantId": "452748015218757",
+     "userName": "test",
+     "userType": "sys_user"
    }
   ]

+ 4 - 0
data/init/sys_user_role.json

@@ -10,5 +10,9 @@
    {
      "userId": 3,
      "roleId": 2
+   },
+   {
+     "userId": 452767971950661,
+     "roleId": 452767970971717
    }
   ]

+ 22 - 2
data/init/thingModel.json

@@ -1562,7 +1562,17 @@
           "name": "水温度",
           "accessMode": "r"
         },
-
+        {
+          "identifier": "query",
+          "dataType": {
+            "type": "text",
+            "specs": {
+              "length": "255"
+            }
+          },
+          "name": "查询",
+          "accessMode": "rw"
+        },
         {
           "identifier": "McuStatus",
           "dataType": {
@@ -1828,7 +1838,17 @@
           "name": "实时运行状态",
           "accessMode": "rw"
         },
-
+        {
+          "identifier": "Time",
+          "dataType": {
+            "type": "text",
+            "specs": {
+              "length": "255"
+            }
+          },
+          "name": "时间戳",
+          "accessMode": "rw"
+        },
         {
           "identifier": "TimeModeSet",
           "dataType": {

+ 16 - 16
data/init/userInfo.json

@@ -2,7 +2,7 @@
   {
     "id":  13123123123213,
     "uid": "13480802157",
-    "ownerId": "1",
+    "tenantId": "000000",
     "secret": "483752384B473759556E685768796B6F644E48634F76486C51646A41576B545A2B396C34474244414F334F78574F4778613764564338594E666770595A376177",
     "nickName": "song2",
     "type": 1,
@@ -13,12 +13,12 @@
     "usePlatforms": [
       "dueros"
     ],
-    "createAt": 1654529407977
+    "createTime": 1654529407977
   },
   {
     "id": 141231312312,
     "uid": "guest1",
-    "ownerId": "1",
+    "tenantId": "000000",
     "nickName": "演示账户",
     "secret": "48774861346645676F51324A4D6E6639306E6474437741634C4333746C4575666C316F76503455542B5836763065315A2F676244695056557356704D49513569",
     "type": 0,
@@ -28,12 +28,12 @@
     ],
     "permissions": [],
     "usePlatforms": [],
-    "createAt": 1647592821770
+    "createTime": 1647592821770
   },
   {
     "id": 13123123,
     "uid": "iotkit",
-    "ownerId": "1",
+    "tenantId": "000000",
     "nickName": "管理员",
     "secret": "6E49354D37437030564370666E48486150524B3134743258735059354D75324F6532594478654C47767535614C6C6E767139625170774E576477785A34513369",
     "type": 0,
@@ -45,12 +45,12 @@
       "write"
     ],
     "usePlatforms": [],
-    "createAt": 1647592821770
+    "createTime": 1647592821770
   },
   {
     "id": 12312312312,
     "uid": "du2",
-    "ownerId": "1",
+    "tenantId": "000000",
     "nickName": "小度接入2",
     "type": 1,
     "roles": [
@@ -59,12 +59,12 @@
     "usePlatforms": [
       "dueros"
     ],
-    "createAt": 1651230139460
+    "createTime": 1651230139460
   },
   {
     "id": 23423423,
     "uid": "tm3",
-    "ownerId": "1",
+    "tenantId": "000000",
     "nickName": "天猫精灵test3",
     "type": 1,
     "roles": [
@@ -73,12 +73,12 @@
     "usePlatforms": [
       "aligenie"
     ],
-    "createAt": 1647982036151
+    "createTime": 1647982036151
   },
   {
     "id": 45234345,
     "uid": "du1",
-    "ownerId": "1",
+    "tenantId": "000000",
     "nickName": "小度接入1",
     "secret": "483752384B473759556E685768796B6F644E48634F76486C51646A41576B545A2B396C34474244414F334F517674507547437A72627A7154302B724441734C5A",
     "type": 1,
@@ -89,12 +89,12 @@
       "dueros",
       "aligenie"
     ],
-    "createAt": 1651226639006
+    "createTime": 1651226639006
   },
   {
     "id": 3454543,
     "uid": "tm1",
-    "ownerId": "1",
+    "tenantId": "000000",
     "nickName": "天猫精灵1",
     "type": 1,
     "roles": [
@@ -103,12 +103,12 @@
     "usePlatforms": [
       "aligenie"
     ],
-    "createAt": 1648486563107
+    "createTime": 1648486563107
   },
   {
     "id": 432323,
     "uid": "18126045687",
-    "ownerId": "1",
+    "tenantId": "000000",
     "nickName": "song",
     "secret": "483752384B473759556E685768796B6F644E48634F76486C51646A41576B545A2B396C34474244414F334F517674507547437A72627A7154302B724441734C5A",
     "type": 1,
@@ -119,6 +119,6 @@
       "aligenie",
       "dueros"
     ],
-    "createAt": 1652115298592
+    "createTime": 1652115298592
   }
 ]

+ 65 - 42
docker-compose/docker-compose.yml

@@ -1,52 +1,75 @@
-version: '3'
+version: "3.4"
+
 services:
-  redis:
-    image: redis:5.0.8
-    container_name: iotkit-ce-redis
+  mysql:
+    container_name: iot-mysql
+    image: mysql:8
+    restart: unless-stopped
+    tty: true
     ports:
-      - 6379:6379
-    volumes:
-      - "redis-volume:/data"
-    command: redis-server --appendonly yes
-    environment:
-      - TZ=Asia/Shanghai
-  elasticsearch:
-    image: elasticsearch:7.12.0
-    container_name: iotkit-ce-elasticsearch
+      - "3306:3306"
     environment:
-      ES_JAVA_OPTS: -Djava.net.preferIPv4Stack=true -Xms1g -Xmx1g
-      transport.host: 0.0.0.0
-      discovery.type: single-node
-      bootstrap.memory_lock: "true"
-    ports:
-      - 9200:9200
-      - 9300:9300
+      MYSQL_DATABASE: ${MYSQL_DATABASE:-iotkit}
+      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-123456}
     volumes:
-      - "elasticsearch-volume:/usr/share/elasticsearch/data"
-  ui:
-    image: uncleregan/iotkit-ui:0.3.4
-    container_name: iotkit-ce-ui
+      - mysql:/var/lib/mysql/
+
+
+  redis:
+    container_name: iot-redis
+    image: redis:6-alpine
+    restart: unless-stopped
     ports:
-      - 80:80
-    links:
-      - iotkit:iotkit
+      - "6379:6379"
     volumes:
-      - "iotkit-volume:/usr/share/nginx/html/upload"
-  iotkit:
-    image: uncleregan/iotkit:0.3.4
-    container_name: iotkit-ce
-    restart: on-failure
+      - redis:/data
+
+  server:
+    container_name: iot-server
+    build:
+      context: ./
+    image: iot-server
+    restart: unless-stopped
     ports:
-      - 8086:8086 # API端口
-      - 1883-1890:1883-1890 # 预留
-      - 8000-8010:8000-8010 # 预留
-    links:
-      - redis:redis
-      - elasticsearch:elasticsearch
+      - "8086:8086"
+    environment:
+      # https://github.com/polovyivan/docker-pass-configs-to-container
+      SPRING_PROFILES_ACTIVE: local
+      JAVA_OPTS:
+        ${JAVA_OPTS:-
+        -Xms512m
+        -Xmx512m
+        -Djava.security.egd=file:/dev/./urandom
+        }
+      ARGS:
+        --spring.datasource.dynamic.datasource.master.url=${MASTER_DATASOURCE_URL:-jdbc:mysql://iot-mysql:3306/iotkit?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true}
+        --spring.datasource.dynamic.datasource.master.username=${MASTER_DATASOURCE_USERNAME:-root}
+        --spring.datasource.dynamic.datasource.master.password=${MASTER_DATASOURCE_PASSWORD:-123456}
+        --spring.datasource.dynamic.datasource.slave.url=${SLAVE_DATASOURCE_URL:-jdbc:mysql://iot-mysql:3306/iotkit?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true}
+        --spring.datasource.dynamic.datasource.slave.username=${SLAVE_DATASOURCE_USERNAME:-root}
+        --spring.datasource.dynamic.datasource.slave.password=${SLAVE_DATASOURCE_PASSWORD:-123456}
+        --spring.redis.host=${REDIS_HOST:-iot-redis}
     depends_on:
-      - elasticsearch
       - redis
+
+  admin:
+    container_name: iot-admin
+    build:
+      context: ./iot-ui-admin
+      args:
+        NODE_ENV:
+          ENV=${NODE_ENV:-production}
+          PUBLIC_PATH=${PUBLIC_PATH:-/}
+          VUE_APP_TITLE=${VUE_APP_TITLE:-openiita管理系统}
+    image: iot-admin
+    restart: unless-stopped
+    ports:
+      - "8080:80"
+    depends_on:
+      - server
+
 volumes:
-  redis-volume:
-  elasticsearch-volume:
-  iotkit-volume:
+  mysql:
+    driver: local
+  redis:
+    driver: local

+ 19 - 0
docker-compose/docker.env

@@ -0,0 +1,19 @@
+## mysql
+MYSQL_DATABASE=iotkit
+MYSQL_ROOT_PASSWORD=123456
+
+## server
+JAVA_OPTS=-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom
+
+MASTER_DATASOURCE_URL=jdbc:mysql://iot-mysql:3306/${MYSQL_DATABASE}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
+MASTER_DATASOURCE_USERNAME=root
+MASTER_DATASOURCE_PASSWORD=${MYSQL_ROOT_PASSWORD}
+SLAVE_DATASOURCE_URL=${MASTER_DATASOURCE_URL}
+SLAVE_DATASOURCE_USERNAME=${MASTER_DATASOURCE_USERNAME}
+SLAVE_DATASOURCE_PASSWORD=${MASTER_DATASOURCE_PASSWORD}
+REDIS_HOST=iot-redis
+
+## admin
+NODE_ENV=production
+PUBLIC_PATH=/
+VUE_APP_TITLE=iot管理系统

+ 2 - 8
iot-dao/iot-data-model/src/main/java/cc/iotkit/model/UserInfo.java

@@ -15,6 +15,7 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -23,7 +24,7 @@ import java.util.List;
 @Builder
 @NoArgsConstructor
 @AllArgsConstructor
-public class UserInfo implements Id<Long> {
+public class UserInfo extends TenantModel implements Id<Long>, Serializable {
 
     public static final int USER_TYPE_PLATFORM = 0;
     public static final int USER_TYPE_CLIENT = 1;
@@ -35,11 +36,6 @@ public class UserInfo implements Id<Long> {
      */
     private String uid;
 
-    /**
-     * 归属账号
-     */
-    private String ownerId;
-
     /**
      * 密钥(密码加密后的内容)
      */
@@ -92,6 +88,4 @@ public class UserInfo implements Id<Long> {
      */
     private List<String> usePlatforms = new ArrayList<>();
 
-    private Long createAt;
-
 }

+ 0 - 96
iot-dao/iot-data-model/src/main/java/cc/iotkit/model/device/message/ThingModelMessage.java

@@ -1,96 +0,0 @@
-/*
- * +----------------------------------------------------------------------
- * | Copyright (c) 奇特物联 2021-2022 All rights reserved.
- * +----------------------------------------------------------------------
- * | Licensed 未经许可不能去掉「奇特物联」相关版权
- * +----------------------------------------------------------------------
- * | Author: xw2sy@163.com
- * +----------------------------------------------------------------------
- */
-package cc.iotkit.model.device.message;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 物模型消息
- */
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-@Builder
-public class ThingModelMessage {
-
-    public static final String TYPE_LIFETIME = "lifetime";
-    public static final String TYPE_STATE = "state";
-    public static final String TYPE_PROPERTY = "property";
-
-    public static final String TYPE_EVENT = "event";
-    public static final String TYPE_SERVICE = "service";
-
-    public static final String TYPE_OTA = "ota";
-    public static final String TYPE_CONFIG = "config";
-    public static final String ID_PROPERTY_GET = "get";
-    public static final String ID_PROPERTY_SET = "set";
-    public static final String ID_PROPERTY_REPORT = "report";
-    public static final String ID_CONFIG_GET = "get";
-    public static final String ID_CONFIG_SET = "set";
-    public static final String ID_DEREGISTER = "deregister";
-
-    private String id;
-
-    private String mid;
-
-    private String deviceId;
-
-    private String productKey;
-
-    private String deviceName;
-
-    /**
-     * 所属用户ID
-     */
-    private String uid;
-
-    /**
-     * 消息类型
-     * lifetime:生命周期
-     * state:状态
-     * property:属性
-     * event:事件
-     * service:服务
-     */
-    private String type;
-
-    private String identifier;
-
-    /**
-     * 消息状态码
-     */
-    private int code;
-
-    private Object data;
-
-    /**
-     * 时间戳,设备上的事件或数据产生的本地时间
-     */
-    private Long occurred;
-
-    /**
-     * 消息上报时间
-     */
-    private Long time;
-
-    public Map<String, Object> dataToMap() {
-        Map<String, Object> mapData = new HashMap<>();
-        if (data instanceof Map) {
-            ((Map<?, ?>) data).forEach((key, value) -> mapData.put(key.toString(), value));
-        }
-        return mapData;
-    }
-}

+ 13 - 4
iot-dao/iot-data-model/src/main/java/cc/iotkit/model/space/Home.java

@@ -9,19 +9,23 @@
  */
 package cc.iotkit.model.space;
 
-import cc.iotkit.model.Owned;
+import cc.iotkit.model.Id;
+import cc.iotkit.model.TenantModel;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.io.Serializable;
+import java.util.List;
+
 @Data
 @Builder
 @NoArgsConstructor
 @AllArgsConstructor
-public class Home implements Owned<String> {
+public class Home extends TenantModel implements Id<Long>, Serializable {
 
-    private String id;
+    private Long id;
 
     /**
      * 家庭名称
@@ -36,7 +40,7 @@ public class Home implements Owned<String> {
     /**
      * 关联用户id
      */
-    private String uid;
+    private Long userId;
 
     /**
      * 空间数量
@@ -52,4 +56,9 @@ public class Home implements Owned<String> {
      * 是否为用户当前使用的家庭
      */
     private Boolean current;
+
+    /**
+     * 空间对象
+     */
+    private List<Space> spaces;
 }

+ 7 - 11
iot-dao/iot-data-model/src/main/java/cc/iotkit/model/space/Space.java

@@ -9,29 +9,27 @@
  */
 package cc.iotkit.model.space;
 
-import cc.iotkit.model.Owned;
+import cc.iotkit.model.Id;
+import cc.iotkit.model.TenantModel;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.io.Serializable;
+
 @Data
 @Builder
 @NoArgsConstructor
 @AllArgsConstructor
-public class Space implements Owned<String> {
+public class Space extends TenantModel implements Id<Long>, Serializable {
 
-    private String id;
+    private Long id;
 
     /**
      * 关联家庭id
      */
-    private String homeId;
-
-    /**
-     * 关联用户id
-     */
-    private String uid;
+    private Long homeId;
 
     /**
      * 空间名称
@@ -42,6 +40,4 @@ public class Space implements Owned<String> {
      * 设备数量
      */
     private Integer deviceNum;
-
-    private Long createAt;
 }

+ 8 - 25
iot-dao/iot-data-model/src/main/java/cc/iotkit/model/space/SpaceDevice.java

@@ -9,29 +9,22 @@
  */
 package cc.iotkit.model.space;
 
-import cc.iotkit.model.Owned;
+import cc.iotkit.model.Id;
+import cc.iotkit.model.TenantModel;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.io.Serializable;
+
 @Data
 @Builder
 @NoArgsConstructor
 @AllArgsConstructor
-public class SpaceDevice implements Owned<String> {
-
-    private String id;
+public class SpaceDevice extends TenantModel implements Id<Long>, Serializable {
 
-    /**
-     * 关联用户id
-     */
-    private String uid;
-
-    /**
-     * 分享的用户id
-     */
-    private String sharedUid;
+    private Long id;
 
     /**
      * 空间中的设备id
@@ -46,22 +39,12 @@ public class SpaceDevice implements Owned<String> {
     /**
      * 所属家庭Id
      */
-    private String homeId;
+    private Long homeId;
 
     /**
      * 空间id
      */
-    private String spaceId;
-
-    /**
-     * 添加时间
-     */
-    private Long addAt;
-
-    /**
-     * 使用时间
-     */
-    private Long useAt;
+    private Long spaceId;
 
     /**
      * 是否收藏

+ 5 - 0
iot-dao/iot-data-model/src/main/java/cc/iotkit/model/system/SysApp.java

@@ -25,6 +25,11 @@ public class SysApp extends TenantModel implements Id<Long>, Serializable{
      */
     private Long id;
 
+    /**
+     * 应用名称
+     */
+    private String appName;
+
     /**
      * appId
      */

+ 27 - 0
iot-dao/iot-data-model/src/main/java/cc/iotkit/model/wx/XcxLoginBody.java

@@ -0,0 +1,27 @@
+package cc.iotkit.model.wx;
+
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+
+/**
+ * 小程序登录对象
+ *
+ * @author tfd
+ */
+
+@Data
+public class XcxLoginBody {
+
+    /**
+     * appId
+     */
+    @NotBlank(message = "appId不能为空")
+    private String appId;
+
+    /**
+     * 授权码
+     */
+    @NotBlank(message = "code不能为空")
+    private String code;
+
+}

+ 27 - 0
iot-dao/iot-data-model/src/main/java/cc/iotkit/model/wx/XcxLoginUser.java

@@ -0,0 +1,27 @@
+package cc.iotkit.model.wx;
+
+import cc.iotkit.common.model.LoginUser;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+
+/**
+ * 小程序登录用户身份权限
+ *
+ * @author Lion Li
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class XcxLoginUser extends LoginUser {
+
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * openid
+     */
+    private String openid;
+
+}

+ 6 - 8
iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IHomeData.java

@@ -9,20 +9,18 @@
  */
 package cc.iotkit.data.manager;
 
-import cc.iotkit.data.IOwnedData;
+import cc.iotkit.data.ICommonData;
 import cc.iotkit.model.space.Home;
 
+import java.util.List;
 
-public interface IHomeData extends IOwnedData<Home, String> {
 
-    default Home findByUidAndCurrent(String uid, boolean current) {
-        return null;
+public interface IHomeData extends ICommonData<Home, Long> {
 
-    }
+    Home findByUserIdAndCurrent(Long userId, boolean current);
 
-    default Home findByUidAndId(String uid, String id) {
-        return null;
+    List<Home> findByUserId(Long userId);
 
-    }
+    boolean checkHomeNameUnique(Home home);
 
 }

+ 3 - 7
iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/ISpaceData.java

@@ -9,17 +9,13 @@
  */
 package cc.iotkit.data.manager;
 
-import cc.iotkit.data.IOwnedData;
+import cc.iotkit.data.ICommonData;
 import cc.iotkit.model.space.Space;
 
 import java.util.List;
 
-public interface ISpaceData extends IOwnedData<Space,String> {
+public interface ISpaceData extends ICommonData<Space,Long> {
 
-    List<Space> findByUidOrderByCreateAtDesc(String uid);
-
-    List<Space> findByUidAndHomeIdOrderByCreateAtDesc(String uid, String homeId);
-
-    List<Space> findByHomeId(String homeId);
+    List<Space> findByHomeId(Long homeId);
 
 }

+ 6 - 10
iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/ISpaceDeviceData.java

@@ -9,24 +9,20 @@
  */
 package cc.iotkit.data.manager;
 
-import cc.iotkit.data.IOwnedData;
+import cc.iotkit.data.ICommonData;
 import cc.iotkit.model.space.SpaceDevice;
 
 import java.util.List;
 
-public interface ISpaceDeviceData extends IOwnedData<SpaceDevice, String> {
+public interface ISpaceDeviceData extends ICommonData<SpaceDevice, Long> {
 
-    List<SpaceDevice> findByUidOrderByUseAtDesc(String uid);
+    List<SpaceDevice> findByHomeIdAndCollect(Long homeId,boolean collect);
 
-    List<SpaceDevice> findByHomeIdAndCollect(String homeId,boolean collect);
+    List<SpaceDevice> findByHomeId(Long homeId);
 
-    List<SpaceDevice> findByUidOrderByAddAtDesc(String uid);
-
-    List<SpaceDevice> findBySpaceIdOrderByAddAtDesc(String spaceId);
-
-    List<SpaceDevice> findByUidAndSpaceIdOrderByAddAtDesc(String uid, String spaceId);
+    List<SpaceDevice> findBySpaceId(Long spaceId);
 
     SpaceDevice findByDeviceId(String deviceId);
 
-    SpaceDevice findByDeviceIdAndUid(String deviceId, String uid);
+    void deleteAllBySpaceId(Long spaceId);
 }

+ 0 - 2
iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IUserInfoData.java

@@ -19,6 +19,4 @@ public interface IUserInfoData extends ICommonData<UserInfo, Long> {
     UserInfo findByUid(String uid);
 
     List<UserInfo> findByType(int type);
-
-    List<UserInfo> findByTypeAndOwnerId(int type, String ownerId);
 }

+ 1 - 0
iot-dao/iot-data-service/src/main/java/cc/iotkit/data/system/ISysAppData.java

@@ -11,5 +11,6 @@ import cc.iotkit.model.system.SysApp;
  */
 public interface ISysAppData extends ICommonData<SysApp, Long> {
 
+    SysApp findByAppId(String appId);
 
 }

+ 1 - 1
iot-dao/iot-data-service/src/main/java/cc/iotkit/data/system/ISysTenantData.java

@@ -10,6 +10,6 @@ import cc.iotkit.model.system.SysTenant;
  */
 public interface ISysTenantData  extends ICommonData<SysTenant, Long> {
 
-    void updateTenant(SysTenant tenant);
+    boolean checkCompanyNameUnique(SysTenant to);
 
 }

+ 1 - 1
iot-dao/iot-data-serviceImpl-cache/src/main/java/cc/iotkit/data/cache/SpaceCacheEvict.java

@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
 public class SpaceCacheEvict {
 
     @CacheEvict(value = Constants.CACHE_SPACE, key = "#root.method.name+#s")
-    public void findById(String s) {
+    public void findById(Long s) {
     }
 
 }

+ 7 - 32
iot-dao/iot-data-serviceImpl-cache/src/main/java/cc/iotkit/data/service/SpaceDataCache.java

@@ -1,10 +1,10 @@
 package cc.iotkit.data.service;
 
 import cc.iotkit.common.api.PageRequest;
+import cc.iotkit.common.api.Paging;
 import cc.iotkit.common.constant.Constants;
-import cc.iotkit.data.manager.ISpaceData;
 import cc.iotkit.data.cache.SpaceCacheEvict;
-import cc.iotkit.common.api.Paging;
+import cc.iotkit.data.manager.ISpaceData;
 import cc.iotkit.model.space.Space;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -24,43 +24,18 @@ public class SpaceDataCache implements ISpaceData {
     private SpaceCacheEvict spaceCacheEvict;
 
     @Override
-    public List<Space> findByUidOrderByCreateAtDesc(String uid) {
-        return spaceData.findByUidOrderByCreateAtDesc(uid);
-    }
-
-    @Override
-    public List<Space> findByUidAndHomeIdOrderByCreateAtDesc(String uid, String homeId) {
-        return spaceData.findByUidAndHomeIdOrderByCreateAtDesc(uid, homeId);
-    }
-
-    @Override
-    public List<Space> findByHomeId(String homeId) {
+    public List<Space> findByHomeId(Long homeId) {
         return spaceData.findByHomeId(homeId);
     }
 
-    @Override
-    public List<Space> findByUid(String uid) {
-        return spaceData.findByUid(uid);
-    }
-
-    @Override
-    public Paging<Space> findByUid(String uid, int page, int size) {
-        return spaceData.findByUid(uid, page, size);
-    }
-
-    @Override
-    public long countByUid(String uid) {
-        return spaceData.countByUid(uid);
-    }
-
     @Override
     @Cacheable(value = Constants.CACHE_SPACE, key = "#root.method.name+#s", unless = "#result == null")
-    public Space findById(String s) {
+    public Space findById(Long s) {
         return spaceData.findById(s);
     }
 
     @Override
-    public List<Space> findByIds(Collection<String> id) {
+    public List<Space> findByIds(Collection<Long> id) {
         return null;
     }
 
@@ -77,12 +52,12 @@ public class SpaceDataCache implements ISpaceData {
     }
 
     @Override
-    public void deleteById(String s) {
+    public void deleteById(Long s) {
         spaceData.deleteById(s);
     }
 
     @Override
-    public void deleteByIds(Collection<String> strings) {
+    public void deleteByIds(Collection<Long> strings) {
 
     }
 

+ 0 - 5
iot-dao/iot-data-serviceImpl-cache/src/main/java/cc/iotkit/data/service/UserInfoDataCache.java

@@ -34,11 +34,6 @@ public class UserInfoDataCache implements IUserInfoData {
         return userInfoData.findByType(type);
     }
 
-    @Override
-    public List<UserInfo> findByTypeAndOwnerId(int type, String ownerId) {
-        return userInfoData.findByTypeAndOwnerId(type, ownerId);
-    }
-
     @Override
     public UserInfo findById(Long s) {
         return userInfoData.findById(s);

+ 13 - 7
iot-dao/iot-data-serviceImpl-rdb/pom.xml

@@ -58,11 +58,17 @@
             <artifactId>h2</artifactId>
         </dependency>
 
-        <!--        <dependency>-->
-        <!--            <groupId>mysql</groupId>-->
-        <!--            <artifactId>mysql-connector-java</artifactId>-->
-        <!--            <version>8.0.32</version>-->
-        <!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>mysql</groupId>-->
+<!--            <artifactId>mysql-connector-java</artifactId>-->
+<!--            <version>8.0.32</version>-->
+<!--        </dependency>-->
+<!--        -->
+<!--        <dependency>-->
+<!--            <groupId>org.postgresql</groupId>-->
+<!--            <artifactId>postgresql</artifactId>-->
+<!--            <version>42.2.9</version>-->
+<!--        </dependency>-->
 
         <dependency>
             <groupId>cn.hutool</groupId>
@@ -85,8 +91,8 @@
         </dependency>
 
         <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-annotations</artifactId>
+            <groupId>com.github.biyanwen</groupId>
+            <artifactId>jpa-comment-spring-boot-starter</artifactId>
         </dependency>
 
         <dependency>

+ 6 - 8
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/HomeRepository.java

@@ -16,19 +16,17 @@ import org.springframework.data.jpa.repository.JpaRepository;
 
 import java.util.List;
 
-public interface HomeRepository extends JpaRepository<TbHome, String> {
+public interface HomeRepository extends JpaRepository<TbHome, Long> {
 
-    TbHome findByUidAndCurrent(String uid, boolean current);
+    TbHome findByUserIdAndCurrent(Long userId, boolean current);
 
-    TbHome findByUidAndId(String uid, String id);
+    List<TbHome> findByUserId(Long userId);
 
-    List<TbHome> findByUid(String uid);
+    Page<TbHome> findByUserId(Long userId, Pageable pageable);
 
-    Page<TbHome> findByUid(String uid, Pageable pageable);
+    long countByUserId(Long userId);
 
-    long countByUid(String uid);
-
-    void deleteById(String s);
+    void deleteById(Long s);
 
     long count();
 

+ 6 - 16
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/SpaceDeviceRepository.java

@@ -10,29 +10,19 @@
 package cc.iotkit.data.dao;
 
 import cc.iotkit.data.model.TbSpaceDevice;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 
 import java.util.List;
 
-public interface SpaceDeviceRepository extends JpaRepository<TbSpaceDevice, String> {
+public interface SpaceDeviceRepository extends JpaRepository<TbSpaceDevice, Long> {
 
-    List<TbSpaceDevice> findByUid(String uid);
+    List<TbSpaceDevice> findByHomeIdAndCollect(Long homeId,boolean collect);
 
-    Page<TbSpaceDevice> findByUid(String uid, Pageable pageable);
-
-    List<TbSpaceDevice> findByUidOrderByUseAtDesc(String uid);
-
-    List<TbSpaceDevice> findByHomeIdAndCollect(String homeId,boolean collect);
-
-    List<TbSpaceDevice> findByUidOrderByAddAtDesc(String uid);
-
-    List<TbSpaceDevice> findBySpaceIdOrderByAddAtDesc(String spaceId);
+    TbSpaceDevice findByDeviceId(String deviceId);
 
-    List<TbSpaceDevice> findByUidAndSpaceIdOrderByAddAtDesc(String uid, String spaceId);
+    List<TbSpaceDevice> findByHomeId(Long homeId);
 
-    TbSpaceDevice findByDeviceId(String deviceId);
+    List<TbSpaceDevice> findBySpaceId(Long spaceId);
 
-    TbSpaceDevice findByDeviceIdAndUid(String deviceId, String uid);
+    void deleteAllBySpaceId(Long spaceId);
 }

+ 2 - 12
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/SpaceRepository.java

@@ -10,22 +10,12 @@
 package cc.iotkit.data.dao;
 
 import cc.iotkit.data.model.TbSpace;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 
 import java.util.List;
 
-public interface SpaceRepository extends JpaRepository<TbSpace, String> {
+public interface SpaceRepository extends JpaRepository<TbSpace, Long> {
 
-    List<TbSpace> findByUidOrderByCreateAtDesc(String uid);
-
-    List<TbSpace> findByUidAndHomeIdOrderByCreateAtDesc(String uid, String homeId);
-
-    List<TbSpace> findByHomeId(String homeId);
-
-    List<TbSpace> findByUid(String uid);
-
-    Page<TbSpace> findByUid(String uid, Pageable pageable);
+    List<TbSpace> findByHomeId(Long homeId);
 
 }

+ 1 - 1
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/SysAppRepository.java

@@ -11,5 +11,5 @@ import org.springframework.data.querydsl.QuerydslPredicateExecutor;
  * @date 2023-08-10
  */
 public interface SysAppRepository extends JpaRepository<TbSysApp, Long>, QuerydslPredicateExecutor<TbSysApp> {
-
+    TbSysApp findByAppId(String appId);
 }

+ 0 - 2
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/UserInfoRepository.java

@@ -20,6 +20,4 @@ public interface UserInfoRepository extends JpaRepository<TbUserInfo, String> {
 
     List<TbUserInfo> findByType(int type);
 
-    List<TbUserInfo> findByTypeAndOwnerId(int type, String ownerId);
-
 }

+ 20 - 7
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbHome.java

@@ -1,29 +1,36 @@
 package cc.iotkit.data.model;
 
+import cc.iotkit.common.tenant.dao.TenantAware;
+import cc.iotkit.common.tenant.listener.TenantListener;
 import cc.iotkit.model.space.Home;
 import io.github.linpeilie.annotations.AutoMapper;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Filter;
+import org.hibernate.annotations.FilterDef;
 import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.ParamDef;
 
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import javax.persistence.*;
 
 @Data
 @Entity
+@NoArgsConstructor
 @Table(name = "home")
 @ApiModel(value = "家庭信息")
 @AutoMapper(target = Home.class)
-public class TbHome {
+@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")})
+@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
+@EntityListeners(TenantListener.class)
+public class TbHome extends BaseEntity implements TenantAware {
 
     @Id
     @GeneratedValue(generator = "SnowflakeIdGenerator")
     @GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
     @ApiModelProperty(value = "家庭id")
-    private String id;
+    private Long id;
 
     /**
      * 家庭名称
@@ -41,7 +48,7 @@ public class TbHome {
      * 关联用户id
      */
     @ApiModelProperty(value = "关联用户id")
-    private String uid;
+    private Long userId;
 
     /**
      * 空间数量
@@ -61,4 +68,10 @@ public class TbHome {
     @ApiModelProperty(value = "是否为用户当前使用的家庭")
     private Boolean current;
 
+    /**
+     * 租户编号
+     */
+    @ApiModelProperty(value = "租户编号")
+    private String tenantId;
+
 }

+ 19 - 15
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSpace.java

@@ -9,42 +9,43 @@
  */
 package cc.iotkit.data.model;
 
+import cc.iotkit.common.tenant.dao.TenantAware;
+import cc.iotkit.common.tenant.listener.TenantListener;
 import cc.iotkit.model.space.Space;
 import io.github.linpeilie.annotations.AutoMapper;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Filter;
+import org.hibernate.annotations.FilterDef;
 import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.ParamDef;
 
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import javax.persistence.*;
 
 @Data
 @Entity
+@NoArgsConstructor
 @ApiModel(value = "空间")
 @Table(name = "space")
 @AutoMapper(target = Space.class)
-public class TbSpace {
+@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")})
+@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
+@EntityListeners(TenantListener.class)
+public class TbSpace extends BaseEntity implements TenantAware {
 
     @Id
     @GeneratedValue(generator = "SnowflakeIdGenerator")
     @GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
     @ApiModelProperty(value = "空间id")
-    private String id;
+    private Long id;
 
     /**
      * 关联家庭id
      */
     @ApiModelProperty(value = "关联家庭id")
-    private String homeId;
-
-    /**
-     * 关联用户id
-     */
-    @ApiModelProperty(value = "关联用户id")
-    private String uid;
+    private Long homeId;
 
     /**
      * 空间名称
@@ -58,7 +59,10 @@ public class TbSpace {
     @ApiModelProperty(value = "设备数量")
     private Integer deviceNum;
 
-    @ApiModelProperty(value = "创建时间")
-    private Long createAt;
+    /**
+     * 租户编号
+     */
+    @ApiModelProperty(value = "租户编号")
+    private String tenantId;
 
 }

+ 19 - 32
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSpaceDevice.java

@@ -9,41 +9,34 @@
  */
 package cc.iotkit.data.model;
 
+import cc.iotkit.common.tenant.dao.TenantAware;
+import cc.iotkit.common.tenant.listener.TenantListener;
 import cc.iotkit.model.space.SpaceDevice;
 import io.github.linpeilie.annotations.AutoMapper;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.hibernate.annotations.Filter;
+import org.hibernate.annotations.FilterDef;
 import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.ParamDef;
 
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import javax.persistence.*;
 
 @Data
 @Entity
 @Table(name = "space_device")
 @ApiModel(value = "空间设备")
 @AutoMapper(target = SpaceDevice.class)
-public class TbSpaceDevice {
+@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")})
+@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
+@EntityListeners(TenantListener.class)
+public class TbSpaceDevice extends BaseEntity implements TenantAware {
 
     @Id
     @GeneratedValue(generator = "SnowflakeIdGenerator")
     @GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
-    private String id;
-
-    /**
-     * 关联用户id
-     */
-    @ApiModelProperty(value = "关联用户id")
-    private String uid;
-
-    /**
-     * 分享的用户id
-     */
-    @ApiModelProperty(value = "分享的用户id")
-    private String sharedUid;
+    private Long id;
 
     /**
      * 空间中的设备id
@@ -61,25 +54,13 @@ public class TbSpaceDevice {
      * 所属家庭Id
      */
     @ApiModelProperty(value = "所属家庭Id")
-    private String homeId;
+    private Long homeId;
 
     /**
      * 空间id
      */
     @ApiModelProperty(value = "空间id")
-    private String spaceId;
-
-    /**
-     * 添加时间
-     */
-    @ApiModelProperty(value = "添加时间")
-    private Long addAt;
-
-    /**
-     * 使用时间
-     */
-    @ApiModelProperty(value = "使用时间")
-    private Long useAt;
+    private Long spaceId;
 
     /**
      * 是否收藏
@@ -87,4 +68,10 @@ public class TbSpaceDevice {
     @ApiModelProperty(value = "是否收藏")
     private Boolean collect;
 
+    /**
+     * 租户编号
+     */
+    @ApiModelProperty(value = "租户编号")
+    private String tenantId;
+
 }

+ 17 - 6
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSysApp.java

@@ -2,13 +2,13 @@ package cc.iotkit.data.model;
 
 import cc.iotkit.common.tenant.dao.TenantAware;
 import cc.iotkit.common.tenant.listener.TenantListener;
-import cc.iotkit.model.TenantModel;
 import cc.iotkit.model.system.SysApp;
 import io.github.linpeilie.annotations.AutoMapper;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
 import org.hibernate.annotations.Filter;
 import org.hibernate.annotations.FilterDef;
 import org.hibernate.annotations.GenericGenerator;
@@ -25,15 +25,14 @@ import javax.persistence.*;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @Entity
+@NoArgsConstructor
 @Table(name = "SYS_APP")
 @AutoMapper(target = SysApp.class)
 @ApiModel(value = "应用信息表")
 @FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")})
 @Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
 @EntityListeners(TenantListener.class)
-public class TbSysApp extends TenantModel implements TenantAware {
-
-
+public class TbSysApp extends BaseEntity implements TenantAware {
 
     /**
      * 主键id
@@ -44,6 +43,18 @@ public class TbSysApp extends TenantModel implements TenantAware {
     @ApiModelProperty(value = "主键id")
     private Long id;
 
+    /**
+     * 租户编号
+     */
+    @ApiModelProperty(value = "租户编号")
+    private String tenantId;
+
+    /**
+     * 应用名称
+     */
+    @ApiModelProperty(value = "应用名称")
+    private String appName;
+
     /**
      * appId
      */
@@ -57,7 +68,7 @@ public class TbSysApp extends TenantModel implements TenantAware {
     private String appSecret;
 
     /**
-     * 应用类型
+     * 应用类型,0:app,1:小程序
      */
     @ApiModelProperty(value = "应用类型")
     private String appType;
@@ -66,7 +77,7 @@ public class TbSysApp extends TenantModel implements TenantAware {
      * 备注
      */
     @ApiModelProperty(value = "备注")
-    private String REMARK;
+    private String remark;
 
 
 }

+ 1 - 1
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSysTenant.java

@@ -113,7 +113,7 @@ public class TbSysTenant extends BaseEntity implements TenantAware {
      * 租户状态(0正常 1停用)
      */
     @ApiModelProperty(value = "租户状态(0正常 1停用)")
-    private String status;
+    private String status=UserConstants.DICT_ABNORMAL;
 
     /**
      * 删除标志(0代表存在 2代表删除)

+ 2 - 4
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbSysTenantPackage.java

@@ -8,10 +8,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.hibernate.annotations.GenericGenerator;
 
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import javax.persistence.*;
 
 /**
  * 租户套餐对象 sys_tenant_package
@@ -42,6 +39,7 @@ public class TbSysTenantPackage extends BaseEntity {
     /**
      * 关联菜单id
      */
+    @Column(columnDefinition = "text")
     @ApiModelProperty(value = "关联菜单id")
     private String menuIds;
     /**

+ 19 - 11
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbUserInfo.java

@@ -1,23 +1,34 @@
 package cc.iotkit.data.model;
 
+import cc.iotkit.common.tenant.dao.TenantAware;
+import cc.iotkit.common.tenant.listener.TenantListener;
 import cc.iotkit.model.UserInfo;
 import io.github.linpeilie.annotations.AutoMapper;
 import io.github.linpeilie.annotations.AutoMapping;
 import io.github.linpeilie.annotations.ReverseAutoMapping;
+import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Filter;
+import org.hibernate.annotations.FilterDef;
 import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.ParamDef;
 
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import javax.persistence.*;
 
 @Data
+@EqualsAndHashCode(callSuper = true)
 @Entity
+@NoArgsConstructor
 @Table(name = "user_info")
 @AutoMapper(target = UserInfo.class)
-public class TbUserInfo {
+@ApiModel(value = "用户信息表")
+@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")})
+@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
+@EntityListeners(TenantListener.class)
+public class TbUserInfo extends BaseEntity implements TenantAware {
 
     @Id
     @GeneratedValue(generator = "SnowflakeIdGenerator")
@@ -31,10 +42,10 @@ public class TbUserInfo {
     private String uid;
 
     /**
-     * 归属账
+     * 租户编
      */
-    @ApiModelProperty(value = "归属账号")
-    private String ownerId;
+    @ApiModelProperty(value = "租户编号")
+    private String tenantId;
 
     /**
      * 密钥(密码加密后的内容)
@@ -106,7 +117,4 @@ public class TbUserInfo {
     @AutoMapping(ignore = true)
     private String usePlatforms;
 
-    @ApiModelProperty(value="创建时间")
-    private Long createAt;
-
 }

+ 21 - 32
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/HomeDataImpl.java

@@ -1,27 +1,34 @@
 package cc.iotkit.data.service;
 
+import cc.iotkit.common.satoken.utils.LoginHelper;
 import cc.iotkit.common.utils.MapstructUtils;
 import cc.iotkit.data.dao.HomeRepository;
 import cc.iotkit.data.dao.IJPACommData;
 import cc.iotkit.data.manager.IHomeData;
 import cc.iotkit.data.model.TbHome;
+import cc.iotkit.data.util.PredicateBuilder;
 import cc.iotkit.model.space.Home;
-import org.apache.commons.lang3.StringUtils;
+import com.querydsl.jpa.impl.JPAQueryFactory;
+import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Primary;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
-import java.util.UUID;
+import java.util.Objects;
+
+import static cc.iotkit.data.model.QTbHome.tbHome;
 
 @Primary
 @Service
-public class HomeDataImpl implements IHomeData, IJPACommData<Home, String> {
+@RequiredArgsConstructor
+public class HomeDataImpl implements IHomeData, IJPACommData<Home, Long> {
 
     @Autowired
     private HomeRepository homeRepository;
 
+    private final JPAQueryFactory jpaQueryFactory;
 
     @Override
     public JpaRepository getBaseRepository() {
@@ -39,42 +46,24 @@ public class HomeDataImpl implements IHomeData, IJPACommData<Home, String> {
     }
 
     @Override
-    public Home findByUidAndCurrent(String uid, boolean current) {
-        return MapstructUtils.convert(homeRepository.findByUidAndCurrent(uid, current), Home.class);
-    }
-
-    @Override
-    public Home findByUidAndId(String uid, String id) {
-        return MapstructUtils.convert(homeRepository.findByUidAndId(uid, id), Home.class);
-    }
-
-    @Override
-    public List<Home> findByUid(String uid) {
-        return MapstructUtils.convert(homeRepository.findByUid(uid), Home.class);
+    public Home findByUserIdAndCurrent(Long userId, boolean current) {
+        return MapstructUtils.convert(homeRepository.findByUserIdAndCurrent(userId, current), Home.class);
     }
 
-
     @Override
-    public long countByUid(String uid) {
-        return 0;
+    public List<Home> findByUserId(Long userId) {
+        return MapstructUtils.convert(homeRepository.findByUserId(userId), Home.class);
     }
 
     @Override
-    public Home findById(String s) {
-        return MapstructUtils.convert(homeRepository.findById(s).orElse(null), Home.class);
+    public boolean checkHomeNameUnique(Home home) {
+        final TbHome ret = jpaQueryFactory.select(tbHome).from(tbHome)
+                .where(PredicateBuilder.instance()
+                        .and(tbHome.name.eq(home.getName()))
+                        .and(tbHome.userId.eq(LoginHelper.getUserId()))
+                        .build()).fetchOne();
+        return Objects.isNull(ret);
     }
 
 
-    @Override
-    public Home save(Home data) {
-        if (StringUtils.isBlank(data.getId())) {
-            data.setId(UUID.randomUUID().toString());
-        }
-        homeRepository.save(MapstructUtils.convert(data, TbHome.class));
-        return data;
-    }
-
-
-
-
 }

+ 2 - 55
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SpaceDataImpl.java

@@ -1,26 +1,21 @@
 package cc.iotkit.data.service;
 
-import cc.iotkit.common.api.Paging;
 import cc.iotkit.common.utils.MapstructUtils;
 import cc.iotkit.data.dao.IJPACommData;
 import cc.iotkit.data.dao.SpaceRepository;
 import cc.iotkit.data.manager.ISpaceData;
 import cc.iotkit.data.model.TbSpace;
 import cc.iotkit.model.space.Space;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Primary;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
-import java.util.UUID;
 
 @Primary
 @Service
-public class SpaceDataImpl implements ISpaceData, IJPACommData<Space, String> {
+public class SpaceDataImpl implements ISpaceData, IJPACommData<Space, Long> {
 
     @Autowired
     private SpaceRepository spaceRepository;
@@ -42,55 +37,7 @@ public class SpaceDataImpl implements ISpaceData, IJPACommData<Space, String> {
     }
 
     @Override
-    public List<Space> findByUidOrderByCreateAtDesc(String uid) {
-        return MapstructUtils.convert(spaceRepository.findByUidOrderByCreateAtDesc(uid), Space.class);
-    }
-
-    @Override
-    public List<Space> findByUidAndHomeIdOrderByCreateAtDesc(String uid, String homeId) {
-        return MapstructUtils.convert(spaceRepository.findByUidAndHomeIdOrderByCreateAtDesc(uid, homeId), Space.class);
-    }
-
-    @Override
-    public List<Space> findByHomeId(String homeId) {
+    public List<Space> findByHomeId(Long homeId) {
         return MapstructUtils.convert(spaceRepository.findByHomeId(homeId), Space.class);
     }
-
-    @Override
-    public List<Space> findByUid(String uid) {
-        return MapstructUtils.convert(spaceRepository.findByUid(uid), Space.class);
-    }
-
-    @Override
-    public Paging<Space> findByUid(String uid, int page, int size) {
-        Page<TbSpace> paged = spaceRepository.findByUid(uid,
-                Pageable.ofSize(size).withPage(page - 1));
-        return new Paging<>(paged.getTotalElements(),
-                MapstructUtils.convert(paged.getContent(), Space.class));
-    }
-
-    @Override
-    public long countByUid(String uid) {
-        return 0;
-    }
-
-
-
-    @Override
-    public Space findById(String s) {
-        return MapstructUtils.convert(spaceRepository.findById(s).orElse(null), Space.class);
-    }
-
-
-    @Override
-    public Space save(Space data) {
-        if (StringUtils.isBlank(data.getId())) {
-            data.setId(UUID.randomUUID().toString());
-        }
-        spaceRepository.save(MapstructUtils.convert(data, TbSpace.class));
-        return data;
-    }
-
-
-
 }

+ 8 - 63
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SpaceDeviceDataImpl.java

@@ -9,25 +9,22 @@
  */
 package cc.iotkit.data.service;
 
-import cc.iotkit.common.api.Paging;
 import cc.iotkit.common.utils.MapstructUtils;
 import cc.iotkit.data.dao.IJPACommData;
 import cc.iotkit.data.dao.SpaceDeviceRepository;
 import cc.iotkit.data.manager.ISpaceDeviceData;
 import cc.iotkit.data.model.TbSpaceDevice;
 import cc.iotkit.model.space.SpaceDevice;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Primary;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
-import java.util.UUID;
 
 @Primary
 @Service
-public class SpaceDeviceDataImpl implements ISpaceDeviceData, IJPACommData<SpaceDevice, String> {
+public class SpaceDeviceDataImpl implements ISpaceDeviceData, IJPACommData<SpaceDevice, Long> {
 
     @Autowired
     private SpaceDeviceRepository spaceDeviceRepository;
@@ -48,29 +45,20 @@ public class SpaceDeviceDataImpl implements ISpaceDeviceData, IJPACommData<Space
         return SpaceDevice.class;
     }
 
-    @Override
-    public List<SpaceDevice> findByUidOrderByUseAtDesc(String uid) {
-        return MapstructUtils.convert(spaceDeviceRepository.findByUidOrderByUseAtDesc(uid), SpaceDevice.class);
-    }
 
     @Override
-    public List<SpaceDevice> findByHomeIdAndCollect(String homeId, boolean collect) {
+    public List<SpaceDevice> findByHomeIdAndCollect(Long homeId, boolean collect) {
         return MapstructUtils.convert(spaceDeviceRepository.findByHomeIdAndCollect(homeId, collect), SpaceDevice.class);
     }
 
     @Override
-    public List<SpaceDevice> findByUidOrderByAddAtDesc(String uid) {
-        return MapstructUtils.convert(spaceDeviceRepository.findByUidOrderByAddAtDesc(uid), SpaceDevice.class);
-    }
-
-    @Override
-    public List<SpaceDevice> findBySpaceIdOrderByAddAtDesc(String spaceId) {
-        return MapstructUtils.convert(spaceDeviceRepository.findBySpaceIdOrderByAddAtDesc(spaceId), SpaceDevice.class);
+    public List<SpaceDevice> findByHomeId(Long homeId) {
+        return MapstructUtils.convert(spaceDeviceRepository.findByHomeId(homeId), SpaceDevice.class);
     }
 
     @Override
-    public List<SpaceDevice> findByUidAndSpaceIdOrderByAddAtDesc(String uid, String spaceId) {
-        return MapstructUtils.convert(spaceDeviceRepository.findByUidAndSpaceIdOrderByAddAtDesc(uid, spaceId), SpaceDevice.class);
+    public List<SpaceDevice> findBySpaceId(Long spaceId) {
+        return MapstructUtils.convert(spaceDeviceRepository.findBySpaceId(spaceId), SpaceDevice.class);
     }
 
     @Override
@@ -79,51 +67,8 @@ public class SpaceDeviceDataImpl implements ISpaceDeviceData, IJPACommData<Space
     }
 
     @Override
-    public SpaceDevice findByDeviceIdAndUid(String deviceId, String uid) {
-        return MapstructUtils.convert(spaceDeviceRepository.findByDeviceIdAndUid(deviceId, uid), SpaceDevice.class);
-    }
-
-    @Override
-    public List<SpaceDevice> findByUid(String uid) {
-        return MapstructUtils.convert(spaceDeviceRepository.findByUid(uid), SpaceDevice.class);
+    public void deleteAllBySpaceId(Long spaceId) {
+        spaceDeviceRepository.deleteAllBySpaceId(spaceId);
     }
 
-    @Override
-    public Paging<SpaceDevice> findByUid(String uid, int page, int size) {
-        return new Paging<>();
-    }
-
-    @Override
-    public long countByUid(String uid) {
-        return 0;
-    }
-
-
-
-    @Override
-    public SpaceDevice findById(String s) {
-        return MapstructUtils.convert(spaceDeviceRepository.findById(s).orElse(null), SpaceDevice.class);
-    }
-
-
-
-    @Override
-    public SpaceDevice save(SpaceDevice data) {
-        if (StringUtils.isBlank(data.getId())) {
-            data.setId(UUID.randomUUID().toString());
-            data.setAddAt(System.currentTimeMillis());
-        }
-        spaceDeviceRepository.save(MapstructUtils.convert(data, TbSpaceDevice.class));
-        return data;
-    }
-
-
-    @Override
-    public List<SpaceDevice> findAll() {
-        return MapstructUtils.convert(spaceDeviceRepository.findAll(), SpaceDevice.class);
-    }
-
-
-
-
 }

+ 12 - 0
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysAppDataImpl.java

@@ -1,10 +1,12 @@
 package cc.iotkit.data.service;
 
+import cc.iotkit.common.utils.MapstructUtils;
 import cc.iotkit.data.dao.IJPACommData;
 import cc.iotkit.data.dao.SysAppRepository;
 import cc.iotkit.data.model.TbSysApp;
 import cc.iotkit.data.system.ISysAppData;
 import cc.iotkit.model.system.SysApp;
+import cn.hutool.core.util.ObjectUtil;
 import com.querydsl.jpa.impl.JPAQueryFactory;
 import lombok.RequiredArgsConstructor;
 import org.springframework.context.annotation.Primary;
@@ -59,4 +61,14 @@ public class SysAppDataImpl implements ISysAppData, IJPACommData<SysApp, Long> {
     public Class getTClass() {
         return SysApp.class;
     }
+
+    @Override
+    public SysApp findByAppId(String appId) {
+        TbSysApp ret=baseRepository.findByAppId(appId);
+        if(ObjectUtil.isNotNull(ret)){
+            return MapstructUtils.convert(ret,SysApp.class);
+        }else{
+            return null;
+        }
+    }
 }

+ 1 - 0
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysConfigDataImpl.java

@@ -96,6 +96,7 @@ public class SysConfigDataImpl implements ISysConfigData, IJPACommData<SysConfig
     public List<SysConfig> findAllByCondition(SysConfig data) {
         Predicate predicate = PredicateBuilder.instance()
                 .and(StringUtils.isNotEmpty(data.getConfigKey()), () -> tbSysConfig.configKey.eq(data.getConfigKey()))
+                .and(StringUtils.isNotEmpty(data.getTenantId()), () -> tbSysConfig.tenantId.eq(data.getTenantId()))
                 .build();
         Iterator<TbSysConfig> iterator = baseRepository.findAll(predicate).iterator();
         return MapstructUtils.convert(IteratorUtils.toList(iterator), SysConfig.class);

+ 2 - 1
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysDictDataImpl.java

@@ -94,6 +94,7 @@ public class SysDictDataImpl implements ISysDictData, IJPACommData<SysDictData,
                 .and(dictData.getDictSort() != null, () -> tbSysDictData.dictSort.eq(dictData.getDictSort()))
                 .and(StringUtils.isNotEmpty(dictData.getDictLabel()), () -> tbSysDictData.dictLabel.like(dictData.getDictLabel()))
                 .and(StringUtils.isNotEmpty(dictData.getDictType()), () -> tbSysDictData.dictType.eq(dictData.getDictType()))
-                .and(StringUtils.isNotEmpty(dictData.getStatus()), () -> tbSysDictData.status.eq(dictData.getStatus())).build();
+                .and(StringUtils.isNotEmpty(dictData.getStatus()), () -> tbSysDictData.status.eq(dictData.getStatus()))
+                .and(StringUtils.isNotEmpty(dictData.getTenantId()), () -> tbSysDictData.tenantId.eq(dictData.getTenantId())).build();
     }
 }

+ 2 - 1
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysDictTypeDataImpl.java

@@ -97,7 +97,8 @@ public class SysDictTypeDataImpl implements ISysDictTypeData, IJPACommData<SysDi
         return PredicateBuilder.instance()
                 .and(StringUtils.isNotEmpty(dictType.getDictName()), () -> tbSysDictType.dictName.like(dictType.getDictName()))
                 .and(StringUtils.isNotEmpty(dictType.getDictType()), () -> tbSysDictType.dictType.like(dictType.getDictType()))
-                .and(StringUtils.isNotEmpty(dictType.getStatus()), () -> tbSysDictType.status.eq(dictType.getStatus())).build();
+                .and(StringUtils.isNotEmpty(dictType.getStatus()), () -> tbSysDictType.status.eq(dictType.getStatus()))
+                .and(StringUtils.isNotEmpty(dictType.getTenantId()), () -> tbSysDictType.tenantId.eq(dictType.getTenantId())).build();
     }
 
 

+ 1 - 0
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysRoleDataImpl.java

@@ -182,6 +182,7 @@ public class SysRoleDataImpl implements ISysRoleData, IJPACommData<SysRole, Long
                 .and(StringUtils.isNotBlank(role.getRoleName()), () -> tbSysRole.roleName.like(role.getRoleName()))
                 .and(StringUtils.isNotBlank(role.getStatus()), () -> tbSysRole.roleName.eq(role.getStatus()))
                 .and(StringUtils.isNotBlank(role.getRoleKey()), () -> tbSysRole.roleKey.like(role.getRoleKey()))
+                .and(StringUtils.isNotBlank(role.getTenantId()), () -> tbSysRole.tenantId.eq(role.getTenantId()))
                 .build();
 
     }

+ 8 - 11
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysTenantDataImpl.java

@@ -15,7 +15,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
-import java.util.Optional;
+import java.util.Objects;
 
 import static cc.iotkit.data.model.QTbSysTenant.tbSysTenant;
 
@@ -47,12 +47,6 @@ public class SysTenantDataImpl implements ISysTenantData, IJPACommData<SysTenant
         return SysTenant.class;
     }
 
-    @Override
-    public SysTenant findById(Long aLong) {
-        Optional<TbSysTenant> tenantOptional = sysTenantRepository.findById(aLong);
-        return tenantOptional.map(sysTenant -> MapstructUtils.convert(sysTenant, SysTenant.class)).orElse(null);
-    }
-
 
     @Override
     public List<SysTenant> findAllByCondition(SysTenant data) {
@@ -74,9 +68,12 @@ public class SysTenantDataImpl implements ISysTenantData, IJPACommData<SysTenant
     }
 
     @Override
-    public void updateTenant(SysTenant tenant) {
-        TbSysTenant tbSysTenant = MapstructUtils.convert(tenant, TbSysTenant.class);
-        assert tbSysTenant != null;
-        sysTenantRepository.save(tbSysTenant);
+    public boolean checkCompanyNameUnique(SysTenant tenant) {
+        final TbSysTenant ret = jpaQueryFactory.select(tbSysTenant).from(tbSysTenant)
+                .where(PredicateBuilder.instance()
+                        .and(tbSysTenant.companyName.eq(tenant.getCompanyName()))
+                        .and(Objects.nonNull(tenant.getId()), () -> tbSysTenant.id.ne(tenant.getId()))
+                        .build()).fetchOne();
+        return Objects.isNull(ret);
     }
 }

+ 2 - 2
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysTenantPackageDataImpl.java

@@ -1,7 +1,7 @@
 package cc.iotkit.data.service;
 
 import cc.iotkit.data.dao.IJPACommData;
-import cc.iotkit.data.dao.SysOssRepository;
+import cc.iotkit.data.dao.SysTenantPackageRepository;
 import cc.iotkit.data.model.TbSysTenantPackage;
 import cc.iotkit.data.system.ISysTenantPackageData;
 import cc.iotkit.model.system.SysTenantPackage;
@@ -22,7 +22,7 @@ import org.springframework.stereotype.Service;
 public class SysTenantPackageDataImpl implements ISysTenantPackageData, IJPACommData<SysTenantPackage, Long> {
 
     @Autowired
-    private SysOssRepository baseRepository;
+    private SysTenantPackageRepository baseRepository;
 
     private final JPAQueryFactory jpaQueryFactory;
 

+ 19 - 2
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysUserDataImpl.java

@@ -3,6 +3,7 @@ package cc.iotkit.data.service;
 import cc.iotkit.common.api.PageRequest;
 import cc.iotkit.common.api.Paging;
 import cc.iotkit.common.constant.UserConstants;
+import cc.iotkit.common.tenant.helper.TenantHelper;
 import cc.iotkit.common.utils.MapstructUtils;
 import cc.iotkit.common.utils.StreamUtils;
 import cc.iotkit.common.utils.StringUtils;
@@ -172,9 +173,25 @@ public class SysUserDataImpl implements ISysUserData, IJPACommData<SysUser, Long
         TbSysUser ret = jpaQueryFactory.select(tbSysUser).from(tbSysUser)
                 .where(PredicateBuilder.instance()
                         .and(tbSysUser.userName.eq(username))
-                        .and(tbSysUser.tenantId.eq(tenantId))
+                        .and(TenantHelper.isEnable(),() -> tbSysUser.tenantId.eq(tenantId))
                         .build()).fetchOne();
-        return MapstructUtils.convert(ret, SysUser.class);
+        if(Objects.nonNull(ret)){
+            SysUser convert = MapstructUtils.convert(ret, SysUser.class);
+            Long deptId = ret.getDeptId();
+            if (Objects.nonNull(deptId)) {
+                // 获取部门信息
+                SysDept sysDept = sysDeptData.findById(deptId);
+                convert.setDept(sysDept);
+                // 获取角色信息
+                List<SysRole> sysRoles = sysRoleData.findByUserId(ret.getId());
+
+                convert.setRoles(sysRoles);
+            }
+            return MapstructUtils.convert(ret, SysUser.class);
+        }else{
+            return null;
+        }
+
     }
 
     @Override

+ 0 - 5
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/UserInfoDataImpl.java

@@ -41,11 +41,6 @@ public class UserInfoDataImpl implements IUserInfoData, IJPACommData<UserInfo, L
         return MapstructUtils.convert(userInfoRepository.findByType(type), UserInfo.class);
     }
 
-    @Override
-    public List<UserInfo> findByTypeAndOwnerId(int type, String ownerId) {
-        return MapstructUtils.convert(userInfoRepository.findByTypeAndOwnerId(type, ownerId), UserInfo.class);
-    }
-
     @Override
     public JpaRepository getBaseRepository() {
         return userInfoRepository;

+ 1 - 1
iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/util/PageBuilder.java

@@ -54,7 +54,7 @@ public class PageBuilder {
     Map<String,String> sortMap = pageRequest.getSortMap();
     if (CollUtil.isNotEmpty(sortMap)){
       sortMap.forEach((k,v) -> {
-        orders.add(new Order(Direction.ASC, k));
+        orders.add(new Order(Direction.fromString("desc"), k));
       });
     }
     return orders;

+ 5 - 0
iot-dao/iot-temporal-service/pom.xml

@@ -13,6 +13,11 @@
 
     <dependencies>
 
+        <dependency>
+            <groupId>cc.iotkit</groupId>
+            <artifactId>iot-common-thing</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>cc.iotkit</groupId>
             <artifactId>iot-data-model</artifactId>

+ 1 - 1
iot-dao/iot-temporal-service/src/main/java/cc/iotkit/temporal/IThingModelMessageData.java

@@ -10,7 +10,7 @@
 package cc.iotkit.temporal;
 
 import cc.iotkit.common.api.Paging;
-import cc.iotkit.model.device.message.ThingModelMessage;
+import cc.iotkit.common.thing.ThingModelMessage;
 import cc.iotkit.model.stats.TimeData;
 
 import java.util.List;

+ 17 - 16
iot-dao/iot-temporal-serviceImpl-es/pom.xml

@@ -8,9 +8,10 @@
         <version>0.5.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    <version>0.5.0-SNAPSHOT</version>
+
     <artifactId>iot-temporal-serviceImpl-es</artifactId>
 
+
     <dependencies>
 
         <dependency>
@@ -58,21 +59,21 @@
                     <source>${java.version}</source> <!-- depending on your project -->
                     <target>${java.version}</target> <!-- depending on your project -->
                     <annotationProcessorPaths>
-                       <path>
-                        <groupId>org.projectlombok</groupId>
-                        <artifactId>lombok</artifactId>
-                        <version>${lombok.version}</version>
-                    </path>
-                    <path>
-                        <groupId>io.github.linpeilie</groupId>
-                        <artifactId>mapstruct-plus-processor</artifactId>
-                        <version>${mapstruct-plus.version}</version>
-                    </path>
-                    <path>
-                        <groupId>org.projectlombok</groupId>
-                        <artifactId>lombok-mapstruct-binding</artifactId>
-                        <version>0.2.0</version>
-                    </path>
+                        <path>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok</artifactId>
+                            <version>${lombok.version}</version>
+                        </path>
+                        <path>
+                            <groupId>io.github.linpeilie</groupId>
+                            <artifactId>mapstruct-plus-processor</artifactId>
+                            <version>${mapstruct-plus.version}</version>
+                        </path>
+                        <path>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok-mapstruct-binding</artifactId>
+                            <version>0.2.0</version>
+                        </path>
                         <!-- other annotation processors -->
                     </annotationProcessorPaths>
                 </configuration>

+ 1 - 1
iot-dao/iot-temporal-serviceImpl-es/src/main/java/cc/iotkit/temporal/es/document/DocThingModelMessage.java

@@ -9,7 +9,7 @@
  */
 package cc.iotkit.temporal.es.document;
 
-import cc.iotkit.model.device.message.ThingModelMessage;
+import cc.iotkit.common.thing.ThingModelMessage;
 import io.github.linpeilie.annotations.AutoMapper;
 import lombok.AllArgsConstructor;
 import lombok.Builder;

+ 0 - 2
iot-dao/iot-temporal-serviceImpl-es/src/main/java/cc/iotkit/temporal/es/service/DevicePropertyDataImpl.java

@@ -21,7 +21,6 @@ import org.elasticsearch.search.sort.FieldSortBuilder;
 import org.elasticsearch.search.sort.SortOrder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.data.domain.Pageable;
 import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
 import org.springframework.data.elasticsearch.core.SearchHits;
 import org.springframework.data.elasticsearch.core.document.Document;
@@ -56,7 +55,6 @@ public class DevicePropertyDataImpl implements IDevicePropertyData {
                                         .from(start, true).to(end, true))
                 )
                 .withSorts(new FieldSortBuilder("time").order(SortOrder.ASC))
-                .withPageable(Pageable.ofSize(size))
                 .build();
         SearchHits<DocDeviceProperty> result = template.search(query, DocDeviceProperty.class, IndexCoordinates.of(index));
         return result.getSearchHits().stream()

+ 1 - 1
iot-dao/iot-temporal-serviceImpl-es/src/main/java/cc/iotkit/temporal/es/service/ThingModelMessageDataImpl.java

@@ -10,8 +10,8 @@
 package cc.iotkit.temporal.es.service;
 
 import cc.iotkit.common.api.Paging;
+import cc.iotkit.common.thing.ThingModelMessage;
 import cc.iotkit.common.utils.MapstructUtils;
-import cc.iotkit.model.device.message.ThingModelMessage;
 import cc.iotkit.model.stats.TimeData;
 import cc.iotkit.temporal.IThingModelMessageData;
 import cc.iotkit.temporal.es.dao.ThingModelMessageRepository;

+ 1 - 1
iot-dao/iot-temproal-serviceImpl-td/pom.xml → iot-dao/iot-temporal-serviceImpl-td/pom.xml

@@ -9,7 +9,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <version>0.5.0-SNAPSHOT</version>
-    <artifactId>iot-temproal-serviceImpl-td</artifactId>
+    <artifactId>iot-temporal-serviceImpl-td</artifactId>
 
     <description>
         时序数据库服务接口的TDengine实现

+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/config/Constants.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/config/Constants.java


+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/config/TdDatasourceConfig.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/config/TdDatasourceConfig.java


+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dao/TdTemplate.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dao/TdTemplate.java


+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/FieldParser.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/FieldParser.java


+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TableManager.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TableManager.java


+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdField.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdField.java


+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdResponse.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdResponse.java


+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdRestApi.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/dm/TdRestApi.java


+ 0 - 0
iot-dao/iot-temproal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/model/TbDeviceProperty.java → iot-dao/iot-temporal-serviceImpl-td/src/main/java/cc/iotkit/temporal/td/model/TbDeviceProperty.java


Деякі файли не було показано, через те що забагато файлів було змінено