From 6e5de54e6ef8f4084e58d4911f5700ef1153cce3 Mon Sep 17 00:00:00 2001 From: tangfudong <280620913@qq.com> Date: Thu, 29 Jun 2023 10:39:42 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E9=80=8F=E4=BC=A0=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=B1=9E=E6=80=A7=E6=94=B9=E4=B8=BAbool=EF=BC=8C?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=95=B0=E6=8D=AE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/init/product.json | 8 ++++++++ .../main/java/cc/iotkit/model/product/Product.java | 14 ++++++++++++++ .../main/java/cc/iotkit/data/model/TbProduct.java | 11 +++++++---- .../iotkit/manager/dto/bo/product/ProductBo.java | 8 +++++++- .../iotkit/manager/dto/vo/product/ProductVo.java | 10 +++++++++- 5 files changed, 45 insertions(+), 6 deletions(-) diff --git a/data/init/product.json b/data/init/product.json index 60160b77..f259f723 100755 --- a/data/init/product.json +++ b/data/init/product.json @@ -6,6 +6,7 @@ "category": "light", "nodeType": 1, "isOpenLocate": true, + "transparent": false, "locateUpdateType": "manual", "uid": "1", "createAt": 1650174777304 @@ -18,6 +19,7 @@ "category": "fan", "nodeType": 1, "isOpenLocate": false, + "transparent": false, "uid": "1", "createAt": 1646571291131 }, @@ -78,6 +80,7 @@ "uid": "1", "img": "null", "isOpenLocate": false, + "transparent": false, "createAt": 1650190400357 }, { @@ -123,6 +126,7 @@ "nodeType": 1, "uid": "1", "isOpenLocate": false, + "transparent": false, "createAt": 1650187781637 }, { @@ -145,6 +149,7 @@ "nodeType": 1, "uid": "1", "isOpenLocate": false, + "transparent": false, "createAt": 1649653149339 }, { @@ -155,6 +160,7 @@ "nodeType": 1, "uid": "1", "isOpenLocate": false, + "transparent": false, "createAt": 1649653149339 }, { @@ -165,6 +171,7 @@ "nodeType": 0, "uid": "1", "isOpenLocate": false, + "transparent": false, "createAt": 1649653149339 }, { @@ -175,6 +182,7 @@ "nodeType": 1, "uid": "1", "isOpenLocate": false, + "transparent": false, "createAt": 1649653149339 } ] \ No newline at end of file diff --git a/iot-common/iot-common-dao/iot-common-model/src/main/java/cc/iotkit/model/product/Product.java b/iot-common/iot-common-dao/iot-common-model/src/main/java/cc/iotkit/model/product/Product.java index c2b74462..17317f3e 100644 --- a/iot-common/iot-common-dao/iot-common-model/src/main/java/cc/iotkit/model/product/Product.java +++ b/iot-common/iot-common-dao/iot-common-model/src/main/java/cc/iotkit/model/product/Product.java @@ -22,6 +22,10 @@ import java.io.Serializable; @AllArgsConstructor public class Product extends TenantModel implements Id, Serializable { + //定位更新方式,手动/设备上报 + public static final String LOCATE_MANUAL = "manual"; + public static final String LOCATE_DEVICE = "device"; + private Long id; private String productKey; @@ -46,6 +50,16 @@ public class Product extends TenantModel implements Id, Serializable { */ private Boolean transparent; + /** + * 是否开启定位 + */ + private Boolean isOpenLocate; + + /** + * 定位更新方式 + */ + private String locateUpdateType; + private Long createAt; public boolean isTransparent() { diff --git a/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbProduct.java b/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbProduct.java index 5e27fb29..a757b02f 100644 --- a/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbProduct.java +++ b/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbProduct.java @@ -58,11 +58,14 @@ public class TbProduct { @ApiModelProperty(value = "图片") private String img; - /** - * 是否透传,true/false - */ @ApiModelProperty(value = "是否透传,true/false") - private String transparent; + private Boolean transparent; + + @ApiModelProperty(value="是否开启设备定位,true/false") + private Boolean isOpenLocate; + + @ApiModelProperty(value="定位更新方式") + private String locateUpdateType; @ApiModelProperty(value = "创建时间") private Long createAt; diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/ProductBo.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/ProductBo.java index 8de07709..7521c829 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/ProductBo.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/ProductBo.java @@ -43,7 +43,13 @@ public class ProductBo extends BaseDto { @ApiModelProperty(value="是否透传,true/false") @Size(max = 255, message = "是否透传,true/false长度不正确") - private String transparent; + private Boolean transparent; + + @ApiModelProperty(value="是否开启设备定位,true/false") + private Boolean isOpenLocate; + + @ApiModelProperty(value="定位更新方式") + private String locateUpdateType; @ApiModelProperty(value="用户ID") @Size(max = 255, message = "用户ID长度不正确") diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/ProductVo.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/ProductVo.java index 30ce23bb..05f1e7a7 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/ProductVo.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/ProductVo.java @@ -54,7 +54,15 @@ public class ProductVo implements Serializable { @ApiModelProperty(value="是否透传,true/false") @ExcelProperty(value = "是否透传,true/false") - private String transparent; + private Boolean transparent; + + @ApiModelProperty(value="是否开启设备定位,true/false") + @ExcelProperty(value = "是否开启设备定位,true/false") + private Boolean isOpenLocate; + + @ApiModelProperty(value="定位更新方式") + @ExcelProperty(value = "定位更新方式") + private String locateUpdateType; @ApiModelProperty(value="用户ID") @ExcelProperty(value = "用户ID")