TRX 1 år sedan
förälder
incheckning
f40394a0fa

+ 0 - 7
OneCardIotClient/src/main/java/com/zhongshu/iot/client/model/iot/IotMainAttributeModel.java

@@ -1,17 +1,10 @@
 package com.zhongshu.iot.client.model.iot;
 
-import com.zhongshu.iot.client.model.baseParam.SuperModel;
-import com.zhongshu.iot.client.type.DataType;
-import com.zhongshu.iot.client.type.FunctionType;
-import com.zhongshu.iot.client.type.OperationType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
-import java.math.BigDecimal;
-import java.util.List;
-
 /**
  * 属性
  *

+ 1 - 1
OneCardIotClient/src/main/java/com/zhongshu/iot/client/model/iot/IotMainModel.java

@@ -3,7 +3,7 @@ package com.zhongshu.iot.client.model.iot;
 import com.zhongshu.iot.client.model.baseParam.SuperModel;
 import com.zhongshu.iot.client.type.DataType;
 import com.zhongshu.iot.client.type.EventType;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import com.zhongshu.iot.client.type.OperationType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;

+ 1 - 1
OneCardIotClient/src/main/java/com/zhongshu/iot/client/model/iot/IotMainParam.java

@@ -3,7 +3,7 @@ package com.zhongshu.iot.client.model.iot;
 import com.zhongshu.iot.client.model.baseParam.SuperParam;
 import com.zhongshu.iot.client.type.DataType;
 import com.zhongshu.iot.client.type.EventType;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;

+ 1 - 1
OneCardIotClient/src/main/java/com/zhongshu/iot/client/model/iot/IotMainSearch.java

@@ -2,7 +2,7 @@ package com.zhongshu.iot.client.model.iot;
 
 import com.zhongshu.iot.client.model.baseParam.SuperSearchParam;
 import com.zhongshu.iot.client.type.DataType;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;

+ 1 - 1
OneCardIotClient/src/main/java/com/zhongshu/iot/client/model/iot/IotMainSuper.java

@@ -1,7 +1,7 @@
 package com.zhongshu.iot.client.model.iot;
 
 import com.zhongshu.iot.client.model.baseParam.SuperParam;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;

+ 0 - 20
OneCardIotClient/src/main/java/com/zhongshu/iot/client/type/FunctionType.java

@@ -1,20 +0,0 @@
-package com.zhongshu.iot.client.type;
-
-import lombok.Getter;
-
-/**
- * 功能类型
- */
-public enum FunctionType {
-    Attribute("属性"),
-    Event("事件"),
-    Server("服务"),
-    ;
-
-    @Getter
-    private String remark;
-
-    FunctionType(String remark) {
-        this.remark = remark;
-    }
-}

+ 1 - 1
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/controller/hardware/DeviceController.java

@@ -7,7 +7,7 @@ import com.zhongshu.iot.client.model.mqtt.DeviceInfoAddParam;
 import com.zhongshu.iot.client.model.mqtt.DeviceInfoModel;
 import com.zhongshu.iot.client.model.mqtt.DeviceInfoSearchParam;
 import com.zhongshu.iot.client.model.mqtt.DeviceInfoUpdateRemark;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import com.zhongshu.iot.server.core.service.mqtt.DeviceInfoService;
 import com.zhongshu.iot.server.core.util.result.ResultContent;
 import io.swagger.v3.oas.annotations.Operation;

+ 1 - 1
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/dao/iot/IotMainDao.java

@@ -1,6 +1,6 @@
 package com.zhongshu.iot.server.core.dao.iot;
 
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import com.zhongshu.iot.client.type.IotDataType;
 import com.zhongshu.iot.server.core.dao.iot.extend.IotMainDaoExtend;
 import com.zhongshu.iot.server.core.domain.iot.IotMain;

+ 1 - 1
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/domain/iot/IotMain.java

@@ -4,7 +4,7 @@ import com.zhongshu.iot.client.model.iot.IotAttribute;
 import com.zhongshu.iot.client.model.iot.IotDict;
 import com.zhongshu.iot.client.type.DataType;
 import com.zhongshu.iot.client.type.EventType;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import com.zhongshu.iot.client.type.IotDataType;
 import com.zhongshu.iot.server.core.domain.base.SuperEntity;
 import io.swagger.v3.oas.annotations.media.Schema;

+ 1 - 1
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/artemis/OperationMessageService.java

@@ -10,7 +10,7 @@ import com.zhongshu.iot.client.model.artemis.OperationMessageResultModel;
 import com.zhongshu.iot.client.model.artemis.OperationMessageResultSearch;
 import com.zhongshu.iot.client.model.artemis.OperationMessageSearchParam;
 import com.zhongshu.iot.client.model.mqtt.SendMessageModel;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import com.zhongshu.iot.client.type.OperationType;
 import com.zhongshu.iot.server.core.dao.iot.IotMainDao;
 import com.zhongshu.iot.server.core.dao.mqtt.DeviceInfoDao;

+ 1 - 1
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/iot/IotDataVerifyService.java

@@ -4,7 +4,7 @@ import cn.hutool.json.JSONArray;
 import cn.hutool.json.JSONObject;
 import com.zhongshu.iot.client.model.iot.IotAttribute;
 import com.zhongshu.iot.client.type.DataType;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import com.zhongshu.iot.server.core.domain.iot.IotMain;
 import com.zhongshu.iot.server.core.util.CommonUtil;
 import com.zhongshu.iot.server.core.util.bean.BeanUtils;

+ 3 - 2
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/iot/IotSendMessageService.java

@@ -71,9 +71,10 @@ public class IotSendMessageService extends SuperService {
             return ResultContent.buildFail(String.format("设备不存在:%S", param.getDeviceId()));
         }
         List<IotMain> list = iotMainDao.findByDeviceIdAndIdentifierAndIotDataType(
-                param.getDeviceId(), param.getIdentifier(), IotDataType.Device
-        );
+                param.getDeviceId(), param.getIdentifier(), IotDataType.Device);
+
         if (ObjectUtils.isEmpty(list)) {
+            log.error("设备没有对应的物模型 {} {}", param.getDeviceId(), param.getIdentifier());
             return ResultContent.buildFail("没有对应的设备物模型");
         }
         GateWayInfo gateWayInfo = null;

+ 1 - 1
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/iot/IotServiceImpl.java

@@ -2,7 +2,7 @@ package com.zhongshu.iot.server.core.service.iot;
 
 import com.zhongshu.iot.client.model.baseParam.NameModel;
 import com.zhongshu.iot.client.model.iot.*;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import com.zhongshu.iot.client.type.IotDataType;
 import com.zhongshu.iot.server.core.dao.UserDao;
 import com.zhongshu.iot.server.core.dao.iot.IotDeviceDataDao;

+ 1 - 1
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/mqtt/DeviceInfoService.java

@@ -6,7 +6,7 @@ import com.zhongshu.iot.client.model.mqtt.DeviceInfoAddParam;
 import com.zhongshu.iot.client.model.mqtt.DeviceInfoModel;
 import com.zhongshu.iot.client.model.mqtt.DeviceInfoSearchParam;
 import com.zhongshu.iot.client.model.mqtt.DeviceInfoUpdateRemark;
-import com.zhongshu.iot.client.type.FunctionType;
+import com.github.microservice.types.FunctionType;
 import com.zhongshu.iot.client.type.type.LogsLevel;
 import com.zhongshu.iot.server.core.dao.iot.IotTemplateDao;
 import com.zhongshu.iot.server.core.dao.mqtt.DeviceInfoDao;