|
|
@@ -5,6 +5,7 @@ import com.aliyuncs.iot.model.v20180120.QueryDeviceResponse;
|
|
|
import com.baomidou.mybatisplus.annotation.*;
|
|
|
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
|
|
import com.nb.web.api.bean.AliIotConfig;
|
|
|
+import com.nb.web.api.enums.DeviceRegisterEnum;
|
|
|
import com.nb.web.api.enums.DeviceStatusEnum2;
|
|
|
import com.nb.web.api.enums.DeviceTypeEnum;
|
|
|
import com.nb.common.config.mybatisplus.handler.TenantNameHandler;
|
|
|
@@ -50,17 +51,10 @@ public class BusDeviceEntity extends TenantGenericEntity<String,String> {
|
|
|
@JsonIgnore
|
|
|
private String infusionId;
|
|
|
|
|
|
- @ApiModelProperty(value = "设备类型")
|
|
|
- @Deprecated
|
|
|
- @Length(max = 255,message = "设备类型不得超过255个字符")
|
|
|
- private DeviceTypeEnum type;
|
|
|
-
|
|
|
@ApiModelProperty(value = "第三方平台返回配置")
|
|
|
@TableField(typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.DEFAULT)
|
|
|
private AliIotConfig config;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
@ApiModelProperty(value = "sim卡卡号")
|
|
|
@Length(max = 255,message = "sim卡卡号不得超过255个字符")
|
|
|
private String simIccid;
|
|
|
@@ -72,6 +66,8 @@ public class BusDeviceEntity extends TenantGenericEntity<String,String> {
|
|
|
@ApiModelProperty(value = "是否启用,0、不启用 1、启用 ")
|
|
|
private Boolean enable;
|
|
|
|
|
|
+ @ApiModelProperty(value = "注册类型",example = "0(阿里云) 1(PC端)")
|
|
|
+ private DeviceRegisterEnum registerType;
|
|
|
|
|
|
@TableField(fill = FieldFill.INSERT)
|
|
|
@TableLogic
|
|
|
@@ -83,6 +79,10 @@ public class BusDeviceEntity extends TenantGenericEntity<String,String> {
|
|
|
@TableField(value = "tenant_id",typeHandler = TenantNameHandler.class,updateStrategy = FieldStrategy.NEVER,insertStrategy = FieldStrategy.NEVER)
|
|
|
private String tenantName;
|
|
|
|
|
|
+ public DeviceRegisterEnum getRegisterType() {
|
|
|
+ return registerType==null?DeviceRegisterEnum.ali:registerType;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @author 龙三郎
|
|
|
* 根据阿里云返回的数据更新设备对象
|