fix:透传设备属性改为bool,初始化数据添加

V0.5.x
tangfudong 2023-06-29 10:39:42 +08:00
parent e340f59a48
commit 6e5de54e6e
5 changed files with 45 additions and 6 deletions

View File

@ -6,6 +6,7 @@
"category": "light", "category": "light",
"nodeType": 1, "nodeType": 1,
"isOpenLocate": true, "isOpenLocate": true,
"transparent": false,
"locateUpdateType": "manual", "locateUpdateType": "manual",
"uid": "1", "uid": "1",
"createAt": 1650174777304 "createAt": 1650174777304
@ -18,6 +19,7 @@
"category": "fan", "category": "fan",
"nodeType": 1, "nodeType": 1,
"isOpenLocate": false, "isOpenLocate": false,
"transparent": false,
"uid": "1", "uid": "1",
"createAt": 1646571291131 "createAt": 1646571291131
}, },
@ -78,6 +80,7 @@
"uid": "1", "uid": "1",
"img": "null", "img": "null",
"isOpenLocate": false, "isOpenLocate": false,
"transparent": false,
"createAt": 1650190400357 "createAt": 1650190400357
}, },
{ {
@ -123,6 +126,7 @@
"nodeType": 1, "nodeType": 1,
"uid": "1", "uid": "1",
"isOpenLocate": false, "isOpenLocate": false,
"transparent": false,
"createAt": 1650187781637 "createAt": 1650187781637
}, },
{ {
@ -145,6 +149,7 @@
"nodeType": 1, "nodeType": 1,
"uid": "1", "uid": "1",
"isOpenLocate": false, "isOpenLocate": false,
"transparent": false,
"createAt": 1649653149339 "createAt": 1649653149339
}, },
{ {
@ -155,6 +160,7 @@
"nodeType": 1, "nodeType": 1,
"uid": "1", "uid": "1",
"isOpenLocate": false, "isOpenLocate": false,
"transparent": false,
"createAt": 1649653149339 "createAt": 1649653149339
}, },
{ {
@ -165,6 +171,7 @@
"nodeType": 0, "nodeType": 0,
"uid": "1", "uid": "1",
"isOpenLocate": false, "isOpenLocate": false,
"transparent": false,
"createAt": 1649653149339 "createAt": 1649653149339
}, },
{ {
@ -175,6 +182,7 @@
"nodeType": 1, "nodeType": 1,
"uid": "1", "uid": "1",
"isOpenLocate": false, "isOpenLocate": false,
"transparent": false,
"createAt": 1649653149339 "createAt": 1649653149339
} }
] ]

View File

@ -22,6 +22,10 @@ import java.io.Serializable;
@AllArgsConstructor @AllArgsConstructor
public class Product extends TenantModel implements Id<Long>, Serializable { public class Product extends TenantModel implements Id<Long>, Serializable {
//定位更新方式,手动/设备上报
public static final String LOCATE_MANUAL = "manual";
public static final String LOCATE_DEVICE = "device";
private Long id; private Long id;
private String productKey; private String productKey;
@ -46,6 +50,16 @@ public class Product extends TenantModel implements Id<Long>, Serializable {
*/ */
private Boolean transparent; private Boolean transparent;
/**
*
*/
private Boolean isOpenLocate;
/**
*
*/
private String locateUpdateType;
private Long createAt; private Long createAt;
public boolean isTransparent() { public boolean isTransparent() {

View File

@ -58,11 +58,14 @@ public class TbProduct {
@ApiModelProperty(value = "图片") @ApiModelProperty(value = "图片")
private String img; private String img;
/**
* ,true/false
*/
@ApiModelProperty(value = "是否透传,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 = "创建时间") @ApiModelProperty(value = "创建时间")
private Long createAt; private Long createAt;

View File

@ -43,7 +43,13 @@ public class ProductBo extends BaseDto {
@ApiModelProperty(value="是否透传,true/false") @ApiModelProperty(value="是否透传,true/false")
@Size(max = 255, message = "是否透传,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") @ApiModelProperty(value="用户ID")
@Size(max = 255, message = "用户ID长度不正确") @Size(max = 255, message = "用户ID长度不正确")

View File

@ -54,7 +54,15 @@ public class ProductVo implements Serializable {
@ApiModelProperty(value="是否透传,true/false") @ApiModelProperty(value="是否透传,true/false")
@ExcelProperty(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") @ApiModelProperty(value="用户ID")
@ExcelProperty(value = "用户ID") @ExcelProperty(value = "用户ID")