Commit 7c254a1c6fd9ec4c35f598bc42ae73276caf0f13
Merge branch '20220722' into 'master'
feat: 设备新增字段“设备厂商” See merge request huang/thingsboard3.3.2!120
Showing
10 changed files
with
29 additions
and
11 deletions
... | ... | @@ -1143,10 +1143,10 @@ file: |
1143 | 1143 | staticUrl: /oss/files/** #oss静态访问路径 只有type = local需要 |
1144 | 1144 | randomFileName: ${file.storage.randomFileName} |
1145 | 1145 | minio: |
1146 | - minioUrl: https://dev.thingskit.com:9000 #minio储存地址 | |
1146 | + minioUrl: ${MINIO_URL:https://dev.thingskit.com:9000} #minio储存地址 | |
1147 | 1147 | # minioUrl: https://demo.thingskit.com:9000 #minio储存地址 |
1148 | - minioName: YunTeng #minio账户 | |
1149 | - minioPass: YunTeng123456 #minio访问密码 | |
1148 | + minioName: ${MINIO_NAME:YunTeng} #minio账户 | |
1149 | + minioPass: ${MINIO_PWD:YunTeng123456} #minio访问密码 | |
1150 | 1150 | bucketName: yunteng #minio储存桶名称 |
1151 | 1151 | randomFileName: ${file.storage.randomFileName} |
1152 | 1152 | account: | ... | ... |
common/data/src/main/java/org/thingsboard/server/common/data/yunteng/dto/ConfigurationCenterDTO.java
... | ... | @@ -22,9 +22,15 @@ public class ConfigurationCenterDTO extends TenantDTO { |
22 | 22 | |
23 | 23 | @ApiModelProperty(value = "组织ID", required = true) |
24 | 24 | @NotEmpty( |
25 | - message = "组织ID不能为空或空字符串", | |
26 | - groups = {UpdateGroup.class, AddGroup.class}) | |
25 | + message = "组织ID不能为空或空字符串", | |
26 | + groups = {UpdateGroup.class, AddGroup.class}) | |
27 | 27 | private String organizationId; |
28 | 28 | |
29 | + @ApiModelProperty(value = "终端类型", required = true) | |
30 | + @NotEmpty( | |
31 | + message = "终端类型不能为空或空字符串", | |
32 | + groups = {UpdateGroup.class, AddGroup.class}) | |
33 | + private String platform; | |
34 | + | |
29 | 35 | private OrganizationDTO organizationDTO; |
30 | 36 | } | ... | ... |
... | ... | @@ -45,7 +45,8 @@ public class DeviceDTO extends TenantDTO { |
45 | 45 | private YtCredentialsDto deviceToken; |
46 | 46 | |
47 | 47 | private String tbDeviceId; |
48 | - private String deviceTypeId; | |
48 | + @ApiModelProperty(value = "设备厂商") | |
49 | + private String brand; | |
49 | 50 | |
50 | 51 | @NotEmpty( |
51 | 52 | message = "设备编号不能为空", | ... | ... |
... | ... | @@ -3,8 +3,11 @@ package org.thingsboard.server.common.data.yunteng.dto.request; |
3 | 3 | import io.swagger.annotations.ApiModel; |
4 | 4 | import io.swagger.annotations.ApiModelProperty; |
5 | 5 | import lombok.Data; |
6 | +import org.thingsboard.server.common.data.yunteng.common.AddGroup; | |
7 | +import org.thingsboard.server.common.data.yunteng.common.UpdateGroup; | |
6 | 8 | import org.thingsboard.server.common.data.yunteng.dto.ConfigurationContentDTO; |
7 | 9 | |
10 | +import javax.validation.constraints.NotEmpty; | |
8 | 11 | import java.util.List; |
9 | 12 | @Data |
10 | 13 | @ApiModel(value = "组态编辑") |
... | ... | @@ -13,6 +16,8 @@ public class ConfigurationContentInfoDTO { |
13 | 16 | private String configurationId; |
14 | 17 | @ApiModelProperty(value = "组态中心名称") |
15 | 18 | private String configurationName; |
19 | + @ApiModelProperty(value = "终端类型", required = true) | |
20 | + private String platform; | |
16 | 21 | @ApiModelProperty(value = "组态内容",required = true) |
17 | 22 | private List<ConfigurationContentDTO> configurationContentList; |
18 | 23 | } | ... | ... |
... | ... | @@ -25,7 +25,7 @@ public class YtDevice extends TenantBaseEntity { |
25 | 25 | private String profileId; |
26 | 26 | private String tbDeviceId; |
27 | 27 | private String gatewayId; |
28 | - private String deviceTypeId; | |
28 | + private String brand; | |
29 | 29 | private String label; |
30 | 30 | @TableField(typeHandler = EnumTypeHandler.class) |
31 | 31 | private DeviceTypeEnum deviceType; | ... | ... |
... | ... | @@ -66,6 +66,7 @@ public class YtConfigurationCenterServiceImpl |
66 | 66 | contentDTO.setType(FastIotConstants.PC_TYPE); |
67 | 67 | contentDTO.setName(FastIotConstants.FIRST_PAGE_NAME); |
68 | 68 | contentDTO.setConfigurationId(configurationCenter.getId()); |
69 | + contentDTO.setContent("<mxGraphModel><root><mxCell id=\"0\"/><mxCell id=\"1\" parent=\"0\"/></root></mxGraphModel>"); | |
69 | 70 | ytConfigurationContentService.saveConfigurationContent(contentDTO); |
70 | 71 | return configurationCenterDTO; |
71 | 72 | } | ... | ... |
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | <resultMap id="configurationCenterMap" type="org.thingsboard.server.common.data.yunteng.dto.ConfigurationCenterDTO"> |
6 | 6 | <result property="id" column="id"/> |
7 | 7 | <result property="name" column="name"/> |
8 | + <result property="platform" column="platform"/> | |
8 | 9 | <result property="organizationId" column="organization_id"/> |
9 | 10 | <result property="remark" column="remark"/> |
10 | 11 | <result property="updateTime" column="update_time"/> |
... | ... | @@ -20,6 +21,7 @@ |
20 | 21 | <resultMap id="configurationInfoMap" type="org.thingsboard.server.common.data.yunteng.dto.request.ConfigurationContentInfoDTO"> |
21 | 22 | <result property="configurationId" column="id"/> |
22 | 23 | <result property="configurationName" column="name"/> |
24 | + <result property="platform" column="platform"/> | |
23 | 25 | <collection property="configurationContentList" ofType="org.thingsboard.server.common.data.yunteng.dto.ConfigurationContentDTO"> |
24 | 26 | <result property="id" column="content_id"/> |
25 | 27 | <result property="content" column="content"/> |
... | ... | @@ -27,7 +29,7 @@ |
27 | 29 | </resultMap> |
28 | 30 | |
29 | 31 | <sql id="columns"> |
30 | - a.id,a.name,a.organization_id,a.remark,a.update_time,a.create_time,a.creator,a.tenant_id,a.updater,io.name AS organization_name | |
32 | + a.id,a.name,a.platform,a.organization_id,a.remark,a.update_time,a.create_time,a.creator,a.tenant_id,a.updater,io.name AS organization_name | |
31 | 33 | </sql> |
32 | 34 | <select id="getConfigurationCenterPage" resultMap="configurationCenterMap"> |
33 | 35 | SELECT |
... | ... | @@ -51,7 +53,7 @@ |
51 | 53 | </select> |
52 | 54 | |
53 | 55 | <select id="getConfigurationInfoById" resultMap="configurationInfoMap"> |
54 | - SELECT icc.id,icc.name,icct.id AS content_id,icct.content FROM iotfs_configuration_center icc LEFT JOIN | |
56 | + SELECT icc.id,icc.name,icc.platform,icct.id AS content_id,icct.content FROM iotfs_configuration_center icc LEFT JOIN | |
55 | 57 | iotfs_configuration_content icct ON icc.id = icct.configuration_id |
56 | 58 | WHERE icc.id = #{id} AND icc.tenant_id = #{tenantId} |
57 | 59 | </select> | ... | ... |
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | <result property="profileId" column="profile_id"/> |
16 | 16 | <result property="activeTime" column="active_time"/> |
17 | 17 | <result property="deviceType" column="device_type" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/> |
18 | + <result property="brand" column="brand" /> | |
18 | 19 | <result property="sn" column="sn"/> |
19 | 20 | <result property="tenantId" column="tenant_id"/> |
20 | 21 | <result property="tbDeviceId" column="tb_device_id"/> |
... | ... | @@ -62,7 +63,7 @@ |
62 | 63 | ifd |
63 | 64 | . |
64 | 65 | id |
65 | - ,ifd.sn,ifd.name,ifd.device_info,ifd.profile_id,ifd.active_time,ifd.tenant_id,ifd.description | |
66 | + ,ifd.sn,ifd.brand,ifd.name,ifd.device_info,ifd.profile_id,ifd.active_time,ifd.tenant_id,ifd.description | |
66 | 67 | ,ifd.tb_device_id,ifd.label,ifd.last_connect_time,ifd.device_type,ifd.device_state,ifd.create_time,ifd.update_time,ifd.creator, |
67 | 68 | ifd.updater,ifd.organization_id,ifd.alarm_status |
68 | 69 | </sql> | ... | ... |