|
|
@@ -1,26 +0,0 @@
|
|
|
-package com.yunfeiyun.agmp.iot.common.service;
|
|
|
-
|
|
|
-import com.yunfeiyun.agmp.common.enums.RedisCacheKey;
|
|
|
-import com.yunfeiyun.agmp.common.framework.manager.RedisCacheManager;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
-import java.util.Set;
|
|
|
-
|
|
|
-@Service
|
|
|
-public class IotMqttTopicCacheService {
|
|
|
-
|
|
|
- private static final String KEY_ID = "all";
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private RedisCacheManager redisCacheManager;
|
|
|
-
|
|
|
- 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);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-}
|