Преглед на файлове

新增中捷四方性诱设备类型
调整设备连接信息缓存
调整设备mqttTopic缓存

liuyaowen преди 11 месеца
родител
ревизия
9cf34b2f4e

+ 5 - 4
src/main/java/com/yunfeiyun/agmp/iot/common/constant/devicetype/IotDeviceDictConst.java

@@ -140,10 +140,7 @@ public class IotDeviceDictConst {
      */
     public static final String TYPE_XPH_TRSH_CL = "5001";
 
-    /**
-     * 中捷四方性诱
-     */
-    public static final String TYPE_ZJSF_XYCB = "1701";
+
 
     /**
      * 海普发温室灭菌智能开关
@@ -363,4 +360,8 @@ public class IotDeviceDictConst {
      * 宁录-性诱测报灯
      */
     public static final String TYPE_YF_XYCB_2 = "XYCB00004";
+    /**
+     * 中捷四方性诱
+     */
+    public static final String TYPE_ZJSF_XYCB = "XYCB00005";
 }

+ 1 - 1
src/main/java/com/yunfeiyun/agmp/iot/common/constant/devicetype/IotDeviceDictEnum.java

@@ -75,7 +75,7 @@ public enum IotDeviceDictEnum {
     TYPE_YF_CBD(IotDeviceDictConst.TYPE_YF_CBD, "普通测报灯", ServiceNameConst.SERVICE_YF_CBD, IotDeviceTypeLv1Enum.CBD),
     TYPE_YF_GKCBD(IotDeviceDictConst.TYPE_YF_GKCBD, "高空测报灯", ServiceNameConst.SERVICE_YF_GKCBD, IotDeviceTypeLv1Enum.CBD),
     TYPE_YF_SDCBD(IotDeviceDictConst.TYPE_YF_SDCBD, "水稻测报灯", ServiceNameConst.SERVICE_YF_SDCBD, IotDeviceTypeLv1Enum.CBD),
-    TYPE_YF_XCT(IotDeviceDictConst.TYPE_YF_XCT,"吸虫塔",ServiceNameConst.SERVICE_YF_CBD,IotDeviceTypeLv1Enum.CBD),
+    TYPE_YF_XCT(IotDeviceDictConst.TYPE_YF_XCT,"吸虫塔",ServiceNameConst.SERVICE_YF_XCT,IotDeviceTypeLv1Enum.CBD),
 
     TYPE_YF_SCD(IotDeviceDictConst.TYPE_YF_SCD, "云飞普通杀虫灯", ServiceNameConst.SERVICE_YF_SCD, IotDeviceTypeLv1Enum.SCD),
     TYPE_YF_FXSSCD(IotDeviceDictConst.TYPE_YF_FXSSCD, "云飞风吸式杀虫灯", ServiceNameConst.SERVICE_YF_FXSSCD, IotDeviceTypeLv1Enum.SCD),

+ 1 - 1
src/main/java/com/yunfeiyun/agmp/iot/common/domain/IotXycbimg.java

@@ -25,7 +25,7 @@ public class IotXycbimg extends IotBaseEntity
 
     /** 客户id */
     @Excel(name = "客户id")
-    private String cId;
+    private String tid;
 
     /** 设备业务标识 */
     @Excel(name = "设备业务标识")

+ 3 - 3
src/main/java/com/yunfeiyun/agmp/iot/common/service/DeviceconnCacheService.java

@@ -21,15 +21,15 @@ public class DeviceconnCacheService {
     private RedisTemplate redisTemplate;
 
     public void setCache(IotDeviceconn iotDeviceconn){
-        log.error("【设备连接缓存】保存设备连接信息缓存,设备链接信息标识:{}",iotDeviceconn.getDevconnBid());
+        log.info("【设备连接缓存】保存设备连接信息缓存,设备链接信息标识:{}",iotDeviceconn.getDevconnBid());
         redisTemplate.opsForValue().set(getKey(RedisCacheKey.IOT_DEVICE_CONN)+iotDeviceconn.getDevconnBid(),iotDeviceconn);
     }
     public void deleteCache(IotDeviceconn iotDeviceconn){
-        log.error("【设备连接缓存】删除设备连接信息缓存,设备链接信息标识:{}",iotDeviceconn.getDevconnBid());
+        log.info("【设备连接缓存】删除设备连接信息缓存,设备链接信息标识:{}",iotDeviceconn.getDevconnBid());
         redisTemplate.delete(getKey(RedisCacheKey.IOT_DEVICE_CONN)+iotDeviceconn.getDevconnBid());
     }
     public IotDeviceconn getIotDeviceConnByDevconnBid(String devconnBid){
-        log.error("【设备连接缓存】查询设备连接信息,设备连接标识为:{}",devconnBid);
+        log.info("【设备连接缓存】查询设备连接信息,设备连接标识为:{}",devconnBid);
         // 首先查询出当前设备的连接信息
         IotDeviceconn iotDeviceconn = (IotDeviceconn) redisTemplate.opsForValue().get(getKey(RedisCacheKey.IOT_DEVICE_CONN)+devconnBid);
         if(null == iotDeviceconn){

+ 5 - 2
src/main/java/com/yunfeiyun/agmp/iot/common/service/IotMqttTopicCacheService.java

@@ -15,8 +15,11 @@ public class IotMqttTopicCacheService {
     @Autowired
     private RedisCacheManager redisCacheManager;
 
-    public void refreshTopicCache(Set<String> topicSet){
-        redisCacheManager.setCacheSet(RedisCacheKey.IOT_MQTT_DEVICE_TOPIC_SET, KEY_ID, topicSet);
+    public void addTopicCache(String devCode,String[] topics){
+        redisCacheManager.rightPushListAll(RedisCacheKey.IOT_MQTT_DEVICE_TOPIC_SET, devCode, topics);
+    }
+    public void removeTopicCache(String devCode){
+        redisCacheManager.deleteObject(RedisCacheKey.IOT_MQTT_DEVICE_TOPIC_SET,devCode);
     }